Scientific Linux 6 & CentOS 6 KIOSK

Some time ago my friend had a new task of sharing (and control) computers in library. Computers are free to use for readers, and must give the possibility of using Internet network. My friend have found tutorials for Ubuntu. Because my favorite distros are Scientific Linux and CentOS i will show, how to do something similar for them.

This tutorial has been prepared on Scientific Linux 6.5 (i386), on computer with 1 core processor (2GHz) and with 512MB RAM memory. Harddisk capacity of 4GB should be enough. Operating system was installed from LiveCD with graphical interface (Gnome2) but tutorial was prepared also for minimal install systems. Scientific Linux 6.5 and CentOS 6.5 are compatible so this text can be used for both operating systems.

At the end of this text there is link to shell script, that configure and install everything automatically.

1. Add new user and install Opera browser and Flash module.

We start by login to the system as root. If we are in the graphical mode we start terminal.
We add new user called kiosk with this command: useradd kiosk.

Because Opera browser got built-in good KIOSK environment support it was my choice.
Opera need X windows for work, so we will install it with one command. If we already got it, then it will do nothing.
To install what we need, we use this commands (as root):
yum -y install wget
yum -y groupinstall basic-desktop desktop-platform x11 fonts
wget http://get.geo.opera.com/pub/opera/linux/1216/opera-12.16-1860.i386.rpm
yum -y localinstall opera-12.16*.rpm

Next we update our system and install Flash plugin:
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
yum check-update
yum -y update
yum -y install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl

   

2. Configure system to start in graphical mode.

If our system asks for user and password in text mode, then we must change settings so it will automatically enter graphical mode. If your Linux already starts in graphical login, then you can skip this step and go to another one (n 3).

We must edit inittab file with command: vi /etc/inittab
Mofidy last line from id:3:initdefault to id:5:initdefault and save changes.

After modification we make restart to be sure that our system starts in graphical mode (command reboot).

3. Configuration and auto-login kiosk user.

By default GDM login manager starts Gnome desktop. We want that Opera will run instead, so we will have to create new file with command that will start Opera in KIOSK mode.
First to do that we must setup password for kiosk user that we created.
We do this as root with command: passwd kiosk (we will be asked for new password twice).

We add support for user start scripts with command: yum -y install xorg-x11-xinit-session .

We logout from root account, om the logon GDM screen we choose kiosk user, but before we enter password to login, down on the line we got menu with “GNOME” option. We change it into “User script”.

Next we enter password and hit ok. Standard gnome interface appear. We start terminal, and we create script that will start Opera with such command:
echo “exec opera -k -nomail -noexit -nochangebuttons -nosave -nodownload -nomaillinks -nomenu -nominmaxbuttons -nocontextmenu -resetonexit -nosession -activetab http://google.pl” > .xsession

We setup the file properties so it can be run: chmod +x .xsession

Another operation is to become root in terminal with command: su –
We will be asked for password for root.

Next we edit file /etc/gdm/custom.conf (command: vi /etc/gdm/custom.conf). We can use diffrent editor like nano, mcedit or any other you like.
There are sections in the file. To daemon section we add new lines, so it will look like below:
[daemon]
AutomaticLoginEnable=true
AutomaticLogin=kiosk

After those changes we made we save the file, and quit from terminal (command exit).

We may restart system now, and use.

If we would do some changes or play with something, to have possibilitie of modifications we use keyboard shortcut CTRL+ALT+F2, where we will have chance to login as root in text mode.

I have prepared also shell script, that make whole installation and configuration process automatic, so system become ready to work in KIOSK mode. Just download and start this file (as root): http://www.marcinwilk.eu/make-kiosk.sh

6 thoughts on “Scientific Linux 6 & CentOS 6 KIOSK”

  1. We tried to run the script in centos 7. The script executed successfully, but when we rebooted the system there was no changes in it.The user “kiosk” was not visible in the login page.

  2. Hi Wilk,
    Kindly ignore the previous comment.

    We tried to run the script in centos 7. The script executed successfully, but when we rebooted the system , we were able to login into the user “kiosk”. But a blank screen is appearing and it moves to the login page again after few seconds. Any help on this?

  3. This has worked quite well and thanks for taking the time to develop and script it. I have it working, but I need to be able to support the kiosk remotely. I’ve been trying to get tigervnc to work, but haven’t been successful. It appears that my problem is with tiger and the window manager. Can you offer any hints?

Leave a Reply

Your email address will not be published. Required fields are marked *