Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to customize ubuntu for a library, they only want to display a web browser with their site in full screen. No address bar, no button user can only click the link on the page. If library's staff enter admin user name and password they can change any settings in ubuntu.

Any suggestion or usefully link is much appreciated.

share|improve this question
    
Any preference to browser brand/version, or other apps? –  david6 Apr 24 '12 at 22:37
add comment

2 Answers

I believe this great article explains what you want, with screenshots galore. You want to create a special session in the login manager that will start a browser like Google Chrome using the kiosk option. You can set it up so that normal users automatically log into this kiosk session, but introduce a short time delay to allow an admin user to log into the normal Ubuntu session to administer changes to the system.

The steps are fairly detailed and so I won't reproduce them in their entirety here. But since Ask Ubuntu discourages just linking (in case the linked site goes down), I will cut and paste here the key steps. You should go to the link for the full instructions.

The desktop file you need to create in /usr/share/xsessions/ should have:

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

The script chromeKiosk.sh should be placed in the same directory with execute permissions and look like:

#!/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
share|improve this answer
1  
If i do this on 12.04 the browser doesn't fill the whole screen. I have a border. It is as if the browser thinks the screen is not 1024x768. Do you have any ideas? –  Chris Woollard Apr 27 '12 at 13:53
    
@ChrisWoollard Did you try the last step "testing" in the article I linked to? –  Chan-Ho Suh Apr 27 '12 at 20:18
    
@Chan-HoSuh Isee that the same problem persists with a custome pyGtK application. Any ideas on how to maximize custom apps? –  Juzer Ali Sep 5 '12 at 15:25
add comment

I found a way use Firefox instead because I wanted to avoid fullscreen mode:

A kiosk solution with Ubuntu+Firefox:

Install Ubuntu/Lubuntu/whatever

Make user admin Make user kiosk Set kiosk to autologin, no password Fix permissions (so kiosk cannot ctrl-s and peep into /home/admin)

cd /home
sudo chmod 700 *

Check if printer and other hardware, you might need, works.

Install Firefox add-ons: “R-kiosk” and “Reset Kiosk” (search for “kiosk”), optionally: “Easy Whitelist”. Create a file called ‘[profile]/user.js’ (profile is the name of your firefox profile directory, probably ‘.default’ ) and add these lines to it:

user_pref("rkiosk.navbar", true);
user_pref("browser.fullscreen.autohide",false);
user_pref("browser.link.open_newwindow", 3);
user_pref("browser.link.open_newwindow.restriction", 0);
user_pref("privacy.popups.policy", 1);

(The last 3 lines may require explanation: I had to use this for a particular web application designed for IE that relied on popup windows, so I wanted Firefox to open all popups the way IE does.)

Create a file called ‘[profile]/chrome/userChrome.css’ and add these lines to it:

#bookmarks-menu { display: none !important;}
#window-controls { display: none !important;}
#personal-bookmarks { display: none !important;}
#autohide-context { display: none !important;}
#urlbar { display: none !important; }
#searchbar { display: none !important; }

This will remove all unwanted icons/menus from the window. In case I forgot any, use the customize function to remove items from the toolbar or move them to e.g. the bookmark toolbar that will be hidden from view.

You may want to set firefox to never save history. Set default homepage and restart Firefox. Remember you can still close Firefox with alt-f4 and start it with “firefox -safe-mode” to disable kiosk mode.

Install Openbox (sudo apt-get install openbox obconf) Use obconf to remove extra windows – it will only confuse the user. Edit openbox menu (/etc/xdg/openbox/menu.xml) to remove all unwanted menu items. That will probably leave you with only “exit” or nothing at all. If you leave in “exit” the kiosk user can log out and get to the login screen, but he can only log in again as kiosk unless he can guess the password for admin. If you remove it completely it is possible that you yourself won't be able to log out of kiosk (e.g. in order to log in as admin and do maintenance). On my ubuntu-installation both ctrl-alt-backspace and ctrl-alt-sysrq-k are disabled, so I can only reboot with ctrl-alt-sysrq-b. Alternatively you can log in remotely or use ctrl-alt-f1 and do your maintenance work from the command line. Edit file ~/.config/openbox/autostart:

# run firefox:
while true; do firefox; sleep 5s; done &

What the user can do on this setup:

Close Firefox with alt-f4 (but it restarts after a few seconds). Use alt-tab to switch between programs (but Firefox is the only program). He can only follow links from the homepage, so he cannot abuse the internet. Reboot machine (but password in bios) ctrl-alt-f1 – but he doesn't know the password to login as admin. If he can log out of openbox and get to lightdm, he can log in again as kiosk and choose another window manager and get full control, so you need to delete all other .desktop entries from /usr/share/xsessions/ except openbox.desktop. I don't know of any way you can tie a user to a particular wm. :-(

Advantages of using Openbox instead of just a browser on top of Xwindows:

Chromium/Firefox in kiosk mode is always maximized. When I don’t use a wm, it never fills out the whole screen. I get the Exit menu option (optional).

What is it good for?

A fullscreen kiosk is good for browsing a particular website e.g. a school, a library, or a museum's website. However it is nice to be able to get back to the main/start page in case you get lost, so the website needs to be designed with a big home button and very easy navigation. And you cannot have any links leading users offsite since they cannot get back. Of course the browser will reset after a period of inactivity or if you close it with alt-f4, but most users won’t know that and will become very frustrated. That is why fullscreen mode usually isn't always that userfriendly and that’s why I wanted to keep some toolbar functionality and only Firefox could give me that, not Chrome. Alternatively give Openkiosk a try, it didn’t work for me because of the popup issue, but it might work for you.

share|improve this answer
1  
Welcome to AskUbuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  carnendil Sep 17 '13 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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