Etsitkö asiaa kotimaan kielellä kotiautomaatiosta (X10, 1-wire) tai talonrakennukseen liittyvistä asioista? Ne löytyvät nykyään täältä toiselta osastolta.
Blog previously known as 'Home Theatre PC'
« Diskless setup detailsAll is good »

Reset browser

Permalink 11/03/07 01:54, by Esa Viitala, Categories: Software

Just a quick&dirty hack to reset browser on my wall mounted touchscreen whenever the screen is blanked.


#!/usr/bin/perl

my $blanked = 0;
open (IN, "xscreensaver-command -watch |");
while (&ltIN&gt) {
if (m/^(BLANK|LOCK)/) {
if (!$blanked) {
system "killall firefox-bin && DISPLAY=:0 firefox &";
$blanked = 1;
}
} elsif (m/^UNBLANK/) {
$blanked = 0;
}
}

This goes with 'full fullscreen plugin' which starts firefox without any window decorations.

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)

Contents

Search

powered by b2evolution