杀绝:linux系统桌面的vnc远程
时间:2009-07-21 来源:telcnc
vnc 下载地址:http://www.realvnc.com
本文用的vnc版本号:vnc-4_1_3-x86_linux.tar.gz <服务器端>,客户端也可以是其他的版本!
解压软件包:
先把vnc-4_1_3-x86_linux.tar.gz放到需要远程控制的机器服务器上,然后解压到/opt目录
#tar xzvf vnc-4_1_3-x86_linux.tar.gz -C /opt
#cd /opt/vnc-4_1_3-86_linux/
安装:
#mkdir/usr/local/vnc #/vncinstall /usr/local/vnc 配置: #vncpasswd (远程控制的密码,这个当前用户登陆到vnc的密码) 设置密码后,运行: #vncserver 出现: New linux.com:1 (root) desktop is South.redflag-linux.com:1 Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/South.redflag-linux.com:1.log 说明可以进行远程控制了! 客户端的安装,到网站直接下载exe安装客户端就可以了,但是有连进去以后,看到桌面,先不急,还要进行设置! 客户端显示桌面设置: 1.已经连接上的客户端要断开,然后在服务器端执行: #vncserver -kill hostname:连接号 2.写入: #vncserver 出现: New linux.com:1 (root) desktop is South.redflag-linux.com:1 Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/South.redflag-linux.com:1.log 3.编辑文件: #vi /root/.vnc/xstsrtup 内容如下: !/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" &
gnome - session & 4.重启VNC: #sudo /sbin/service vncserver restart 5.杀掉以前的连接号: #vncserver -kill hostname:连接号 6启动vnc连接号: #vncserver 7客户端重新连接,例如:ip+连接号 就可以看到linux桌面. 注意了,在上面修改了文件以后,一定要重启VNC服务,然后把以前所有的连接号杀掉,然后开启新的连接号.这时客户端才可以看到 linux桌面!
#mkdir/usr/local/vnc #/vncinstall /usr/local/vnc 配置: #vncpasswd (远程控制的密码,这个当前用户登陆到vnc的密码) 设置密码后,运行: #vncserver 出现: New linux.com:1 (root) desktop is South.redflag-linux.com:1 Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/South.redflag-linux.com:1.log 说明可以进行远程控制了! 客户端的安装,到网站直接下载exe安装客户端就可以了,但是有连进去以后,看到桌面,先不急,还要进行设置! 客户端显示桌面设置: 1.已经连接上的客户端要断开,然后在服务器端执行: #vncserver -kill hostname:连接号 2.写入: #vncserver 出现: New linux.com:1 (root) desktop is South.redflag-linux.com:1 Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/South.redflag-linux.com:1.log 3.编辑文件: #vi /root/.vnc/xstsrtup 内容如下: !/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" &
gnome - session & 4.重启VNC: #sudo /sbin/service vncserver restart 5.杀掉以前的连接号: #vncserver -kill hostname:连接号 6启动vnc连接号: #vncserver 7客户端重新连接,例如:ip+连接号 就可以看到linux桌面. 注意了,在上面修改了文件以后,一定要重启VNC服务,然后把以前所有的连接号杀掉,然后开启新的连接号.这时客户端才可以看到 linux桌面!
本文出自 “菜鸟网络工程师” 博客,谢绝转载!
感谢 sjhf.cublog.cn 相关阅读 更多 +