UNIX/学生ツール/ネットワーク/VNC


Table of Contents

% setenv PATH=${PATH}:~/bin
% vncserver
% vncserver -geometry 1024x714 :1
% chmod u+x $HOME/.xinitrc
% emacs $HOME/.vnc/xstartup &
#!/usr/bin/sh
exec $HOME/.xinitrc
% chmod u+x $HOME/.vnc/xstartup
#!/usr/bin/sh
DISPLAY='localhost:1'
export DISPLAY
exec $HOME/.xinitrc
#!/usr/bin/csh
set file = `ls $HOME/.vnc/*.pid | head -1 | grep $HOST`
if ( "$file" != "" ) then
  set file = $file:r
  set file = $file:t
  set file = `echo $file | sed 's/^.*://'`
  setenv DISPLAY localhost:${file}
  sleep 1
  exec $HOME/.xinitrc >& $HOME/.vnc/error
endif

[hostname]:[display#]
[hostname]:[port#]

% vncserver -kill :[display#]
% vncpasswd
% vncviewer [hostname]:[display#]
# VNC install memo

wget http://www.realvnc.com/dist/vnc-3.3.7-sparc_solaris_2.5.tar.gz
gtar zxvf vnc-3.3.7-sparc_solaris_2.5.tar.gz
cd vnc-3.3.7-sparc_solaris_2.5/
./vncinstall /home/student/s1080134/usr/Solaris/bin/ /home/student/s1080134/usr/Solaris/man
cd ..
\rm -r vnc-3.3.7-sparc_solaris_2.5*

## installed
bin/Xvnc
bin/vncviewer
bin/vncpasswd
bin/vncconnect
bin/vncserver
man/man1/...

## The path to Xvnc is required to start-up vncserver. 
setenv PATH=${PATH}:/home/student/s1080134/usr/Solaris/bin
setenv MANPATH=${MANPATH}:/home/student/s1080134/usr/Solaris/man

% emacs ~/.cshrc
## path to /opt/sfw/bin
set OPT_SFW = "/opt/sfw/bin"
if (-r ${OPT_SFW}) then
    set path = ( $path ${OPT_SFW} )
endif
% source ~/.cshrc
% echo $path
% which Xvnc vncserver
% mkdir ~/.vnc

% cp /home/student/stdskel/.xinitrc ~/.vnc/xstartup
% chmod u+x ~/.vnc/xstartup
% ls -l ~/.vnc/xstartup
-rwx------ 1 s1000000 student 1957 May  5 01:24 /home/student/s1000000/.vnc/xstartup

[リモートホスト名]:[ポート番号]

hoge01:5901

55901

L55901 hoge01:5901

% vncserver

% vncviewer localhost:55901

% vncserver -kill :1


xrea