配置vnc遠端連線Linux和unix伺服器圖形介面安裝Oracle

eric0435發表於2012-12-10
1、配置並開啟vnc服務
[oracle@localhost ~]$ vncserver
You will require a password to access your desktops.
Password: ---這裡要求輸入vnc客戶端登入的密碼並重復
Verify:
New 'localhost.localdomain:2 (oracle)' desktop is localhost.localdomain:2
Creating default startup script. /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:2.log
----如上告訴你vnc終端已經建立好,用的是第二個終端
2、在建立vnc服務的使用者目錄下會生成一個.vnc的隱藏目錄
[oracle@localhost ~]$ ls -a
. .bash_profile Disk1 .gconfd .gstreamer-0.10 .metacity README.htm .viminfo
.. .bashrc .eggcups .gnome .gtkrc-1.2-gnome2 .mozilla .redhat .vnc
.bash_history .chewing .emacs .gnome2 .ICEauthority .nautilus .scim .Xauthority
.bash_logout Desktop .gconf .gnome2_private .kde p8202632_10205_Linux-x86-64.zip .Trash .zshrc
3、進入.vnc目錄,找到xstartup可執行檔案,用vi 編輯器開啟
[oracle@localhost ~]$ cd .vnc/
[oracle@localhost .vnc]$ ls
localhost.localdomain:2.log localhost.localdomain:2.pid passwd xstartup
[oracle@localhost .vnc]$ vi 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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
~
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
"xstartup" 12L, 333C 已寫入
[oracle@localhost .vnc]$ vncserver
New 'localhost.localdomain:3 (oracle)' desktop is localhost.localdomain:3
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:3.log
4、清除剛才建立的vnc虛擬終端
[oracle@localhost .vnc]$ vncserver -kill :1
Can't find file /home/oracle/.vnc/localhost.localdomain:1.pid
You'll have to kill the Xvnc process manually
[oracle@localhost .vnc]$ vncserver -kill :2
Killing Xvnc process ID 11889
[oracle@localhost .vnc]$ vncserver -kill :3
Killing Xvnc process ID 11945
[oracle@localhost .vnc]$ vncserver -kill :4
Can't find file /home/oracle/.vnc/localhost.localdomain:4.pid
You'll have to kill the Xvnc process manually
5、重新建立新的vnc虛擬終端
[oracle@localhost .vnc]$ vncserver
New 'localhost.localdomain:2 (oracle)' desktop is localhost.localdomain:2
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/localhost.localdomain:2.log --該終端號為 :2
6、在windows客戶端用RealVNC軟體中的Run VNC Viewer客戶端連線。
7、在Run VNC Viewer 只需輸入linux伺服器的地址和剛才生成的終端號:2
格式:192.168.1.56:2
8、輸入剛才配置vnc服務的時候配的即可登入linux伺服器圖形介面。
[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26015009/viewspace-1059909/,如需轉載,請註明出處,否則將追究法律責任。

相關文章