| 導購 | 订阅 | 在线投稿
分享
 
 
 

HP-UX11i下安裝VNC

2008-05-18 23:55:18  編輯來源:互聯網  简体版  手機版  移動版  評論  字體: ||

下載地址 http://www.realvnc.com/download.html

VNC Free Edition for HP-UX 11/11i (PA-RISC) Version 4.1.1

GZipped Depot (1.7M) 這個最小

安裝:

[quote:fd5d2e0ce1]# cd /tmp

# gunzip vnc-4_1_1-parisc_hpux.depot.gz

# swinstall -s /tmp/vnc-4_1_1-parisc_hpux.depot[/quote:fd5d2e0ce1]

安裝好後需要把/usr/local/bin加到PATH環境變量中,修改/etc/PATH即可

切換到你用來運行vncserver的用戶,假設是user1

[quote:fd5d2e0ce1]# su - user1[/quote:fd5d2e0ce1]

設置連接密碼

[quote:fd5d2e0ce1]$ vncpasswd

Password:

Verify:[/quote:fd5d2e0ce1]

切回root用戶,啓動vncserver

[quote:fd5d2e0ce1]# vncserver :3[/quote:fd5d2e0ce1]

用windows下的vnc客戶端連接服務器的5903端口,應該可以連上了!但現在只是一個x終端,不是CDE的界面。下面來設置用CDE的界面

停止vnc服務

[quote:fd5d2e0ce1]# vncserver -kill :3[/quote:fd5d2e0ce1]

先修改user1的xstartup文件

[quote:fd5d2e0ce1]# vi /home/user1/.vnc/xstartup[/quote:fd5d2e0ce1]

原來的內容:

[quote:fd5d2e0ce1]#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

xsetroot -solid grey

vncconfig -iconic &

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

twm &

[/quote:fd5d2e0ce1]

修改成這樣:

[quote:fd5d2e0ce1]#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

#xsetroot -solid grey

vncconfig -iconic &

#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

#twm &[/quote:fd5d2e0ce1]

在啓動vnc,需要用query選項

[quote:fd5d2e0ce1]# vncserver :3 -query localhost[/quote:fd5d2e0ce1]

再用vnc客戶端連,應該是CDE界面了,不過字體似乎有些問題。可以這樣解決:

需要啓動x font server

修改/etc/rc.config.d/xfs

把RUN_X_FONT_SERVER=0

改成RUN_X_FONT_SERVER=1

然後,啓動xfs服務

[quote:fd5d2e0ce1]# /sbin/init.d/xfs start[/quote:fd5d2e0ce1]

重新啓動vnc服務,這回需要fp選項

[quote:fd5d2e0ce1]# vncserver -kill :3

# vncserver :3 -query localhost -fp tcp/localhost:7000[/quote:fd5d2e0ce1]

設置機器重啓時自動啓動vnc服務

在/etc/rc.config.d下新建文件vncservers,內容如下:

[quote:fd5d2e0ce1]VNCSERVERS="3:user1"

VNCSERVERARGS[3]="-geometry 800x600 -query localhost -fp tcp/localhost:7000"[/quote:fd5d2e0ce1]

在/sbin/init.d下新建文件vncserver,內容如下:

[code:1:fd5d2e0ce1]#!/sbin/sh

#

# vncserver startup: Startup and kill script for the VNC server

#

PATH=i/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/bin/X11:/usr

/contrib/bin/X11:/o

pt/graphics/common/bin:/usr/local/bin

export PATH

VNCSERVERS=""

[ -f /etc/rc.config.d/vncservers ] && . /etc/rc.config.d/vncservers

prog="VNC server"

# See how we were called.

case "$1" in

start)

echo "Starting $prog: \c"

/usr/bin/ulimit -S -c 0 >/dev/null 2>&1

RETVAL=0

for display in ${VNCSERVERS}

do

echo "${display}"

DISP="${display%%:*}"

USER="${display##*:}"

VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"

/usr/bin/su ${USER} -c "cd ~${USER} && export HOME=~${USER} && [ -f

.vnc/passwd ] && /usr/local/bin/vncserver :${DISP} ${VNCUSERARGS}"

RETVAL=$?

[ "$RETVAL" -ne 0 ] && break

done

[ "$RETVAL" -eq 0 ] && touch /var/tmp/vncserver

;;

stop)

echo "Shutting down $prog: \c"

for display in ${VNCSERVERS}

do

echo "${display}"

DISP="${display%%:*}"

USER="${display##*:}"

/usr/bin/su ${USER} -c "export HOME=~${USER} && /usr/local/bin/vncserver -

kill :${DISP}" >/dev/null 2>&1

done

RETVAL=$?

[ "$RETVAL" -eq 0 ] && rm -f /var/tmp/vncserver

;;

*)

echo $"Usage: $0 {start|stop}"

exit 1

esac

exit 0

[/code:1:fd5d2e0ce1]

然後,加上執行權限,建到rc3.d和rc2.d的軟鏈接

[quote:fd5d2e0ce1]# chmod +x vncserver

# ln -s /sbin/init.d/vncserver /sbin/rc3.d/S999vncserver

# ln -s /sbin/init.d/vncserver /sbin/rc2.d/K100vncserver[/quote:fd5d2e0ce1]

Ref:

http://www.realvnc.com/pipermail/vnc-list/2002-March/028698.html

http://docs.hp.com/zh_tw/5187-0723/ch01s01.html

  下載地址 http://www.realvnc.com/download.html   VNC Free Edition for HP-UX 11/11i (PA-RISC) Version 4.1.1   GZipped Depot (1.7M) 這個最小   安裝:   [quote:fd5d2e0ce1]# cd /tmp   # gunzip vnc-4_1_1-parisc_hpux.depot.gz   # swinstall -s /tmp/vnc-4_1_1-parisc_hpux.depot[/quote:fd5d2e0ce1]   安裝好後需要把/usr/local/bin加到PATH環境變量中,修改/etc/PATH即可   切換到你用來運行vncserver的用戶,假設是user1   [quote:fd5d2e0ce1]# su - user1[/quote:fd5d2e0ce1]   設置連接密碼   [quote:fd5d2e0ce1]$ vncpasswd   Password:   Verify:[/quote:fd5d2e0ce1]   切回root用戶,啓動vncserver   [quote:fd5d2e0ce1]# vncserver :3[/quote:fd5d2e0ce1]   用windows下的vnc客戶端連接服務器的5903端口,應該可以連上了!但現在只是一個x終端,不是CDE的界面。下面來設置用CDE的界面   停止vnc服務   [quote:fd5d2e0ce1]# vncserver -kill :3[/quote:fd5d2e0ce1]   先修改user1的xstartup文件   [quote:fd5d2e0ce1]# vi /home/user1/.vnc/xstartup[/quote:fd5d2e0ce1]   原來的內容:   [quote:fd5d2e0ce1]#!/bin/sh   [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources   xsetroot -solid grey   vncconfig -iconic &   xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &   twm &   [/quote:fd5d2e0ce1]   修改成這樣:   [quote:fd5d2e0ce1]#!/bin/sh   [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources   #xsetroot -solid grey   vncconfig -iconic &   #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &   #twm &[/quote:fd5d2e0ce1]   在啓動vnc,需要用query選項   [quote:fd5d2e0ce1]# vncserver :3 -query localhost[/quote:fd5d2e0ce1]   再用vnc客戶端連,應該是CDE界面了,不過字體似乎有些問題。可以這樣解決:   需要啓動x font server   修改/etc/rc.config.d/xfs   把RUN_X_FONT_SERVER=0   改成RUN_X_FONT_SERVER=1   然後,啓動xfs服務   [quote:fd5d2e0ce1]# /sbin/init.d/xfs start[/quote:fd5d2e0ce1]   重新啓動vnc服務,這回需要fp選項   [quote:fd5d2e0ce1]# vncserver -kill :3   # vncserver :3 -query localhost -fp tcp/localhost:7000[/quote:fd5d2e0ce1]   設置機器重啓時自動啓動vnc服務   在/etc/rc.config.d下新建文件vncservers,內容如下:   [quote:fd5d2e0ce1]VNCSERVERS="3:user1"   VNCSERVERARGS[3]="-geometry 800x600 -query localhost -fp tcp/localhost:7000"[/quote:fd5d2e0ce1]   在/sbin/init.d下新建文件vncserver,內容如下:   [code:1:fd5d2e0ce1]#!/sbin/sh   #   # vncserver startup: Startup and kill script for the VNC server   #   PATH=i/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/bin/X11:/usr   /contrib/bin/X11:/o   pt/graphics/common/bin:/usr/local/bin   export PATH   VNCSERVERS=""   [ -f /etc/rc.config.d/vncservers ] && . /etc/rc.config.d/vncservers   prog="VNC server"   # See how we were called.   case "$1" in   start)   echo "Starting $prog: \c"   /usr/bin/ulimit -S -c 0 >/dev/null 2>&1   RETVAL=0   for display in ${VNCSERVERS}   do   echo "${display}"   DISP="${display%%:*}"   USER="${display##*:}"   VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"   /usr/bin/su ${USER} -c "cd ~${USER} && export HOME=~${USER} && [ -f   .vnc/passwd ] && /usr/local/bin/vncserver :${DISP} ${VNCUSERARGS}"   RETVAL=$?   [ "$RETVAL" -ne 0 ] && break   done   [ "$RETVAL" -eq 0 ] && touch /var/tmp/vncserver   ;;   stop)   echo "Shutting down $prog: \c"   for display in ${VNCSERVERS}   do   echo "${display}"   DISP="${display%%:*}"   USER="${display##*:}"   /usr/bin/su ${USER} -c "export HOME=~${USER} && /usr/local/bin/vncserver -   kill :${DISP}" >/dev/null 2>&1   done   RETVAL=$?   [ "$RETVAL" -eq 0 ] && rm -f /var/tmp/vncserver   ;;   *)   echo $"Usage: $0 {start|stop}"   exit 1   esac   exit 0   [/code:1:fd5d2e0ce1]   然後,加上執行權限,建到rc3.d和rc2.d的軟鏈接   [quote:fd5d2e0ce1]# chmod +x vncserver   # ln -s /sbin/init.d/vncserver /sbin/rc3.d/S999vncserver   # ln -s /sbin/init.d/vncserver /sbin/rc2.d/K100vncserver[/quote:fd5d2e0ce1]   Ref:   http://www.realvnc.com/pipermail/vnc-list/2002-March/028698.html   http://docs.hp.com/zh_tw/5187-0723/ch01s01.html
󰈣󰈤
王朝萬家燈火計劃
期待原創作者加盟
 
 
 
>>返回首頁<<
 
 
 
 
 熱帖排行
 
王朝網路微信公眾號
微信掃碼關註本站公眾號 wangchaonetcn
 
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有