Set up Linux as a kiosk - just starting up Firefox

Q I finally got a half-decent machine that runs Ubuntu. My girlfriend won't touch a computer unless it runs Windows XP, so it's dual booting. I read ages ago about kiosk machines that would load Firefox on startup then shut down when Firefox was closed. Can I do this with a virtual machine, and how difficult is it likely to be? I'd like her to put in her username and password at the GDM screen (made to look XP-ish) and when she logs in it loads up an XP VM to her desktop with nothing else, not even panels, loaded with it. I'd then like the machine to shut down when she tells the XP VM to do so. She won't be keen on the whole 'shut down Windows, then shut down Ubuntu' because she's often in a hurry.

A This is possible with both VirtualBox and VMware Workstation. To do it with VirtualBox, first create the VM as normal and make sure everything works. Then test that you can run it from the command line with

VBoxSDL -fullscreen -vm "VM name"

The name is the name shown in the list of VMs in the VirtualBox GUI - there's no need for a path. This should start up your Windows XP virtual machine and return to the command line when you shut down Windows. Now you need to have it do this automatically when the user logs in. The first step, if you haven't already done so, is to create a user from the System > Administration > Users And Groups menu item. As you're running the virtual machine full-screen, there's no need for anything more than the most minimal of window managers underneath - you certainly don't want anything as heavyweight as Gnome running when Windows will want so much of your memory. My favourite for this is EvilWM, which you can install through Synaptic. Then create the file .xsession in the user's home directory, containing this

#!/usr/bin/env bash
/usr/bin/evilwm &
sleep 3
exec VBoxSDL -fullscreen -vm "VM name"

Log out and type the other user's login name into GDM. Before you give the password, click on the menu at the bottom-left to call up the Sessions window. Select 'Xclient Script' and click the Make Default button when asked. Now, whenever that user logs in, the .xsession file will run, starting VirtualBox full-screen as if they've logged into Windows. When they shut down Windows, VBoxSDL will exit, and the .xsession file will finish, returning you to the GDM login screen.

Back to the list