Solved

Kiosk mode window manager for debian

Posted on 2009-06-30
15
2,846 Views
Last Modified: 2013-12-21
Hi,

I'm looking for the best method to setup a kiosk from a debian box.
Basically, I just need it to launch firefox fullscreen, with no mess.

I've been using GDM with a modified .xsession script (using metacity), and I added a user for GDM autologin. The problem is, if firefox crashes, then GDM goes to the login screen, for ten seconds while it waits for the autologin. Also, I can't get the screensaver to not run. After 10 mins it turns the monitor off.

I started looking at twm-kiosk, but it fails to compile on my machine, I'm looking for any recommendations for a good kiosk-only window manager!

Thanks!

On a side note; if you know of a guide to all the various files that X and GDM go through during the startup process, and what each should do/contain, that would be great!
.xsesssion:
 

#!/bin/bash

xrandr -s 1360x768

xrandr -o right
 

metacity &
 

xset -dpms

xset -b

xhost +

unclutter -idle 1 &

/home/sign/Desktop/firefox/firefox

Open in new window

0
Comment
Question by:mtchs
  • 9
  • 6
15 Comments
 
LVL 12

Expert Comment

by:Let_Me_Be
ID: 24748988
I had a similar problem. My current solution is to use no window manager at all and I'm using a small XUL application. For my purpose (University Student Examination) I only need to open a specific webpage fullscreen (so you might need something a bit more complex).

I would recommend checking the R-Kiosk extensions https://addons.mozilla.org/en-US/firefox/addon/1659 when combined with no Window manager it should be more then suitable.

I only switched to XUL because the firefox profile containing the R-Kiosk extension had to be copied to each student when he launched the examination session. This caused many problems with students that actually used some custom configuration in their Unix profile.
0
 
LVL 12

Expert Comment

by:Let_Me_Be
ID: 24749005
Also you might need to add a short sleep statement before launching the Firefox (if launched to soon, it might collide with the environment startup and crash [I haven't pinpointed the exact reason while testing]).
0
 

Author Comment

by:mtchs
ID: 24749269
Hmm, very nice addon!

I still have the same problems with firefox if I launch without a wm; that is, it only uses half the screen, I'm not sure if it does this because of my xrandr -o right
Maybe it thinks the bottom is where the old bottom used to be.

I also started toying with gnome-screensaver-command -i; and it always reports that gnome-screensaver isn't running.
Something still turns off the monitor after 5-10 mins of "inactivity".
0
 
LVL 12

Expert Comment

by:Let_Me_Be
ID: 24749395
>I still have the same problems with firefox if I launch without a wm; that is, it only uses half the screen, I'm not sure if it does this because of my xrandr -o right

Can't help you with this one, R-Kiosk should maximize the window.

> Something still turns off the monitor after 5-10 mins of "inactivity".

That might be the powersaving (not connected to screen saver).
0
 

Author Comment

by:mtchs
ID: 24749752
Running metacity isn't too bad; so getting firefox to maximize works fairly nicely.

I can't find anything to do with powersaving that is turning off the monitor.
Is there something in the gconf that might do this?
I also attached a ps aux; to see if you notice any process that I may have missed.

It acts like dpms; but I thought xset -dpms disables dpms..

deeebian:~# ps aux | egrep -v 'apache2|getty|openvpn'

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

root         1  0.2  0.0   2100   688 ?        Ss   15:11   0:01 init [2]  

root         2  0.0  0.0      0     0 ?        S<   15:11   0:00 [kthreadd]

root         3  0.0  0.0      0     0 ?        S<   15:11   0:00 [migration/0]

root         4  0.0  0.0      0     0 ?        S<   15:11   0:00 [ksoftirqd/0]

root         5  0.0  0.0      0     0 ?        S<   15:11   0:00 [watchdog/0]

root         6  0.0  0.0      0     0 ?        S<   15:11   0:00 [migration/1]

root         7  0.0  0.0      0     0 ?        S<   15:11   0:00 [ksoftirqd/1]

root         8  0.0  0.0      0     0 ?        S<   15:11   0:00 [watchdog/1]

root         9  0.0  0.0      0     0 ?        S<   15:11   0:00 [events/0]

root        10  0.0  0.0      0     0 ?        S<   15:11   0:00 [events/1]

root        11  0.0  0.0      0     0 ?        S<   15:11   0:00 [khelper]

root        44  0.0  0.0      0     0 ?        S<   15:11   0:00 [kblockd/0]

root        45  0.0  0.0      0     0 ?        S<   15:11   0:00 [kblockd/1]

root        47  0.0  0.0      0     0 ?        S<   15:11   0:00 [kacpid]

root        48  0.0  0.0      0     0 ?        S<   15:11   0:00 [kacpi_notify]

root       124  0.0  0.0      0     0 ?        S<   15:11   0:00 [kseriod]

root       165  0.0  0.0      0     0 ?        S    15:11   0:00 [pdflush]

root       166  0.0  0.0      0     0 ?        S    15:11   0:00 [pdflush]

root       167  0.0  0.0      0     0 ?        S<   15:11   0:00 [kswapd0]

root       168  0.0  0.0      0     0 ?        S<   15:11   0:00 [aio/0]

root       169  0.0  0.0      0     0 ?        S<   15:11   0:00 [aio/1]

root       686  0.0  0.0      0     0 ?        S<   15:11   0:00 [ksuspend_usbd]

root       687  0.0  0.0      0     0 ?        S<   15:11   0:00 [khubd]

root       774  0.0  0.0      0     0 ?        S<   15:11   0:00 [ata/0]

root       775  0.0  0.0      0     0 ?        S<   15:11   0:00 [ata/1]

root       776  0.0  0.0      0     0 ?        S<   15:11   0:00 [ata_aux]

root       787  0.0  0.0      0     0 ?        S<   15:11   0:00 [scsi_eh_0]

root       788  0.0  0.0      0     0 ?        S<   15:11   0:00 [scsi_eh_1]

root       872  0.0  0.0      0     0 ?        S<   15:11   0:00 [kjournald]

root       948  0.1  0.1   3080  1660 ?        S<s  15:11   0:00 udevd --daemon

root      1495  0.0  0.0      0     0 ?        S<   15:11   0:00 [scsi_eh_2]

root      1496  0.0  0.0      0     0 ?        S<   15:11   0:00 [usb-storage]

root      1530  0.0  0.0      0     0 ?        S<   15:11   0:00 [kpsmoused]

root      1860  0.0  0.0   2180   452 ?        Ss   15:11   0:00 dhclient3 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp3/dhclient.eth0.leases eth0

daemon    2090  0.0  0.0   1892   508 ?        Ss   15:12   0:00 /sbin/portmap

statd     2102  0.0  0.0   1956   724 ?        Ss   15:12   0:00 /sbin/rpc.statd

root      2419  0.3  0.0      0     0 ?        S<   15:12   0:02 [kondemand/0]

root      2421  0.4  0.0      0     0 ?        S<   15:12   0:02 [kondemand/1]

root      2481  0.0  0.1  28376  1416 ?        Sl   15:12   0:00 /usr/sbin/rsyslogd -c3

root      2492  0.0  0.0   1764   644 ?        Ss   15:12   0:00 /usr/sbin/acpid

103       2502  0.0  0.1   2752  1096 ?        Ss   15:12   0:00 /usr/bin/dbus-daemon --system

avahi     2514  0.0  0.1   2988  1476 ?        Ss   15:12   0:00 avahi-daemon: running [deeebian.local]

avahi     2515  0.0  0.0   2884   488 ?        Ss   15:12   0:00 avahi-daemon: chroot helper

root      2534  0.0  0.0   5416  1016 ?        Ss   15:12   0:00 /usr/sbin/sshd

root      2561  0.0  0.1   6532  1096 ?        Ss   15:12   0:00 /usr/sbin/kerneloops

root      2568  0.0  0.0   1952   600 ?        Ss   15:12   0:00 /usr/sbin/inetd

ntp       2586  0.0  0.1   4296  1320 ?        Ss   15:12   0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -u 111:120 -g

106       2598  0.1  0.4   6504  4172 ?        Ss   15:12   0:01 /usr/sbin/hald

root      2601  0.1  0.2  17132  2588 ?        Ssl  15:12   0:00 /usr/sbin/console-kit-daemon

root      2664  0.0  0.1   3224  1084 ?        S    15:12   0:00 hald-runner

root      2682  0.0  0.0   3288   968 ?        S    15:12   0:00 /usr/lib/hal/hald-addon-generic-backlight

root      2683  0.0  0.0   3292  1004 ?        S    15:12   0:00 hald-addon-input: Listening on /dev/input/event1 /dev/input/event0 /dev/input/event2 /dev/input/event5 /dev/input/event6

root      2720  0.0  0.0   3296  1024 ?        S    15:12   0:00 hald-addon-storage: polling /dev/sdb (every 2 sec)

root      2721  0.0  0.0   3304   996 ?        S    15:12   0:00 /usr/lib/hal/hald-addon-cpufreq

106       2722  0.0  0.0   3160   968 ?        S    15:12   0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket

daemon    2759  0.0  0.0   2048   436 ?        Ss   15:12   0:00 /usr/sbin/atd

root      2779  0.0  0.0   3456   988 ?        Ss   15:12   0:00 /usr/sbin/cron

root      2803  0.0  0.1  14104  1592 ?        Ss   15:12   0:00 /usr/sbin/gdm

root      2808  0.0  0.2  14556  3044 ?        S    15:12   0:00 /usr/sbin/gdm

root      2827  7.7  0.7  18192  7556 tty7     Ss+  15:12   0:45 /usr/X11R6/bin/X :0 -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7

sign      2862  0.0  0.1   4356  1416 ?        Ss   15:12   0:00 sh /home/sign/.xsession

sign      2951  0.0  0.1   2956  1080 ?        S    15:12   0:00 /usr/bin/unclutter -idle .01 -root -jitter 100

sign      2953  0.0  0.0   4756   568 ?        Ss   15:12   0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session sh /home/sign/.xsession

sign      2956  0.0  0.0   3100   664 ?        S    15:12   0:00 /usr/bin/dbus-launch --exit-with-session sh /home/sign/.xsession

sign      2957  0.0  0.0   2620   860 ?        Ss   15:12   0:00 /usr/bin/dbus-daemon --fork --print-pid 6 --print-address 9 --session

sign      2960  0.0  0.8  17880  8884 ?        S    15:12   0:00 metacity

sign      2964  0.1  0.3   6744  3648 ?        S    15:12   0:00 /usr/lib/libgconf2-4/gconfd-2 6

sign      2969  0.0  0.1   3852  1212 ?        S    15:12   0:00 /bin/sh /home/sign/Desktop/firefox/firefox http://localhost/livesigns

sign      2973  0.0  0.1   3912  1284 ?        S    15:12   0:00 /bin/sh /home/sign/Desktop/firefox/run-mozilla.sh /home/sign/Desktop/firefox/firefox-bin http://localhost/livesigns

sign      2979 20.7  5.1 148092 53140 ?        Sl   15:12   1:58 /home/sign/Desktop/firefox/firefox-bin http://localhost/livesigns

root      3019  0.0  0.1   4056  1196 ?        S    15:13   0:00 /USR/SBIN/CRON

root      3049  0.0  0.0      0     0 ?        Zs   15:13   0:00 [sh] <defunct>

101       3645  0.0  0.1   6356  1700 ?        S    15:13   0:00 /usr/sbin/sendmail -i -FCronDaemon -oem root

root      3653  0.0  0.2   8588  2968 ?        Ss   15:13   0:00 sshd: root@pts/0 

root      3662  0.0  0.1   4256  1696 pts/0    Rs   15:13   0:00 -bash

root      7868  0.0  0.1   4052  1188 ?        S    15:22   0:00 /USR/SBIN/CRON

root      7900  0.0  0.1   2552  1036 ?        Ss   15:22   0:00 /bin/sh -c /opt/livesigns/check_in 2>&1 >> /opt/livesigns/cron.log

root      7903 25.0  0.6   8416  6724 ?        R    15:22   0:00 /usr/bin/perl /opt/livesigns/check_in

root      7967  2.0  0.1   3288  1196 ?        R    15:22   0:00 /usr/lib/hal/hal-acl-tool --reconfigure

root      8092  0.0  0.1   3716  1028 pts/0    R+   15:22   0:00 ps aux

Open in new window

0
 
LVL 12

Expert Comment

by:Let_Me_Be
ID: 24749854
Your distribution might have some GUI tool for configuring this (power management is one of the areas that are very differently implemented depending on your distribution and hardware) that is actually overriding the dpms flag, and I'm not sure if disabling dpms is enough. Try specific flags for your graphic card.

Maximizing the screen should work without the window manager very fine. Actually the window manager might be the reason for this behaviour.
0
 

Author Comment

by:mtchs
ID: 24750059
I still don't understand why firefox won't go fullscreen without a wm. Firefox thinks it's fullscreen, it just shows only only the top half of the screen.

Anyway; the box is running debian 5, with gdm and metacity.
I would really love to know how to disable power management/powersave to get it to stop turning off my monitor.

It's not the monitor, as we have other kiosk apps that use it, and it keeps the same monitor alive.

Thanks
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 12

Expert Comment

by:Let_Me_Be
ID: 24750074
What graphic card does that machine have?
0
 

Author Comment

by:mtchs
ID: 24758022
Sorry to get back so late; Work let out.

It's an EEE B202; which I believe uses the Intel GMA 950 Graphics Chipset.
0
 

Author Comment

by:mtchs
ID: 24765059
I'm still back to the issue with power saver on Debian 5 turning off the monitor.
As it's related to the same kiosk; I feel it unnecessary to open another question.

Does anybody have any thoughts or ideas as to how to get the machine to stop turning off the montior?
0
 
LVL 12

Expert Comment

by:Let_Me_Be
ID: 24765680
Try this:
xset dpms force off
0
 

Author Comment

by:mtchs
ID: 24766229
I'll try that.
Now I must wait 10-20 mins to see if it turns it off again.
0
 

Author Comment

by:mtchs
ID: 24766288
Nope; monitor still turned off.

Any other ideas?
0
 

Author Comment

by:mtchs
ID: 24766956
Another interesting thing...

# grep -i dpms /var/log/Xorg.0.log
(II) Loading extension DPMS
(II) intel(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
(II) intel(0): DPMS enabled
(II) intel(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display
(II) intel(0): DPMS capabilities: StandBy Suspend Off; RGB/Color Display


As I understand it; wouldn't "StandBy Suspend Off"; _never_ turn the display off?


Is there any commands I could run that would mimic keyboard/mouse activity, something I could run in a loop and execute every half a minute or so?
Like a keepalive of sorts?
0
 

Accepted Solution

by:
mtchs earned 0 total points
ID: 24767806
Hah, got it to work by doing this:

xset -display :0 s off
xset -display :0 -dpms
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now