Instructables
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.

Step 2: Create a Basic User

Fullscreen capture 6282010 40850 PM.bmp
Fullscreen capture 6282010 40935 PM.bmp
Fullscreen capture 6282010 41108 PM.bmp
You will want a restricted user for the end users to use that does not have sudo access and cannot change system settings.  This way the Web Kiosk cannot be compromised as easily.  To do this click System, then highlight Administration, and click Users and Groups.  Once there click add, type your password to get past the authentication window, and input a generic username (I used Scholar).  To set up the account set a basic password for now and click ok.  You will want to click the Advanced Settings button in the lower right side of the window and choose the User Privileges tab.  From there uncheck all the check boxes that you do not want users to be able to access.  Then you can close the Users Settings window.

Step 3: Set up XScreensaver

Once your new user has been created, log out of your regular user and log into the restricted user account.  Next run XScreensaver's configuration window for the first time so that it will create the necessary configuration files.  You can find this configuration window by clicking System, highlighting preferences, and finally clicking the top Screensaver option.  If you hover over it, it should read "Change Screensaver Properties".  The XScreensaver will then ask you a few questions about disabling Gnome Screensaver and starting it's own Daemon, just click ok to all of these questions.  You can set which screensaver's you would like to see by checking the box to the left of the screensaver's name.  The option that says blank the screen after really stands for how long you want it to wait before starting that screensaver.  The option just below it is for how long before it changes from one screensaver to the next.  I like to let mine start after 10 minutes and change every 2 minutes.

Step 4: Set up Chromium

Log into the restricted account you created in the previous step and start chromium-browser. Click on the wrench on the upper right of the chrome window, and then choose Options. In the first tab that comes up, input the home page that you would like to show up. Then click on the Personal Stuff tab and choose to never save passwords and to disable autofill.  After this click on the Under the Hood tab and click Clear Browsing Data.  Then check all the check-boxes and choose Everything from the period selection drop-down box.  Click Clear Browsing data, after this is done close all the Chromium windows.

Step 5: Never Save History Again

Picture of Never Save History Again
After closing Chromium click Places, and then click Home Folder from the top bar.  From the resulting window click View and then Show Hidden Files.  You should now be able to see a folder called ".config", open this, find chromium, and open the Default folder.  Right click on the file called Preferences and choose Open with gedit.  Then scroll to the bottom and find the option "exited_cleanly": and set it to true if it isn't already.  Save and close this file in gedit.  Go up a folder by clicking the chromium button near the top of the white file space.  Right click on the file named "Local State" and make sure that the lines that start with "top": and "left": both have zeros after them and before the commas.  Then right click on the Default folder, select Properties, and click on the Permissions tab.  Select Access files from the Folder Access drop down box at the top of the properties window, then select Read-Only from the File Access drop down box just under the top one.  Click close once these options have been set, then close the File Browser.  Open Chromium once more and make sure that all of the settings appear to be correct and that the history does not show up for newly visited webpages.

Step 6: Set up Kiosk Desktop Mode in Xsessions

Picture of Set up Kiosk Desktop Mode in Xsessions
Fullscreen capture 6282010 45401 PM.bmp
Fullscreen capture 6282010 45507 PM.bmp
Fullscreen capture 6282010 45523 PM.bmp
Fullscreen capture 6282010 45605 PM.bmp
Fullscreen capture 6282010 45734 PM.bmp
Next you'll need to switch back to your regular user so that you can use sudo once again.  Once in the regular user account, click Applications, Accessories, and Terminal.  On the command line type: "sudo gedit /usr/share/xsessions/kiosk.desktop"  Then in the resulting window insert this code:

[Desktop Entry]
Encoding=UTF-8
Name=Kiosk Mode
Comment=Chromium Kiosk Mode
Exec=/usr/share/xsessions/chromeKiosk.sh
Type=Application

Save and close this document and then insert the following command on the Terminal window: "sudo gedit /usr/share/xsessions/chromeKiosk.sh"  This should bring up another gedit window for you to insert the following code:

#!/bin/bash
xscreensaver -nosplash &
cat ~/.config/chromium/Local\ State | perl -pe "s/\"bottom.*/\"bottom\": $(xrandr | grep \* | cut -d' ' -f4 | cut -d'x' -f2),/" > ~/.config/chromium/Local\ State
cat ~/.config/chromium/Local\ State | perl -pe "s/\"right.*/\"right\": $(xrandr | grep \* | cut -d' ' -f4 | cut -d'x' -f1),/" > ~/.config/chromium/Local\ State
while true; do chromium-browser %u --start-maximized; sleep 5s; done

If you would like to disallow access to the URL bar simply insert "--kiosk" between %u and --start-maximized as shown in the sixth picture on this step.
A few people commented that the inclusion of the "--incognito" switch at the same place as "--kiosk" goes makes it so that you do not have to worry about making the Chromium user profile read only.

After you have created these two files run "sudo chmod 755 /usr/share/xsessions/chromeKiosk.sh" in order to make this script executable.  See the image notes for more information.

Step 7: Autolog User into Kiosk Mode

Picture of Autolog User into Kiosk Mode
Next up is to allow anyone to log into our generic account and to set up the computer to load this account on startup.  First click System, highlight Administration, and click Users and Groups.  This should bring up a window that shows both accounts available on the system.  Make sure your regular account has the password asked on login so no one else can get in and mess up the system.  Then click on your generic guest user account (Scholar in my case) and click the change button next to the password field.  In the next window that shows up select "Generate random password" and check the box to allow login without asking for the password.  After this is done, close the user settings window.  Next click System, then highlight Administration, and finally click Login Screen.  In the lower right of the Login Screen Settings window that comes up there will be a button that says Unlock.  Click this button and enter your password.  After you click authenticate, the window will allow you to click the different options available.  Select log in as your restricted user allowing 2-5 seconds for anyone else to log in first.  This will allow you to make changes if anything isn't set right in the future.  Also select Kiosk Mode as the default session and click close.

Step 8: Testing

After you are done with everything else, reboot the computer and it should auto login to the restricted user and display Chromium fullscreen.  If you have the --kiosk switch enabled in the chromeKiosk.sh then it should just show the homepage across the whole screen.

If by chance, Google Chromium is not stretched to the edges with the --kiosk switch enabled there is a simple fix.  To stretch Chromium simply log in as your regular user and edit chromeKiosk.sh to not have the --kiosk switch.  Then log in as the restricted user, click the wrench and choose options.  Then on the Personal Stuff tab select Hide system title bar and use compact borders.  Close the options screen and stretch Chromium to fit the monitor.  Then go back into the options window and set it to Use system title bar and borders.  After this is done, log out of your restricted user (might need to just reboot) and log into your regular user.  Edit chromeKiosk.sh back to include the --kiosk switch again and Chromium should be full screen next time you log into the restricted user.
1-40 of 182Next »
chuydb1 year ago
Made it back by runnig a terminal...then

sudo nano /etc/lightdm/lightdm.conf

and deleting the autologin user line.

How did you get to the terminal? CTRL-ALT-T doesn't work for me.

natrinicle (author)  newuser20143 months ago
ctrl+alt+t only works while in a window manager. ctrl+alt+f1 or ctrl+alt+f2 should take you to an alternate tty though.
natrinicle (author)  chuydb1 year ago
Excellent! Glad you figured it out. Thanks for posting the answer!
IsaacN11 month ago

What am i doing wrong? I got 1 computer to work but the rest are not. I receive unable to launch x sessions. Please help.

WP_20140827_001.jpg
Dnode IsaacN17 days ago

I had the same message. You have to make sure, that you have made your script executable, which was mentioned in the very last step.

$ sudo chmod 755 /usr/share/xsessions/chromeKiosk.sh

natrinicle (author)  IsaacN11 month ago
Looks like it's attempting to find a file "/usr/share/xsessions/chromekiosk.sh" but not finding it. In step 6, did you create both files or just the one?
flimik1 month ago

sorry =) repeat

how can i give a possibility to resize chromium?

natrinicle (author)  flimik29 days ago
You would need a windowing system loaded to resize Chromium on the fly. Otherwise, I used to edit the config files for this. Sounds like Google EOL'd those settings so I'm not certain at this point.
MichaelH21 month ago

I have successfully set this up on Ubuntu 12.04 on an All In One Dell PC, however, i am having an issue;

When chromium is launched from a script, multi-touch is disabled. If i use the switch --touch-devices=N (N being the device number of the touchscreen found typing "xinput list") i get touch-- sort of. If i do single clicks, fine. If I do two finger or more clicks, it breaks and touch no longer works.

natrinicle (author)  MichaelH21 month ago
Hrmm, sounds like some kind of a touch driver may need to be loaded for the multi-touch to work. I'd get in contact with Dell or see if you can find anything online about getting that particular model's multi-touch working in Ubuntu.
BjornE11 month ago

I want to make a panel PC that controls a PLC trough a webinterface (fixed IP),
i imagine this works great for this. but what happens when power goes out?

can i make it reboot in to this kiosk mode?
and if i clone the SD drives that it runs on, is there a easy way to change the IP addres when clients have a different IP range?
eg: 192.168.0.x instead of 192.168.1.x

Great tutorial!

regards,

Bjorn

natrinicle (author)  BjornE11 month ago
Rebooting into kiosk mode works automatically if you follow the instructions. You can edit the /etc/network/interfaces file on the sdcard before installing it in the new computer.

The IP addres of the kiosk itself would be DHCP,
I meant the IP addres in the browser, at one client the PLC would be 192.168.1.160 (fixed IP), and other client would be 192.168.0.160.

Thank you for your help :-D

natrinicle (author)  BjornE11 month ago

Oh, I see! Sorry for the confusion. I would recommend using the /etc/hosts file and setting a hostname that you would use in Chromium. For instance http://plcinterface/... with the hosts file containing:

192.168.1.160 plcinterface www.plcinterface etc...

lowbrr2 months ago

Sooo, I set this up on Ubuntu 14.04, and I got it working, but there's a problem.

I don't know how to exit the kiosk mode and log in to a different account. I can access the terminal through some of the methods detailed below, but I don't have Sudo access because the Kiosk account is a basic user, and that's as far as I know how to get.

Any and all help is appreciated.

You can also hit ALT-F4 to quit Chrome(ium) and return to the Kiosk user's desktop, then switch users.

natrinicle (author)  MichaelH21 month ago
Alt+F4 shouldn't return you to the desktop if you set up the .desktop config files per my Instructable. It should kill Chromium, wait a few seconds, then relaunch it.
natrinicle (author)  lowbrr2 months ago
You can use ctrl+alt+F1 or ctrl+alt+F2 to switch to a terminal login. From there, login with a user that has access to sudo.
breinicke2 months ago

I've had the system set up for a couple weeks and have casually been interacting with it in my spare time, ensuring it is locked down. I then realized there is a glaringly obvious way bypassing the full screen locked down nature.
Is there a way to edit the right click menu? With a simple mouse wheel click, or a right click "open link in new Window"/"New Tab" selection, a simple and commonly known technique gives the user a URL bar and full reign of the settings menu, etc.

natrinicle (author)  breinicke2 months ago
When I tested this years ago, it didn't give you the URL bar or settings menu from a new tab page. If you follow the part of setting it so that Chrome's settings are read only, you shouldn't need to worry as closing the browser/reopening it should reset the state.
breinicke3 months ago

I made it but am having a small issue. I used a P4. Ubuntu 14 ran, but was sluggish so I used lubuntu instead and it behaves much snappier. and works short of one thing glitch:
When it loads into kiosk mode, it has narrow strip across the bottom where the toolbar would be in the normal desktop mode and it shows whatever the wallpaper is set as in that strip.
Any ideas on how to get rid of this strip?

If related, on Step 5 where you said to edit the Local State file, I did not find the Top or Left line to enter zero. I had to use leafpad as an editor in LXDE and even did a file search for left and top with no results.
Did this go away in recent Chrome versions?

natrinicle (author)  breinicke3 months ago

It does look like they removed this file in recent versions. Not sure if they just moved it or renamed it or if they got rid of it altogether. The strip across the bottom is likely something to do with this file missing (I was getting similar things with Chrome before I edited that).

Thank you very much.

natrinicle (author)  breinicke3 months ago

It does look like they removed this file in recent versions. Not sure if they just moved it or renamed it or if they got rid of it altogether. The strip across the bottom is likely something to do with this file missing (I was getting similar things with Chrome before I edited that).

stejk113 months ago

Super tutorial and it's exactly what I am looking for.

Just one thing though... I need to use Firefox browser rather than Chromium as I will be using a touch screen and for some reason Chromium doesn't work very well for me.

I'm just stuck at step 7 and 8 and how to launch Firefox rather than Chromium. Can you help?

Thanks

natrinicle (author)  stejk113 months ago

I'm not certain where you would set Firefox's dimensions as I haven't really dug into it, but you would want to change /usr/share/xsessions/kiosk.desktop's Exec line to point to the Firefox executable. You can find where this is by running "which firefox". Then you will want to remove/change both lines that start with cat in /usr/share/xsessions/chromeKiosk.sh and change chromium-browser to firefox as well.

nhburgess3 months ago

Great tutorial.

Suppose I would like to deploy this on multiple machines. Could I have a script that runs and makes all of these changes at once? Or can I copy and paste some files/folders?

Any help would be appreciated.

Rico

natrinicle (author)  nhburgess3 months ago

Thanks :)

I have been considering re-working this tutorial so that it could be scriptable but have been too busy with work lately and this has taken a back burner. Will look into it again here soon. Also, you could always build up one machine, clone the drive, and then log in and change the IP/hostname for each of the machines.

newuser20143 months ago

Great tutorial! One question, though. I set this up on 14.04 and have it working, but I can't back to the sign in screen. The login process doesn't pause anywhere to hit ESC or anything else to stop the auto login. I need to make some adjustments.

Any ideas?

natrinicle (author)  newuser20143 months ago
ctrl+alt+f1 or ctrl+alt+f2 should take you back to a terminal window. From there you should be able to edit and make adjustments to the various configurations.
sitoto6 months ago

Great instructable. I was successful in installing and configuring everything and I can boot in Kiosk Mode. My question is; is there anything else i need to install as a receiver? in order to make the touch screen working, because now my touch screen mouse is just bouncing around and not clicking anything.

natrinicle (author)  sitoto6 months ago
It really depends from screen to screen. Is it a USB screen? If so, please run lsusb -v and paste the output into a pastebin and shoot me a link. Otherwise, get me the make and model and I'll see if anyone's got any advice online (when it doubt, Google it).
godzilla8nj8 months ago

You might be interested in Sanickiosk. It's a simple-to-use, completely free, totally customizable web kiosk I built. You can download an ISO or run a script against a fresh Ubuntu Server installation. The entire system can be customized and administrated through the browser. http://links.sanicki.com/sanickiosk

balno1 year ago
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 balno1 year ago
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)  balno1 year ago
Beautiful code! Thanks for the update on that!
scottdn1 year ago
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)  scottdn1 year ago
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
Like the instructable but what in the world made you think lcd screens would not burn in????
1-40 of 182Next »