Setting Up Ubuntu as a Kiosk Web Appliance by natrinicle
Featured
At work we have the frequent need for a machine that will allow students to access the internet without having full access to a computer.  To accomplish this task we previously resorted to creating AutoHotKey scripts on a Windows XP machine.  Many of the students and the staff who monitored these computers took issue with the computer's slow boot and running speed.  To cope with this we started to explore alternatives to Windows.  This is where we combined Ubuntu (a fast operating system) with Chromium-browser (one of the fastest browsers).  Now we have really old machines running as web kiosks that boot in 20 seconds or less and are very responsive to clicks, typing, and even flash videos and animations.

Follow the steps in this Instructable to set up Ubuntu, and Chromium if you haven't already.

Some potential uses for this type of system:
    * Web Kiosk
    * Information Booth
    * Subsonic Guest Interface
    * X10 House Control
 
Remove these adsRemove these ads by Signing Up

Step 1: Add XScreensaver & Ubuntu Restricted Extras

On our systems we found that even LCD monitors got burnt in after time.  They are not supposed to be able to do this, but they were.  To remedy this, we tried to get the default screensavers to come up.  They were not great at running from a script.  Instead the best option for this is to install the xscreensaver packages.  I like to do this from the command line so click Applications, highlight Accessories, and click Terminal.  From there enter the command "sudo apt-get install xscreensav* -y" without the quotation marks.  The asterisk at the end allows aptitude to install all of the packages that start with xscreensav, thus installing all the additional screensavers available.
If you will be using flash you will need to install the plugin for it.  The best way I've found to do this is similar to adding xscreensaver.  In the terminal window enter "sudo apt-get isntall ubuntu-restricted-extras -y".  Once this is done close the Terminal window.
1-40 of 151Next »
chuydb says: Mar 5, 2013. 1:09 PM
Made it back by runnig a terminal...then

sudo nano /etc/lightdm/lightdm.conf

and deleting the autologin user line.
natrinicle (author) says: Mar 5, 2013. 2:07 PM
Excellent! Glad you figured it out. Thanks for posting the answer!
balno says: May 3, 2013. 3:48 PM
(removed by author or community request)
balno says: May 2, 2013. 2:51 PM
Great instructable. I've recently installed some computers as described in our local library and it works like a charm ! Thanks thanks thanks ! By the way, the part of the script used for setting the initial window size didn't work here, I used this one instead :

-------------------------------------------------------------------------------------------------------------
#!/bin/bash

# we get screen resolution

res=$(xrandr -q | awk -F'current' -F',' 'NR==1 {gsub("( |current)","");print $2}')
resx=$(echo $res | awk '{split($0,array,"x")} END{print array[1]}')
resy=$(echo $res | awk '{split($0,array,"x")} END{print array[2]}')

# starting xscreensaver

xscreensaver -nosplash &

while true;
        do chromium-browser %u --incognito --window-size=$resx,$resy
        sleep 5s;
done




--------------------------------------------------------------------------------------------------------------
Thanks again for the good work.

François. (Agneaux. France)
balno says: May 2, 2013. 3:09 PM
as you can see, window size isn't saved anywhere here, it is set by a flag on the command line used to run chromium.
natrinicle (author) says: May 2, 2013. 3:43 PM
Beautiful code! Thanks for the update on that!
scottdn says: Apr 15, 2013. 8:27 AM
Excellent instructable. I was successful in configuring everything and the Kiosk is working as expected except for one minor issue. While in the kiosk the mouse pointer displays a black X as opposed to a white pointer. What is causing this and how can it be resolved?
natrinicle (author) says: Apr 15, 2013. 2:33 PM
That's the default X Cursor, it looks like you can change it by following the instructions Beastie explains here: http://forums.freebsd.org/showthread.php?t=27920
ghostbust555 says: Apr 12, 2013. 1:31 PM
Like the instructable but what in the world made you think lcd screens would not burn in????
natrinicle (author) says: Apr 12, 2013. 2:14 PM
I accounted for that, hence the xscreensaver installation and portion of the script.
noob2ub says: Apr 9, 2013. 1:04 PM
Does anyone know the correct way to get my kiosk screen to go full screen? I tried many of the methods on this site and I still have a 1/2 inch of uncovered screen at the bottom of my kiosk. My settings are 1000 bottom and 1280 right. Any help is greatly appreciated.
nmartin12 says: Apr 3, 2013. 8:26 PM
I GOT IT!!!! Once logged into kiosk I navigated in the file browser to the files I created and executed kiosk.desktop. Now chrome launches the kiosk when started as a regular program from the sidebar (unity launcher)
nmartin12 says: Apr 2, 2013. 8:49 PM
Ok so I redid the two lines in the bash file to fix the issue but chromium will not autostart or even start in kiosk mode for that other user. I am at a loss as to why. I have redone the steps several times and copy pasted to prevent typos.
natrinicle (author) says: Apr 3, 2013. 12:11 PM
Can you check who the script is owned by and what the permissions on it are by running an "ls -al" in the terminal while in the same directory as the script?
nmartin12 says: Apr 2, 2013. 9:36 PM
I even thought about reworking the chromeKiosk.sh file. Though I have no Idea exactly how any of the scripting works yet. I am running 12.04 if that changes anything, I noticed some steps don't exist anymore.
rpace1906 says: Mar 5, 2013. 12:34 PM
Thank you for posting this! I found it useful. You wouldn't happen to know anything about bell - merivale would you? Any insight would be great!
natrinicle (author) says: Mar 5, 2013. 2:08 PM
No problem rpace1906. I'm afraid the only things I know about Bell is what I can Google on it. I live in the U.S., not Canada.
chuydb says: Mar 5, 2013. 11:26 AM
Im using ubuntu 12.04 LTS, finllay got working the kiosk with autologin. Couple of things, how do I switch back? If I force reboot the autologin gets me right back to the kiosk mode, hence I cant do anything.

chuydb says: Mar 5, 2013. 11:29 AM
Been playing around with the terminal to see if i could force out of the kiosk, still nothing.
Clr36 says: Feb 26, 2013. 9:28 PM
Where might I have gone, followed the directions but now even when using the admin or master account it loads the kiosk mode? Now I can't change any setting. Thanks
natrinicle (author) says: Feb 27, 2013. 8:05 AM
You will need to edit the ~/.dmrc file's Session= line. I use KDE by default on my system (not loaded with standard Ubuntu) and my line is Session=kde-plasma.
Just guessing, but I think if you set that line to Session=gnome that it should go back to the gnome desktop for you.
mrazem says: Jul 11, 2011. 1:34 AM
Is there a way to force Chrome or Chromium start in Full-Screen mode?
natrinicle (author) says: Jul 11, 2011. 10:20 AM
You have to use the xrandr super long command in the chromeKiosk.sh creation step. From what I understand the file that the resolution is stored in has changed locations as well and I haven't had a chance to look at and repair that script. If you can find the location of the file you should be able to just change the file name in those two commands.
mikefoes says: Nov 20, 2012. 6:06 AM
Hi, thanks for your quick response but that did not work, Is anybody experiencing the same situation. i guess there is no way to gain access to the Pc from this other than a re build of the Ubuntu Os.
lovely2 says: Aug 16, 2012. 10:38 PM
Those settings for fullscreen are now located in ~/.config/chromium/Default/Preferences

width=`xrandr | grep \* | head -n1 | cut -d' ' -f4 | cut -d'x' -f1`
height=`xrandr | grep \* | head -n1 | cut -d' ' -f4 | cut -d'x' -f2`

echo $width,$height

cat ~/.config/chromium/Default/Preferences | perl -pe "s/\"work_area_bottom.*/\"work_area_bottom\": $height,/" > /tmp/tmp.$$
cp /tmp/tmp.$$ ~/.config/chromium/Default/Preferences
cat ~/.config/chromium/Default/Preferences | perl -pe "s/\"bottom.*/\"bottom\": $height,/" > /tmp/tmp.$$
cp /tmp/tmp.$$ ~/.config/chromium/Default/Preferences
cat ~/.config/chromium/Default/Preferences | perl -pe "s/\"work_area_right.*/\"work_area_right\": $width,/" > /tmp/tmp.$$
cp /tmp/tmp.$$ ~/.config/chromium/Default/Preferences
cat ~/.config/chromium/Default/Preferences | perl -pe "s/\"right.*/\"right\": $width,/" > /tmp/tmp.$$
mv /tmp/tmp.$$ ~/.config/chromium/Default/Preferences

mikefoes says: Nov 15, 2012. 1:51 AM
I have re built the system in case i had missed something in the set up. But it is exactly the same. The kiosk works fantastically only allowing users use of the web browser, but I can't gain access to the admin user as the settings are in force here. I log on as my admin user but no access to any menu's etc. if you could find the time to point me in the right direction it would be very helpful.

great tutorial, easy to follow and very informative.

best regards

mike
natrinicle (author) says: Nov 15, 2012. 10:53 AM
After intensively searching the internet, I finally found the config file that tells GDM which desktop environment to load. You will need to edit the ~/.dmrc file's Session= line. I use KDE by default on my system (not loaded with standard Ubuntu) and my line is Session=kde-plasma.
Just guessing, but I think if you set that line to Session=gnome that it should go back to the gnome desktop for you.
mikefoes says: Nov 14, 2012. 3:19 AM
when switching to the Administrator the kiosk mode is still active, no menus etc, how do i over come this as i want to change some settings for the restricted user
.
regards

mike
mikefoes says: Nov 12, 2012. 5:09 AM
Tutorial is well thought out and explained exceptionally with the Ade of the screen shots. However Chromium wont start automatically on the users account, could you point me in the wright direction what to look for. I entered the script as shown. i am new to linux and this a great project to get me started.

also is there a way of disabling the Gnome panel for the user, I just want to really lock the system down.

best regards

mike
natrinicle (author) says: Nov 12, 2012. 11:49 AM
I would check the .desktop file creation step and make sure that the correct file permissions are set. This will take care of disabling the Gnome panel as well.
natrinicle (author) says: Nov 12, 2012. 11:49 AM
Step 6 actually, sorry I didn't include it in my last comment
nhoncoop says: Oct 12, 2012. 8:47 AM
I have almost everything working (great tutorial!), only the webpage is faster than the internet connection, what results in a page cannot found message. So I have to wait for just 2 a 3 seconds hit F5 and it is working but is there a better solution?

Also i did something wrong and it is not possible to go back to the normal login screen so i can login as administrator or user in unity? I use ubuntu 12.04.
natrinicle (author) says: Oct 12, 2012. 1:59 PM
Thanks! I'm guessing it's probably that you're using DHCP and that the DHCP server is taking too long to hand out an address. You can set a static address and that should help.

My guess on the user is in step 7 not having set a time that you can log in as another user before the auto login. Unfortunately, I'm not sure where this is set so I don't know how to unset it.
nhoncoop says: Oct 15, 2012. 6:08 AM
I have installed Ubuntu again but I can't find the Login Screen Settings in Ubuntu 12.04. Is ther another way to set some time to login as an another user? I have tried to fix it in in the lightdm.conf but both versions login in the default interface without some time to login as someone else.

1
[SeatDefaults]
autologin-user=user
autologin-user-timeout=20
autologin-session=Kiosk Mode
user-session=Kiosk Mode
greeter-session=unity-greeter
allow-guest=false

2
[SeatDefaults]
autologin-user=user
autologin-user-timeout=20
user-session=ubuntu
greeter-session=unity-greeter
allow-guest=false
natrinicle (author) says: Oct 15, 2012. 7:16 AM
Looks like Ubuntu changed their greeter to LightDM which is what you're trying to set here. If it's not accepting the config file then you might need to file a bug with the developers. I believe at the time I wrote this article they were using GDM.
nhoncoop says: Oct 16, 2012. 5:36 AM
I found a alternative gdm greeter tool called MDM (http://askubuntu.com/questions/143192/how-can-i-replace-lightdm-with-mdm). In MDM is it possible to Timed Login, what fixed the problem.
matais says: Jul 27, 2011. 7:42 AM
Hi, iv followed your brilliant guide and works perfecty with chromium but iv altered it for Opera and only having one issue getting it full screen (you can see the background, round the sides of the opera window), with Chromium i managed to drag the windows to full screen and it holds even after a reboot but with Opera i cant seem to do the same or find another way of doing it, any help would be greatly appricated, iv attached an image of what im getting
photo.JPG
natrinicle (author) says: Jul 27, 2011. 7:31 PM
I haven't tried Opera yet, but a quick Google search has led me to the Opera Kiosk Mode documentation. I quickly glanced through it and it appears that there are a series of command line options to set the screen height and width. Take a look at the following url for more info: http://www.opera.com/support/mastering/kiosk/
matais says: Jul 28, 2011. 3:06 AM
Hi, thanks for your reply natrinicle, i wish it was that easy, iv had a read through that site in my google travels and tried
opera %U -k -ScreenWidth 800 -ScreenHeight 600
opera %U -k /ScreenWidth 800 /ScreenHeight 600
and tried other combinations

here what im using:
#! /bin/bash
xscreensaver -nosplash &
While true; do opera %U --kioskresetstation --nomail --nomaillinks --nosave --nodownload --reseronexit --nocontectmenu --nomenu --noprint --nokeys ; sleep 2s; done

im having no luck at all, using ubuntu 10.04 LTS and opera 11.50
is there anyway to start xrandr so opera can pick the screen resolution and go actual full screen?
natrinicle (author) says: Jul 28, 2011. 5:58 AM
Xrandr actually is just a command line utility that dumps a lot of info about the screena that xwindows are displayed on. You might be able to take a chunk out of the xrandr code I have and put it in $() which runs a command and uses the output for that section of input. It would look something like this below, filling in the xrandr command line portion of course.

Opera %U -k -screenwidth $(xrandr command line) -screenheight $(xrandr command line)
1-40 of 151Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!