[mythtv-users] Clear screensaver

Alex Tomlins alex at tomlins.org.uk
Wed Jun 26 11:09:46 UTC 2013


On 26/06/2013 10:46, Martin Moores wrote:
> On 26 June 2013 01:51, Phil Wild <phil at holobyte.com.au 
> <mailto:phil at holobyte.com.au>> wrote:
>
>
>
>         I would use irexec to run "xscreensaver-command -deactivate".
>          Can't think of any reason not to use irexec.
>
> Just wanted to hop on the end of this question.  I have an irexec 
> command mapped to a button on my remote,  It works fine, but only if 
> I start irexec manually first. What's the best way to get this running 
> on boot in Ubuntu, so it is ready and listening for commands?
Ubuntu has some magic in the X session startup to automatically start 
irexec if it detects that you're using is in your lirc config.  To do 
this, It looks at all the files in ~/.lirc to see if they have a command 
using irexec.  I don't think it looks in the top-level ~/.lircrc file 
though.

Actually, this may be a Mythbuntu specific thing.  The code is in the 
script at /usr/share/mythbuntu/session.sh, and contains:

     #check if irexec is needed, and start if need be
     if [ -x /usr/bin/irexec ] && [ ! -f ~/.noirexec ] && [ -f ~/.lircrc 
]; then
         if [ -n "$(cat ~/.lirc/* | grep --invert-match "#" | grep 
irexec | grep prog)" ]
         then
             killall irexec
             irexec -d
         fi
     fi

For me I have ~/.lirc/irexec containing:

begin
     prog = irexec
     button = KEY_POWER
     config = /usr/share/mythtv/suspend.sh
     repeat = 0
end

and an additional include line in ~/.lircrc to pull it in. irexec starts 
when I login to X without me having to do anything extra.

thanks,
Alex

-- 
Alex Tomlins
Email/Jabber: alex at tomlins.org.uk

There are two kinds of people in the world: those who finish what they started

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130626/dce78b2f/attachment.html>


More information about the mythtv-users mailing list