Jump to content

VNC on Edubuntu 9.04 Thin Client Server


Recommended Posts

Posted

Hello All,

 

I'm trying to figure out VNC on Edubuntu. We have an Edubuntu 9.04 machine (i.e. Ubuntu 9.04 Desktop Edition with the Edubuntu add-on pack installed) acting as a thin client (LTSP) server. I have maybe a half-dozen thin clients I want to attach to this machine, which is not many. The idea is that this server will go in a classroom to provide some workstations for pupil use.

 

I want the VGA port of the server itself to be plugged in to a projector, and I want a teacher to be able to control that display via VNC. At the moment, I can log in to the Ubuntu machine and select the "share my desktop" under the "remote desktop" settings, but I already have to be logged in to the server to be able to connect via VNC - I can't use VNC to connect to the logon screen and type in my username and password to log in to the Ubuntu machine.

 

Anyone any idea how I go about getting a VNC server to run in a per-machine, show-the-physical-screen mode, as it seems to do on Windows, rather than in a per-user-session manner?

 

--

David Hicks

Posted

Hi David,

 

I've used x11vnc to get past the 'I can't use vnc until I've logged in' problem in the past, it appears to spawn a separate X session in some fairly clever way. - Might be worth a look.

 

Or,

 

There's some discussion here about making GDM allow vnc logon. Mind you, that's for fedora but I'm sure we can make it happen!

 

I have an LTSP set up here if you want me to have a nose too.

  • Thanks 1
Posted (edited)
I've used x11vnc to get past the 'I can't use vnc until I've logged in' problem in the past, it appears to spawn a separate X session in some fairly clever way.

 

Sorry, my explanation wasn't that clear. I can get a VNC server to do that - start a new X session when a user connects via VNC - but that's not what I want. I want the teacher to be able to control the display as shown from the VGA port of the server, as if they are sat at the server and typing stuff in to it. This is so that we can use VNC to let the teachers use a laptop to control what's shown on a projector attached to the VGA port of the server. Starting a new X session is snazzy, and probably exactly what's wanted in several situations, but in this case I want to be able to control a physical screen.

 

There's some discussion here about making GDM allow vnc logon. Mind you, that's for fedora but I'm sure we can make it happen!

 

I'll have a read, thanks.

 

--

David Hicks

Edited by dhicks
Posted
Does running export DISPLAY=:0 not have something to do with it?

 

Ah ha! Yes! It would seem that this is actually quite simple, in the end. Simply install X11VNC:

 

apt-get install x11vnc

 

X11VNC seems to run as a once-off application - it listens out for a client connection, services it, then when the client quits, so does the server. You need to wrap the server startup command in a bash script with an infinite loop to keep it running:

 

X11VNC needs somewhere to store its password file:

 

mkdir /root/.vnc/

 

And you need to generate its password file:

 

x11vnc -storepasswd j58UXre3 /root/.vnc/passwd

 

Then you can start the server:

 

x11vnc -rfbauth /root/.vnc/passwd -auth /var/lib/gdm/:0.Xauth -display :0

 

--

David Hicks

Posted
You can use -forever

 

Ah ha! Yes, that fixes it nicely. Now I've just to figure out why the thin clients no longer boot...

 

--

David Hicks

Posted
Now I've just to figure out why the thin clients no longer boot...

 

Right, I think I've got this figured out. Edubuntu doesn't seem to like trying to use xinetd, that's what stopped the thin clients booting, I think. But X11VNC exits on login and logout - on login because of a bug, and on exit because that seems it's just how it works. You can stop the exit-on-login with the -noxfixes option, and you can have X11VNC restart itself after it quits with the -loopbg option:

 

apt-get install x11vnc
mkdir /root/.vnc/
x11vnc -storepasswd j78HRrq1 /root/.vnc/passwd

 

Edit /etc/rc.local, add the line:

sleep 5
/usr/bin/x11vnc -o /var/log/x11vnc.log -rfbauth /root/.vnc/passwd -auth /var/lib/gdm/:0.Xauth -display :0 -noxfixes -loopbg -forever

 

Edit BOTH /etc/gdm/gdm.conf-custom and /etc/gdm/gdm.conf, and in the [daemon] section, make sure you have the line:

KillInitClients=false

 

Reboot, you should be able to VNC in to the physical display of the server machine. The "j78HRrq1" value given above is a randomly-generated password string - UltraVNC Viewer seems to be the only Windows VNC viewer that actually lets you specify a password string on the command line.

 

--

David Hicks

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...