ubuntu11.04安装vnc server

1. 下载并安装vnc server
sudo apt-get install vnc4server

2. 设定vnc server的访问密码
vncpasswd

3. 设置配置文件使vnc server启动的是桌面而不是shell
3.1 更改文件~/.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 &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &


3.2 增加文件/etc/X11/xinit/xinitrc的执行属性:
chmod 755 /etc/X11/xinit/xinitrc

4. 运行vnc server
vncserver

你可能感兴趣的:(linux,vncserver,vnc,ubuntu11.04)