9

I have made a clean install of Ubuntu 14.04 LTS Desktop and now want's to convert it into a kiosk with a full screen webbrowser.

This was previously done in 10.04 and worked perfect, but due to hardware changes (graphics) we are forced to use version 14.04.

I have created a kiosk.desktop in /usr/share/xsessions and a shell script called kiosk.sh that launches firefox with r-kiosk installed. The shell script is executable. A user called "kiosk" is set to autologin (in /etc/lightdm/lightdm.conf).

But now i'm stuck. I'm want the kiosk.sh to be run when the kiosk user session is started.

In previous versions this could be done in the GUI tool "Login Screen Settings" or in /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf.

I have changed 50-ubuntu.conf to "user-session=kiosk" but it doesn't start. The "Login Screen Settings" tool can't be found. Has it been replaced by another utility in 14.04?

Placing a kiosk.sh.desktop in ~/kiosk/.config/autostart works, but the gnome-desktop is shown before firefox starts in fullscreen mode making it possible for the users to interact with the desktop.

What is to correct/best way to start firefox in fullscreen after user autologin?

Thanks

Thomas

0
7

I'd personally side-step all the lightdm and Xsession stuff and just launch my own instance of X that just started Firefox. Sounds nightmarish but it's really simple with a little Upstart script

start on (filesystem and stopped udevtrigger)
stop on runlevel [06]

console output
emits starting-x

respawn

exec sudo -u thomas startx /etc/X11/Xsession /path/to/kiosk.sh --

Obviously change the username to whatever user you want to run this as, but that's pretty much it. Save that as /etc/init/x.conf and then you should be able to sudo start x and you're away (it'll load at boot). If Firefox crashes, it'll reload X with a new instance.

If you've got a full-blown Ubuntu install sitting there, you might have to disable LightDM first with:

sudo stop lightdm
echo manual | sudo tee /etc/init/lightdm.override

And your Firefox profile is completely up to you. You might even want to script in some profile-restoration so that if somebody does break your profile, you just need to restart your x service and it'll be using the clean copy again. Just an idea.

I've since written a blog post on creating a Kiosk from scratch with 14.04 and Chrome.


For your wireless configuration problem, I'd suggest keeping as much of this away from casual users. You could set up a connection using a TTY fairly simply:

sudo nmcli dev wifi con <SSID> password <password>

That should add the connection to the system and connect (and auto-connect in the future) but I haven't tested it. It might not even need the sudo but that all depends on what privileges your main user has.

The simple benefit over loading something else in the background here is that there's no chance some passer-by is going to have access to a graphical network settings dialogue. It does require the operator to be able to follow instructions.

If they can't handle that, you could fairly easily modify your kiosk.sh to look for existing connections and ask some zenity-questions that feed into the previous nmcli command:

if [[ $(nmcli con | wc -l) == 1 ]]; then
    SSID=$(zenity ...)
    PASS=$(zenity ...)
    nmcli dev wifi con $SSID password $PASS
fi

That's just a rough idea. You'll need to work on that. There may be a better standalone graphical network-manager configuration application.

4
  • 1
    Thank you, it works great and the pc is more responsive.
    – Thomas
    Jul 2 '14 at 18:34
  • However I would like to show the login-screen to enable the IT personal to login to the lightdm, as they need to setup wifi connection on first use. Any ideas?
    – Thomas
    Jul 2 '14 at 18:36
  • 1
    @Thomas Okay now we're getting interesting... I've added a block on this.
    – Oli
    Jul 2 '14 at 20:46
  • 1
    Great solution. Added to kiosk.sh and zenity works, but somehow the wifi does not connect. It's properly due to the user privileges. However I decided that it would be better not to default the wifi connection answer as some clients don't use wifi. The result is that firefox is started without wifi connection and if the client want's to use wifi they have to do Ctrl+Alt+F1 and run af wifi.sh that ask for the wifi name/pwd and connects. Thanks you for all your help - I really appreciate it.
    – Thomas
    Jul 3 '14 at 10:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.