<body> <!-- www.mybloglog.com --> <script type='text/javascript' src='http://track3.mybloglog.com/js/jsserv.php?mblID=2008020909412660'></script> <!-- www.mybloglog.com -->

Unix command | Unix administrator

Unix | Linux | Solaris | Hp-Ux | Xen ... what the fsck, is sar. Why not use vmstat. Is prstat better than top? Bash, korn, c shell, sea shell? root passwd shadow, su - ssp. Time to mount the nfs and starts with UNIX hosting, much more easier on Linux hosting.

Using VNC on Linux Server

Tuesday, February 12, 2008

VNC is a well known tools, it’s widely use in Linux and Windows environments. Recently I have a problem accessing my Linux server using VNC sessions. I have forgotten the password, the only way I know to reset the VNC session password is thru GUI unfortunately the server is not located at the same place as I am.

Follow the steps below, some workaround I use to reset VNC session password and also reset VNC connection.

1. Change / create new VNC password
# vncpasswd

2. Starts the VNC server
# vncserver

Example of the output as below …
SUSE:~ # vncserver
New 'X' desktop is SUSE:2

Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/SUSE:2.log

3. Try login in with VNC viewer using hostname/ip address followed by the display number, in this case its suse:2


4. An xTerminal will be displayed as below, but this is not the session we want to use. Follow steps 5 to get the proper sessions …


5. Stops the vncserver. Our VNC server is currently running on display 2.
# vncserver -kill :2

6. Edit the xstartup file. The file is located at /root/.vnc/. Before your start editing the files, please backup the original file, and include the following lines into the xstartup file

#!/bin/sh

#xrdb $HOME/.Xresources
#xsetroot -solid grey
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &

# 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" &
startx &

7. Start the vncserver
# vncserver

Test login to the server with VNC viewer, you’ll see a different and useful layout as below


8. To check if there is a vnc services running …
# ps -ef | grep Xvnc

Labels: ,

posted by MML, 8:36 PM | link | 0 comments |