$ vncserver -geometry 1024x768 :1
2. 윈도우 관리자
$ vi ~/.vnc/xstartup
#!/bin/sh
PATH=$PATH:/usr/dt/bin
LANG=C
if [ -f /usr/dt/bin/Xsession ]
then
export XSTATION=1 DTXSERVERLOCATION=local
Xsession
else
xrdb $HOME/.Xdefaults
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
mwm &
fi
3. Auto Startup at Logon
# Check VNC Server and Start
echo "Check VNC Server Process"
if [ `ps -fu $USER | grep "Xvnc :1 -desktop X" | grep -v grep | wc | awk -F' ' '{print $1}'` -ne 1 ]; then
echo " VNC Server is not Started. Starting VNC Server Process..."
vncserver :1 > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo " VNC Server cannot be started. Start VNC Server to manually."
else
echo " VNC Server Start successfully."
export DISPLAY=`hostname`:1
xhost + > /dev/null
fi
else
echo " VNC Server is already Started."
fi
# Check VNC Server and Start
echo "Check VNC Server Process"
if [ `ps -fu $USER | grep "Xvnc :1 -desktop X" | grep -v grep | wc | awk -F' ' '{print $1}'` -ne 1 ]; then
echo " VNC Server is not Started. Starting VNC Server Process..."
vncserver :1 > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo " VNC Server cannot be started. Start VNC Server to manually."
else
echo " VNC Server Start successfully."
export DISPLAY=`hostname`:1
xhost + > /dev/null
fi
else
echo " VNC Server is already Started."
fi
댓글 없음:
댓글 쓰기