[mythtv-users] glass-wide, a widescreen GUI theme for MythTV released

gibble gibble at gmail.com
Wed Nov 14 19:41:43 UTC 2007


That's why I killed x...though, in hindsight, should only have needed to
restart the front end.


Thomas Kessler-2 wrote:
> 
> On Nov 14, 2007 1:19 PM, gibble <gibble at gmail.com> wrote:
> 
>>
>> This should work.
>>
>> #!/bin/bash
>>
>> # File locations
>> BgPath=/usr/share/mythtv/themes/glass-wide/backgrounds
>> BgFile=/usr/share/mythtv/themes/glass-wide/background.png
>> TempLog=/tmp/random.log
>>
>> # Create a temporary logfile of all matches
>> find $BgPath -iregex ".*.png" > $TempLog
>>
>> # Choose a random line number (any number from 1 to the length of the
>> file)
>> LowerBound=1
>> RandomMax=32767
>> UpperBound=$(cat $TempLog | wc -l)
>> RandomLine=$(( $LowerBound + ($UpperBound * $RANDOM) / ($RandomMax + 1)
>> ))
>>
>> # Use sed to grab the random line
>> Command=$(sed -n "$RandomLine{p;q;}" "$TempLog")
>>
>> # Link the file
>> ln -s $Command $BgFile
>>
>> # Restart X
>> pkill xinit
>>
>>
> Sweet. Now will mythfrontend have to be restarted after the background
> file
> is linked?
> 
> TK
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> 

-- 
View this message in context: http://www.nabble.com/glass-wide%2C-a-widescreen-GUI-theme-for-MythTV-released-tf4790200s15552.html#a13754964
Sent from the mythtv-users mailing list archive at Nabble.com.



More information about the mythtv-users mailing list