使用VNCServer

通过VNCServer,可以远程使用桌面,而不用老是对着黑漆漆的tty。安装步骤如下:

安装vnc4server
haifeng@Tek-life:~$ sudo apt-get install vnc4server

然后配置vncserver
haifeng@Tek-life:~$ vim .vnc/xstartup
1 #!/bin/sh
2
3 # Uncomment the following two lines for normal desktop:
4 unset SESSION_MANAGER
5 # exec /etc/X11/xinit/xinitrc
6
7 #[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
8 #[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
9 xsetroot -solid grey
10 #vncconfig -iconic &
11 x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
12 exec /etc/X11/xinit/xinitrc
13 #x-window-manager &
14 #gnome-session &

好了,配置结束
创建密码
haifeng@Tek-life:~$ vncpasswd
Password:
Verify:
然后,开个VNC服务
haifeng@Tek-life:~$ vncserver :20
xauth: /var/run/gdm/auth-for-haifeng-OFLDyx/database not writable, changes will be ignored

New 'Tek-life:20 (haifeng)' desktop is Tek-life:20

Starting applications specified in /home/haifeng/.vnc/xstartup
Log file is /home/haifeng/.vnc/Tek-life:20.log
这样,其他用户登录的时候,就用:
vncserver ip :20
比如,我的IP是192.168.205.110,那么用vncview登录时候,就填入:
192.168.205.110:20
然后密码就填刚才vncpasswd时设定的密码。
如果要想关闭,很简单:
haifeng@Tek-life:~$ vncserver -kill :20
就OK了。
截个屏:


Enjoy it!

评论

此博客中的热门博文

Linux/ARM Page Table Entry 属性设置分析

提交了30次才AC ---【附】POJ 2488解题报告

笔记