[桌面系统]
超快速搞定linux的vnc 网贴
在linux下使用vnc的机会也不多,也就是几个数据库的安装,自从学会了在命令行下安装Oracle之后,更是将之忘记得一干二净,近来搞DB2又不得不把它捣鼓起vnc了。01 [root@test01 db2]# vncserver
02
03 You will require a password to access your desktops.
04
05 Password:
06 Verify:
07 xauth: creating new authority file /root/.Xauthority
08
09 New 'test01:1 (root)' desktop is test01:1
10
11 Creating default startup script /root/.vnc/xstartup
12 Starting applications specified in /root/.vnc/xstartup
13 Log file is /root/.vnc/test01:1.log
14
15 [root@test01 db2]# cd ~/.vnc/
16 [root@test01 .vnc]# ls
17 passwd test01:1.log test01:1.pid xstartup
18 [root@test01 .vnc]# vim xstartup
19 [root@test01 .vnc]# pwd
20 /root/.vnc
21 [root@test01 .vnc]# vim xstartup
22 # 修改 xstartup
23 [root@test01 .vnc]# cat xstartup
24 #!/bin/sh
25
26 # Uncomment the following two lines for normal desktop:
27 # unset SESSION_MANAGER
28 # exec /etc/X11/xinit/xinitrc
29
30 [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
31 [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
32 xsetroot -solid grey
33 vncconfig -iconic &
34 xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
35 # twm & # 注释这一行
36 gnome-session& # 添加这一行
37
38 [root@test01 db2]# vncserver -kill :1
39 [root@test01 db2]# vncserver复制代码