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.
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:The script
chromeKiosk.sh
should be placed in the same directory with execute permissions and look like: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)
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:
(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:
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:
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.
Firefox Kiosk
Chromium-browser kiosk configurations do not allow for web pages requiring ‘java’. Java (IcedTea) doesn't have a PPAPI plugin available, and so it's not usable in Chromium, since Chromium 34 in Trusty has switched to the Aura rendering framework and no longer allows NPAPI plugins.
Firefox kiosk does! This configuration works on both Ubuntu 12.04 LTS and Ubuntu 14.04 LTS.
First step is to create the ‘Kiosk’ user.
Install Cinnamon (I had to get away from Unity desktop)
Install mKiosk
Install mKiosk Web Browser (Public Terminal) - (add-on for Firefox) from the Kiosk users profile. You will be prompted with a warning about Administrators use. Accept and move on.
Notes: On step 4, when kiosk user hits any of those keys in parenthesis they will be prompted for the administrator password.
F1 – Configure mKiosk
F2 – Confgure Firefox preferences
Ctrl+Shift+F and F11 – Exit Full Screen mode
Ctrl+Shift+W and F12 – Exits Firefox
After configuring mKiosk, you will be prompted for the admin password again. You may have to hit the back button a few times to get back to the Home Page and Full screen mode (or just hit F11). You will be notified that the admin password has changed.
You can now configure a Bookmarks button for the toolbar, such as your ‘Home page’ (otherwise the back button is the only way to get back to your homepage and users will not do so).
Install Oracle Java 7 in Ubuntu
Now you can add Firefox to the ‘Startup apps’ for kiosk user. You will have to exit the browser (F12)
Create the Firefox Desktop
Open a file (
sudo nano /usr/share/xsessions/Firefox.desktop
) and paste:Log out, select the Firefox (no effects) login for Kiosk user and login.
Autologon ‘kiosk user’
You will have to log out and back in as ‘administrator’ to manage the ‘autologon’ for ‘kiosk user’.
Logon as ‘administrator’ to the gnome desktop
Applications>System Tools>Administration>User Accounts
Unlock the kiosk user and set autologon to yes
Managing updates for Ubuntu
Hit the F12 button. You will be prompted for the mKiosk admin password. Firefox will exit and you will be back to the logon screen.
Login as the ‘administrator’. Go to the Update Manager, Scan for updates and Install.
Reboot. Done.
I've set up the same. I'm providing you an easy script. Run this script and you will able to use a web browser with their site in full screen. No address bar, no button, user can only click the link on the page.
Copy this all content in an .sh file and run it. After the completion of the script you need to login in Kiosk Mode as shown in the image.