windows通过VNC连接Ubuntu
1.
#下载安装vnc服务
sudo apt-get install vnc4server
2.
#生成密码文件,远程连接时用到
#或者在第一次运行vnc4server时生成密码
vnc4passwd
3.
#修改/root/.vnc/xstartup
#注释掉除[开头的内容
#在最后加上下面一行,不然看不到图形界面
gnome-session &
4.
#修改/etc/X11/xinit/xinitrc文件,使其可执行
sudo chmod 755 /etc/X11/xinit/xinitrc
5.
#运行vnc4server
vnc4server
#出现类似以下提示:
New '主机名:1 (root)' desktop is 主机名:1
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/主机名:1.log
6.
#这是可以在Windows里运行vncviewer连接ubuntu
#在vnc server里填:IP:1
#后面的数字1为在第5步时看的到主机名:1
#连接时让输入的密码是在第2步设置的密码