Opera: a Sun Ray Webkiosk browser
By Jaap on Jun 02, 2010
In one of my recent projects I had to install Sun Ray DTU devices in a reception area of an office building. The requirement was to use the Sun Ray as an information stand:
- Deny access to the Desktop operating system, but provide Web browsing
- Reset after periods of inactivity
I decided to give it a try with the Opera web browser which runs both on Solaris and Linux systems. My example installation is on Oracle Enterprise Linux, but it is also tested on Solaris x86.
Opera is a web browser with increasing popularity and runs on multiple platforms. Opera has some nice kiosk mode features such as:
- Start-up dialogs are not shown
- Full-screen mode is enabled by default, you can't escape from it
- Toolbars and application bar are disabled
- URL Filtering
Before I start configuring and customizing Opera for Sun Ray I did the following standard installation steps:
- Download and install Opera on my Sun Ray server
- Configure Flash, Java and Acroread plugins (follow the instructions on this webpage)
My next step is to perform some Opera configuration settings. I will do this as a standard Linux user (I did it as the root user) by launching the Opera browser. When launched for the first time Opera will create a $HOME/.opera configuration directory.
Opera has a Preferences Editor which you access via entering the opera:config URL. I used the following two configurations settings to adjust my Kiosk Mode preferences:
- "Go Home Time Out": which is found under the Special section. This setting is used for resetting the kiosk after a certain period of inactivity in seconds. I used a setting of 600 (which is 10 minutes).
- "URL Filter File": which is found under the Network section. Here you can choose your file path (or use the default setting $HOME/.opera/urlfilter.ini) where you store your URL filter rules.
- I also changed the default home page, in my case I changed it to http://www.oracle.com/.
After exiting the Opera web browser, I created the URL filter rules in the default URL Filter File:
# vi $HOME/.opera/urlfilter.ini
See the Opera Kiosk Mode webpage for the explanation of the URL Filter File. I used these settings to allow http(s) URLs only. With these URL filters I also disallow the file://localhost/\* URLs to prevent viewing local files from the Sun Ray Software server.
At this time, my Opera configuration is ready for Sun Ray kiosk mode. I copied the configuration files to the default kiosk mode prototypes directory on all my Sun Ray servers in the Server Group. The Sun Ray kiosk mode module takes care of copying the profile to the right place in the server system when a user accesses the Sun Ray and his Opera kiosk session
# cd $HOME
# cp -r .opera /etc/opt/SUNWkio/prototypes/default/
The last step in my configuration is to tell the Sun Ray server how to start the Opera browser in kiosk mode. You do this by creating a kiosk descriptor file and a kiosk session executable. The descriptor will be detected in the Sun Ray server Admin GUI where you enable the service. In the below steps you see the kiosk files I used in my server.
1. create the Sun Ray kiosk descriptor# vi /etc/opt/SUNWkio/sessions/webkiosk.conf KIOSK_SESSION_EXEC=$KIOSK_SESSION_DIR/opera-kiosk.sh KIOSK_SESSION_LABEL="Webbrowser Kiosk Mode" KIOSK_SESSION_DESCRIPTION="Webbrowser (Opera) in limited Kiosk Mode to provide I nternet Web services to Sun Ray Kiosk Users"
2. create the session execution script
# mkdir /etc/opt/SUNWkio/sessions/webkiosk # vi /etc/opt/SUNWkio/sessions/webkiosk/opera-kiosk.sh #!/bin/sh # Set sleep and blanking timeouts to 0 # Uncomment if on Solaris #/usr/openwin/bin/xset -dpms s off #OPERA_EXEC=/usr/local/bin/opera # Uncomment if on Linux /usr/bin/xset -dpms s off OPERA_EXEC=/usr/bin/opera $OPERA_EXEC -kioskmode -kioskbuttons -nosave -noprint \\ -nochangebuttons -nocontextmenu -nodownload \\ -nokeys -nomail -nomaillinks -nomenu
Again, see the Opera Kiosk Mode website for the explanation of the Opera switches. With these switches you still see the main toolbar and address bar. Some of the buttons (such as the print button) are greyed-out. If you want to disable the address bar and toolbar you remove the -kioskbuttons switch, then you only see the viewed web-page.