143 vnc
参考:http://blog.csdn.net/gubenpeiyuan/article/details/7892651
在本地安装 Remote Desktop Viewer 或 remmina
Protocol选择:VNC-Virtual Network Computing
1、首先在本地执行 xrandr 命令获取当前分辨率,
例如:1280 x 1024
2、在服务器上执行vnc4server -geometry 1280x1024
3、将生成的xstarup文件做如下修改:
//源文件 /home/username/.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 &
//更改后文件
#!/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 & #xcutsel &
4、根据命令运行结果的端口号,例如:1
执行:
vnc4server -kill :1
5、执行:
vnc4server -geometry 1280x1024 :1
6、本地图形界面配置如下:
//2014 - 1 - 6 问题:error in locking authority file 解决方法:rm .Xauthority vnc4server - geometry 1280 * 1024