[mythtv-users] Screensaver disabling

Andreas linuxdreas at launchnet.com
Sat Jun 28 20:02:31 UTC 2008

Am Samstag, 28. Juni 2008 07:26:48 schrieb Tom Dexter:
> On Sat, Jun 28, 2008 at 4:14 AM, Andreas <linuxdreas at launchnet.com> wrote:
> > Am Freitag, 27. Juni 2008 17:20:12 schrieb Andrew Berry:
> >> Do you have to do anything specific to make it wake up from the
> >> screensaver when using LIRC? I ended up disabling xscreensaver because
> >> it wouldn't wake up when I pressed a button on the remote.
> >
> > In your lircrc, you bind a key on your remote to the command that turns
> > the screensaver off, for example:
> >
> > begin
> >        prog = irexec
> >        button = SELECT
> >        config = "xscreensaver-command -deactivate &"
> > end
> >
> > The program irexec must already be running (see man irexec). I use s
> > small script to start it with my KDE session. (located in
> > $HOME/.kde/Autostart):
> >
> > #! /bin/sh
> > killall irexec > /dev/null 2>&1
> > xscreensaver-command -exit
> > xscreensaver &
> > irexec -d
> > exit
> >
> > --
> > Gruß
> > Andreas
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> Why would you have to do any of that?  I've never needed to.  As far
> as I've ever seen , mythtv supports xscreensaver such that any
> activity seen by myth (keyboard or remote) deactivates xscreensaver.
> If your remote is working in mythtv, it should disable the
> xscreensaver.

It worked most of the time, but not always. As a workaround, I use irexec to 
stop xscreensaver. 

> If you have to do anything like the above, I'm guessing that for some
> reason mythtv isn't recognizing that xscreensaver is running when it
> starts up.  I had some issues with that and it was because I was
> launching xscreensaver in the background and then starting
> mythfrontend too quickly afterwards.  I start the frontend from
> /etc/inittab (with respawning enabled).  I had this in my
> ~/.fluxbox/startup:
> /usr/bin/xscreensaver -no-splash &
> exec /usr/bin/mythfrontend -l /var/log/mythtv/mythfrontend.log -v
> important,general

That is similar to what I used with fluxbox. I since switched to KDE to have 
a full-fledged desktop.

> It actually worked when I booted up because mythfrontend took slightly
> longer to start, but as soon as the frontend respawned mythfrontend
> would beat the screensaver to the punch and wouldn't know it was
> running.  I had to add a 'sleep 2' between those two lines.

I might have had the same race condition that you describe here and found a 
a different solution by using irexec.

> The only thing I added to my lircrc was a dummy key (that's not used
> by mythtv) mapped to my remotes power button.  I have the remote
> programmed to use that as the TV power and it serves no purpose in
> mythtv.  That way, when I turn on the TV power xscreensaver get's
> deactivated if it's running.

I have the power button mapped to a script that checks for a few things and 
then starts/restarts mythfrontend. It is a good idea to use it as the 
TV-Power button. Right now my universal remote does not work for the TV, 
though. I have to either update it at one-for-all or get a new universal 

> Tom


More information about the mythtv-users mailing list