Wednesday, August 3, 2011

Installing VNC server in UBUNTU 11.04

1. sudo apt-get install vnc4server

2. vncserver -geometry 1280x1024 -depth 24

3. vncserver -kill :1

4. vi .vnc/xstartup

Note :This will open up the file we need to edit.
Scroll down to the line which currently reads #unset SESSION_MANAGER and press the [Insert] key once (this will switch us into "edit" mode) and then remove the #

Do the same for the line after that. Plus change that line to read as follows:

exec sh /etc/X11/xinit/xinitrc

Note the "sh".

Change the xterm -geometry line as below

Once you've made these changes the file should look like this:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec sh /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 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

5. vncserver -geometry 1280x1024 -depth 24

6. vncpasswd 

Try to connect the sever from vnc viewer with x.x.x.x:1 and give the password


No comments:

Post a Comment