http://blog.chinaunix.net/uid-561779-id-166584.html安裝條件:
1,安裝vncserver。
2,安裝xwindows(若不裝,無法使用xwindows的遠程桌面)
配置
打开配置文件/etc/sysconfig/vncservers,去掉下面这行的注释,
注釋掉: # VNCSERVERS="1:myusername"
加入: VNCSERVERS="1:root"
注釋掉: # VNCSERVERARGS[1]="-geometry 800x600"
2. 停止vnc
终端执行:vncserver -kill :1
后面的:n代表启动的桌面
3. 修改vnc密码
终端执行:vncpasswd
然后连续输入两次密码即可
4.修改下面配置完成界面化的实现...
vi /root/.vnc/xstartup 去除注释下面兩行的注釋,使之生效。
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
最後一行修改為:gnome-session &
6. 如何使得linux启动时,vnc服务自动启动...
a. 系统设置>服务器设置>服务 中把 vncserver 打勾
b. chkconfig vncserver on
-
Linux VNCserver的配置
2015-06-03 15:52:172,安裝xwindows(若不裝,無法使用xwindows的遠程桌面)配置打开配置文件/etc/sysconfig/vncservers,去掉下面这行的注释,注釋掉: # VNCSERVERS="1:myusername"加入: ...转载于:https://blog.51cto.com/bsbforever/1657911
-
linux vncserver设置及配置自动启动
2013-09-03 19:27:03VNC 服务端 vncserver 启动VNC。 vncserver –kill :num num一般从1开始,因为0被x server占用了 ...要使用VNC图形界面修改~/.vnc/xstartup配置文件中末行中的值 twm & 为命令模式 gnome-session & 使用GNOME图形界面VNC 服务端
vncserver 启动VNC。
vncserver –kill :num num一般从1开始,因为0被x server占用了
vncpasswd 设置vnc连接密码
要使用VNC图形界面修改~/.vnc/xstartup配置文件中末行中的值
twm & 为命令模式
gnome-session & 使用GNOME图形界面
kde & 使用KDE图形界面
注意:只能3种选一种,个人喜欢GNOME图形界面。
连接方式:
vncviewer xxx.xxx.xxx.xxx:display number
例如:vncviewer 192.168.1.1:1
设置vnc自动启动
vi /etc/rc.local
su - root -c "/usr/bin/vncserver"
-
Linux VNCserver的配置(remote desktop)
2008-11-05 16:12:00参考:vnc配置图文教程解决VNC远程登陆不能正常显示桌面的问题 VNCserver 找不到字体解决办法1.查看VNC是否已经安装:$ rpm -q vnc vnc-servervnc-4.1.2-24.fc8vnc-server-4.1.2-...把用户名加入到配置文件中:CODE:参考:
vnc配置图文教程解决VNC远程登陆不能正常显示桌面的问题
VNCserver 找不到字体解决办法
1.查看VNC是否已经安装:
$ rpm -q vnc vnc-server
vnc-4.1.2-24.fc8
vnc-server-4.1.2-24.fc8
vnc是客户端,vnc-server是服务器端
2.把用户名加入到配置文件中:
CODE:[root@localhost ~]# sudo vi /etc/sysconfig/vncservers3.用vncpasswd创建一个vnc的口令
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# URL:http://www.uk.research.att.com/vnc/sshvnc.html
# VNCSERVERS="1:myusername"
VNCSERVERS="1:root"
注意这将同时在你的home目录下,创建一个隐藏的目录.vnc,其中有一个文件passwd保存着你的vnc口令.
[root@localhost ~]# vncpasswd4.启动vnc服务.
Password:
Verify:
[root@localhost ~]# ls -d .vnc
.vnc
[root@localhost ~]# ls .vnc
passwdCODE:[root@localhost ~]# sudo /sbin/service vncserver restart察看一下.vnc这个目录的内容,应该类似于下面的东西.
Shutting down VNC server: 1:root [ OK ]
Starting VNC server: 1:root perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_EN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
[ OK ]CODE:[root@localhost ~]# cd .vnc编辑这个名为xstartup的脚本,注意到下面红色的部分的注释
[root@localhost .vnc]# ls
localhost.localdomain:1.log localhost.localdomain:2.log passwd
localhost.localdomain:1.pid localhost.localdomain:2.pid xstartup
[root@localhost .vnc]#
将这两行标记成红色的内容前面的注释符号去掉,否则你将只能得到一个什么都没有的灰屏。#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
因为我们已经修改了启动脚本,现在来重新启动vncserver.CODE:[root@localhost .vnc]# sudo /sbin/service vncserver restart5.防火墙端口设置
Shutting down VNC server: 1:root [ OK ]
Starting VNC server: 1:root perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_EN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
[ OK ]
[root@localhost .vnc]#
在使用防火墙的情况下来连接到一个远程系统,需要打开端口5901.
加入以下红色的部分,然后重启iptables服务。
[root@localhost ~]# sudo vi /etc/sysconfig/iptables
# Firewall configuration written by redhat-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0]
:FORWARD ACCEPT [0]
:OUTPUT ACCEPT [0]
:RH-Firewall-1-INPUT - [0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
[root@localhost ~]# sudo /sbin/service iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
[root@localhost ~]#
================================
其他:
================================
1. 让vncserver接受两个不同的用户:
CODE:VNCSERVERS="1:root 2:yanyp"当然你要为两个用户分别运行vncpasswd来设置口令. 并且在你的防火墙修改中,你应该明白VNC使用端口5901给连接1用,如果象上面一样要支持两个用户,应同时打开5901和5902.
2. 如果安装了用客户端vncviewer可以使用 vncviewer命令来远程连接vncserver
[root@localhost ~]$ vncviewer localhost(或者用IP地址):1
输入你的vnc口令,就可以了 -
Linux 下配置VNCserver
2011-12-27 19:35:56Linux VNCserver的配置 1.查看VNC是否已经安装: $ rpm -q vnc vnc-server vnc是客户端,vnc-server是服务器端 2.把用户名加入到配置文件中: CODE:[root@localhost ~]# vi /etc/sysconfig/vncservers # The ...Linux VNCserver的配置
1.查看VNC是否已经安装:
$ rpm -q vnc vnc-servervnc是客户端,vnc-server是服务器端
2.把用户名加入到配置文件中:
CODE:[root@localhost ~]# vi /etc/sysconfig/vncservers# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the line below to start a VNC server on display :1
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# URL:http://www.uk.research.att.com/vnc/sshvnc.html
# VNCSERVERS="1:myusername"
VNCSERVERS="1:root"
3.用vncpasswd创建一个vnc的口令注意这将同时在你的home目录下,创建一个隐藏的目录.vnc,其中有一个文件passwd保存着你的vnc口令.
CODE:
[root@localhost ~]# vncpasswd
Password:
Verify:
[root@localhost ~]# ls -d .vnc
.vnc
[root@localhost ~]# ls .vnc
passwd
4.启动vnc服务.
CODE:[root@localhost ~]# service vncserver restart
Shutting down VNC server: 1:root [ OK ]
Starting VNC server: 1:root perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_EN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log[ OK ]
察看一下.vnc这个目录的内容,应该类似于下面的东西.
CODE:[root@localhost ~]# cd .vnc
[root@localhost .vnc]# ls
localhost.localdomain:1.log localhost.localdomain:2.log passwd
localhost.localdomain:1.pid localhost.localdomain:2.pid xstartup
[root@localhost .vnc]#编辑这个名为xstartup的脚本,注意到下面红色的部分的注释
将这两行标记成红色的内容前面的注释符号去掉,否则你将只能得到一个什么都没有的灰屏。#!/bin/sh
# Uncomment the following two lines for normal desktop:unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &因为我们已经修改了启动脚本,现在来重新启动vncserver.
CODE:[root@localhost .vnc]# service vncserver restart
Shutting down VNC server: 1:root [ OK ]
Starting VNC server: 1:root perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_EN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log[ OK ]
[root@localhost .vnc]#
5.防火墙端口设置
在使用防火墙的情况下来连接到一个远程系统,需要打开端口5901.
加入以下红色的部分,然后重启iptables服务。[root@localhost ~]# vi /etc/sysconfig/iptables
# Firewall configuration written by redhat-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0]
:FORWARD ACCEPT [0]
:OUTPUT ACCEPT [0]
:RH-Firewall-1-INPUT - [0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT[root@localhost ~]# sudo /sbin/service iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
[root@localhost ~]#
================================
其他:
================================1. 让vncserver接受两个不同的用户:
CODE:VNCSERVERS="1:root 2:yanyp"
当然你要为两个用户分别运行vncpasswd来设置口令. 并且在你的防火墙修改中,你应该明白VNC使用端口5901给连接1用,如果象上面一样要支持两个用户,应同时打开5901和5902.2. 如果安装了用客户端vncviewer可以使用 vncviewer命令来远程连接vncserver
[root@localhost ~]$ vncviewer localhost(或者用IP地址):1
输入你的vnc口令,就可以了
转载于:https://blog.51cto.com/yukay/752335
-
vncserver linux 下配置
2013-01-07 10:52:31redhat 一般都自动安装了vncserver了 只要在服务列表中选中启动一下就可以. 通过编辑文件$HOME/.vnc/xstartup来...使用vncserver命令为当前用户启动vnc服务(将在当前用户主目录下生成.vnc配置文件夹) [root@tech ~ -
Linux 安装VNCServer
2016-07-22 13:18:50在Linux平台安装VNCServer服务端软件包。...修改VNCServer主配置文件 #vim /etc/sysconfig/vncservers 复制最后两行并去掉行首注释符,然后修改为 VNCSERVERS="1:root" VNCSERVERARGS[1 -
Linux 之 简单快速安装与配置 VNCServer
2018-10-16 10:16:16转自:...1.安装vnc server[root@pxe ~]# yum install tigervnc-server -y 2.设置 vnc server 开机启动[root@pxe ~]# chkconfig vncserver on 3.修改vncserver 配置文件[root@pxe ~]... -
Linux连接VNCSERVER
2013-04-24 10:49:58在windows下使用vnc viewer远程连接Linux桌面,主要配置步骤: Linux: 1.rpm -qa vnc //查看是否安装...2.修改配置文件: vim /etc/sysconfig/vncservers,如下图修改 3.设置vnc密码: vncpasswd 4.启动vncse... -
VNCserver 远程Linux CentOS桌面 配置 与 蓝屏解决
2017-01-04 15:26:400.关闭防火墙,CentOS的防火墙是firewalld,关闭防火墙的命令systemctl stop firewalld.service 1.安装tigervncserver,yum install tigervnc-...2.拷贝配置文件cp /lib/systemd/system/vncserver@.service /etc/syst -
linux-kvm之vncserver安装
2019-11-06 15:48:091.安装vnc server [root@pxe ~]# yum install tigervnc-server -y 2.设置 vnc server 开机启动 ...3.修改vncserver 配置文件 [root@pxe ~]# vi /etc/sysconfig/vncservers 在配置文件后添加以下内容 VNCSE... -
Linux下VNCSERVER使用
2008-07-16 09:47:00启动 #vncserver 图形界面 启动vncserver后,修改/root/.vnc/xstartup,把最后一行twm&改成gnome-session&或者kde&...在/etc/sysconfig下有一个vncservers的配置文件。修改成如下:... -
Linux下VNCSERVER的使用介绍
2010-03-06 11:47:00telnet与ssh只是基于字符界面的远程控制,如果想要对linux服务器时行桌面的远程控制的话,我们可以...设置VNC桌面2.1我们要为有权可以登录的用户设置登录桌面,修改配置文件/etc/sysconfig/vncservers :VNCSERVERS= -
linux 远程启动 vncserver
2010-07-28 16:01:00其实可以通过 先用 ssh 重客户端登入服务器,然后在启动 vncserver 的. 但是这种启动方式,客户端连入后的 X 界面是一个很简单的 gui 界面,可以通过修改配置文件 .vnc/Xstartup (每个用户主目下都会有这... -
linux vnc配置
2012-02-27 18:52:40在这里使用VNC管理和维护linux是非常方便的并且跨平台,打开浏览器就可以管理维护你的系统! 先说下配置过程: 1,安装vncserver服务 ... ...4,编辑vncserver配置文件,[root@localhost /]# vi /e -
Linux VNC配置
2010-11-25 18:12:00Linux VNC 配置指南 1、 安装vnc,系统光盘中vnc* 2、 设置密码—》vncpasswd 3、 执行vncserver,第一次执行后会生成一些配置文件 4、 修改文件/root/.vnc/xstart,将这两行的注释去掉(upunset SESSION_... -
VNCServer在Linux下设置
2013-03-18 21:36:321.检查vnc客户端和服务器是否已经安装: [root@centos ~]$ rpm -q vnc-server package vnc-server is not installed 说明没有安装 运行yum install vnc-server进行安装 ...2. 将用户名称加入到配置文件: -
centos 7 安装和配置vncserver
2019-05-19 12:55:34而上传文件就要通过WinSCP: 一般的工作,不需要可视化界面也能完成 可是,当我们有些操作需要显示出来,就有问题了,例如我们训练完ssd,想在图片或者视频上测试,看看效果: 没办法显... -
vncserver
2013-03-14 08:21:581. 检查vnc客户端和服务器是否已经安装: [gavin@centos ~]$ rpm -q vnc vnc-server package vnc is not installed ...2. 将用户名称加入到配置文件: (注:这里的“用户名”是指linux系统用户的名称) [gavi -
Linux配置VNC Server
2016-02-03 13:34:031.安装vnc sever。 命令:yum install tigervnc-server -y2.将vncserver设置为随系统启动。 命令:chkconfig vncserver on ...修改vncserver的配置文件。 命令:vim /etc/sysconfig/vncservers 在最后加上: VNCSE -
Linux VNC server 安装配置
2017-06-13 13:46:191.安装vnc server[root@pxe~]#yuminstalltigervnc-server-y2.设置 vnc server 开机启动[root@pxe~]#...修改vncserver 配置文件[root@pxe~]#vi/etc/sysconfig/vncservers在配置文件后添加以下内容V... -
linux配置vnc
2020-04-22 21:31:202.# vim /etc/sysconfig/vncservers(SUSE企业版不用配置此文件) 再最后面加入如下两行: VNCSERVERS=“1:root” VNCSERVERARGS[1]="-geometry 1024x768 -alwaysshared -depth 24" 3.# vncserver 4...
-
ffmpeg-4.4-2460-2c6f532-win32-shared-xpmod-sse.7z
-
实现 MySQL 读写分离的利器 mysql-proxy
-
2021-02-27
-
时间片轮转模拟进程调度.zip
-
三子棋实现
-
5.按键输入.rar
-
otsu算法的简单python实现(最大类间方差)
-
基于Qt的LibVLC开发教程
-
NFS 网络文件系统
-
【Android-Kotlin】减小包体积
-
word生成pdf点击目录可自动跳转到指定位置
-
谁获奖了
-
安川机器人指令 一览.pdf
-
安规测试介绍.pdf
-
autosar-ap c++ string的length()和size()区别
-
原生js的深拷贝
-
微信红包测试
-
4.GPIO.rar
-
auto_install.bat
-
MySQL NDB Cluster 负载均衡和高可用集群