1. find
[]$ find .-name vnc*
vnc-4.1.2-14.el5_5.4.x86_64.rpm
vnc-server-4.1.2-14.el5_5.4.x86_64.rpm
2. install
[]$ rpm -Uvh vnc-server-4.1.2-14.el5_5.4.x86_64.rpm
3. configure
edit /home/.vnc/xstartup
----- example for gnome ------------------------------
#!/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 &
startx
----------------------------------------------------------------
edit
/etc/sysconfig/vncservers
-------------------------------------------------------------
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:oracle"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 32"
-------------------------------------------------------------
4. start
vncserver
-- set password when start first time
-- or set passwd running
vncpasswd
5. start and stop
/sbin/service vncserver start
/sbin/service vncserver stop
6. use via http
in browser
http://server_name:port (http://192.168.1.1:5801)
7. use on remote pc (linux)
export DISPLAY=1:
vncviewer server_name:port (192.168.1.1:5901)
[]$ find .-name vnc*
vnc-4.1.2-14.el5_5.4.x86_64.rpm
vnc-server-4.1.2-14.el5_5.4.x86_64.rpm
2. install
[]$ rpm -Uvh vnc-server-4.1.2-14.el5_5.4.x86_64.rpm
3. configure
edit /home/.vnc/xstartup
----- example for gnome ------------------------------
#!/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 &
startx
----------------------------------------------------------------
edit
/etc/sysconfig/vncservers
-------------------------------------------------------------
# The VNCSERVERS variable is a list of display:user pairs.
#
# Uncomment the lines below to start a VNC server on display :2
# as my 'myusername' (adjust this to your own). You will also
# need to set a VNC password; run 'man vncpasswd' to see how
# to do that.
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, see
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
# Use "-nohttpd" to prevent web-based VNC clients connecting.
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.
VNCSERVERS="1:oracle"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERARGS[2]="-geometry 1024x768 -depth 32"
-------------------------------------------------------------
4. start
vncserver
-- set password when start first time
-- or set passwd running
vncpasswd
5. start and stop
/sbin/service vncserver start
/sbin/service vncserver stop
6. use via http
in browser
http://server_name:port
7. use on remote pc (linux)
export DISPLAY=1:
vncviewer server_name:port (192.168.1.1:5901)
This comment has been removed by a blog administrator.
ReplyDelete