5516.6 VNC Server Setup

apt-get install xinetd
#apt-get install vnc4server xinetd

The ubuntu 8.04 vnc4server was 4.1.1 at time of writing and is too slow.

See the bottom for the alternative.

vncviewer :52 is the command to use where 52 is the port set up

To get the screen to look right on the client desktop it is necessary to have the right vnc server settings for the screen resolution of the client.

For a screen resolution on the client of 1024 x 768 which is the minimun setup for Muli the vnc settings on the server need to have window geometry of 1008 x 700

We need to ensure the following are in /etc/services somewhere.

vnc
vncshared
vncwide

5952/tcp
5951/tcp
5950/tcp

#vnc
#vncshared
#vncwide

The xinetd server has a file that stores the setting for a session. We can have a different set of settings for different ports. The settings are store in the file /etc/xinetd.d/vnc

For dapper (Ubuntu 6.06 LTS)

service vnc {

socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -securitytypes=none
-geometry 1008x700 -depth 16 -fp
/usr/share/X11/fonts/misc,/usr/share/X11/fonts/75dpi,/usr/share/X11/fonts/100dpi
disable = no
}

For hardy (Ubuntu 8.04 LTS)

service vnc {

socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query 127.0.0.1 -once -securitytypes=none -geometry 1008x700 -depth 16 -extension XFIXES -fp
/usr/share/fonts/X11/misc,/usr/share/fonts/X11/75dpi,/usr/share/fonts/X11/100dpi
disable = no
}

Copy the above to vncwide and change the service to vncwide and the geometry to 1280x768 and disable=yes

In addition to this, we can enable one DEMO/TRAINING session which can be accessed as a shared screen. Copy the /etc/xinetd.d/vnc file to /etc/xinetd.d/vncshared then change the 'wait = no' parameter to 'wait = yes'. This will mean that if you leave the session logged in other people can connect to it without a password. Alternately you can add '-passwordFile /home/mulisu/.vnc/passwd' to the end of the server_args line. Then login as mulisu and issue the command 'vncpasswd' and then 'chmod 644 /home/mulisu/.vnc/passwd' When this feature is not in use change the 'disable = no' to 'disable = yes' If you run the vncpasswd command you also have to re-run the chmod command.

For Dapper

service vncshared {

socket_type = stream
protocol = tcp
wait = yes
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -once -securitytypes=none
-geometry 1008x700 -depth 16 -fp
/usr/share/X11/fonts/misc,/usr/share/X11/fonts/75dpi,/usr/share/X11/fonts/100dpi -passwordFile
/home/mulisu/.vnc/passwd
disable = yes
}

For hardy (Ubuntu 8.04 LTS)

service vncshared {

socket_type = stream
protocol = tcp
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query 127.0.0.1 -once -securitytypes=none -geometry 1008x700 -depth 16 -extension XFIXES
/usr/share/fonts/X11/misc,/usr/share/fonts/X11/75dpi,/usr/share/fonts/X11/100dpi
disable = no
}

If you change any settings in the vnc file then you need to restart the vnc server This is done with the command

/etc/init.d/xinetd restart

We also need to adjust the /etc/gdm/gdm.conf file. Find the [xdmcp] paragraph and "Enable=true" set . Now restart the gdm process with

/etc/init.d/gdm restart

At this point you should be able to connect to VNC screen 52 (or 53) to login. Note that editing gdm.conf-custom seems to have no effect.

BUGS: check the /etc/default/xinetd has inetd compatability mode set to "No" If you don't then it'll only allow a SINGLE SESSION at a time.

BUGS: As at May 6, 2008 Ubuntu installs vnc4server 4.1.1 which is too slow. Instead we install the Fedora 8 RPM's. For convenience Grant has the .deb files on dev:/home/parngr/ so you don't have to install alien on every workstation.

apt-get remove vnc4server vnc4-common xvnc4viewer
alien --to-deb vnc-4.1.2-23.fc8.i386.rpm
alien --to-deb vnc-libs-4.1.2-23.fc8.i386.rpm
alien --to-deb vnc-server-4.1.2-23.fc8.i386.rpm
scp user@dev:/home/parngr/vnc*deb .
dpkg -i vnc-libs_4.1.2-24_i386.deb
dpkg -i vnc_4.1.2-24_i386.deb
dpkg -i vnc-server_4.1.2-24_i386.deb

Check that all the services are listening with

netstat -ln|egrep ":59|:177"

which shows you 3 lines like this:-

tcp
tcp
udp6

0
0
0

0.0.0.0:5951
0.0.0.0:5952
0 :::177

0.0.0.0:*
0.0.0.0:*
:::*

LISTEN
LISTEN
 

If you enabled vncwide there's also be a line for port 5950. If you disabled vncshared then 5951 won't be there.

Now login.

#!/bin/bash ((server=`id -u`-500)) /usr/bin/X11/vncserver :${server} -geometry 1024x768 -deferupdate 0 echo "your server to connect the viewer to is :${server}" echo "[Press Return]" read a exit

ABOUT MULI | PRIVACY | CONTACT | TERMS OF USE | LINKS | SITE MAP | Creative Commons License