vnc4server下载地址
需要的安装包
vnc4-common_4.1.1 xorg1.0.2-0ubuntu7_amd64.deb xbase-clients_7.3 10ubuntu10_all.deb
vnc4server_4.1.1 xorg1.0.2-0ubuntu7_amd64.deb xvnc4viewer_4.1.1 xorg1.0.2-0ubuntu7_amd64.deb
使用dpkg -i 安装deb包。
安装成功后,设置vncpasswd密码
:~# vncpasswd
Password:
Verify:
修改vncserver配置文件
vim /etc/sysconfig/vncservers
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768 -nolisten tcp -nohttpd -localhost"
启动vncserver
#vncserver
会生成
New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost.localdomain:1.log
这几个文件
成功后修改.vnc/xstartup(vnc4server 默认使用窗口管理器为twm)
vim /root/.vnc/xstartup
修改文件为(在文件里注释掉 twm,然后在末尾加上gnome-session &)
#!/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 &
gnome-session &
阅读(3701) | 评论(0) | 转发(0) |