使用命令
vncserver :端口号
设置窗口分辨率
vncserver -geometry widthx height :port
注意这个是个x不是乘号!
结束vnc session
vncserver -kill :port
打开后,在~/.vnc 目录下有文件
xstartup
可以控制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 &
gnome-session &