[olug] Digital picture frame distro

Jay Swackhamer Jay at RebootTheUser.com
Wed Dec 3 20:10:31 UTC 2008


Here's what is launched from /etc/conf.d/local.start (gentoo)

/etc/conf.d/local.start
------------
/bin/su - mythtv -c "/opt/mythtv/scripts/start_X"
------------

/opt/mythtv/scripts/start_X
-----------
cd /opt/mythtv/logs
nohup /opt/mythtv/scripts/run_mythtv.sh > /opt/mythtv/logs/run_mythtv.log &
. /etc/profile
nohup /usr/X11R6/bin/startx & > /opt/mythtv/logs/startx.log 2>&1
------------


/opt/mythtv/scripts/run_mythtv.sh
-----------------------------
#/usr/bin/xset s noblank
#/usr/bin/xset s off
#/usr/bin/xset dpms off
sleep 2
cd /opt/mythtv/logs
export DISPLAY=:0.1
   /usr/bin/xset s noblank
   /usr/bin/xset s off
   /usr/bin/xset -dpms
   /usr/bin/irexec -d
   nohup /usr/bin/mythfrontend > mythfrontend.log &
IR=`ps -ef | grep irexec | grep -v grep | awk ' { print $2 }'`
kill ${IR}
IR=`ps -ef | grep irexec | grep -v grep `
if [ "${IR}" = "" ]; then
    /usr/bin/irexec -d
fi

export DISPLAY=:0.0
   nohup /opt/mythtv/scripts/slideshow.sh  2&>1 &
------------------------------------------


/opt/mythtv/scripts/slideshow.sh
----------------------------------
#!/bin/bash

export DISPLAY=:0.0
#export DISPLAY=:0.1

/usr/bin/xset s noblank
/usr/bin/xset s off
/usr/bin/xset -dpms

UNCL=`ps -ef | grep unclutter | grep -v grep`
if [ "${UNCL}" = "" ]; then
     /usr/X11R6/bin/unclutter -idle 0 -display :0.0 -root -visible -noevents &
     /usr/X11R6/bin/unclutter -idle 0 -display :0.1 -root -visible -noevents &
fi

cd /opt/images

STOP="NO"

while [ "${STOP}" = "NO" ]
do
  export DISPLAY=:0.0
  #export DISPLAY=:0.1
  cd /opt/images
  LIST=`/usr/bin/ls`
  for i in ${LIST}
  do
   EXT=`echo ${i} | awk -F . ' {print $2 } '`
   case ${EXT} in
     mpg|MPG|mpeg|MPEG|avi|AVI|wmv|WMV|mov|MOV) /usr/bin/mplayer -fs  
-nosound ${i
} ;;
     jpg|JPG|jpeg|JPEG|gif|GIF|bmp|BMP|png|PNG) /usr/bin/xloadimage  
-quiet -fulls
creen -onroot -border black -background black ${i} ;;
     *) echo "Unknown file type ${EXT}" ;;
   esac
   sleep 2
   #sleep 1200
  done
done
------------------------------------

-- 
Jay Swackhamer
Reboot The User
13416 A Street
Omaha, NE 68144
402-933-6449
Hours: 7pm-11pm Wed-Fri, 5pm-9pm Sat.
http://www.reboottheuser.com
http://www.cafepress.com/rtu
http://stores.ebay.com/RebootTheUser
http://www.hotr.com


Quoting Jay Swackhamer <Jay at RebootTheUser.com>:

> I dont login to that machine locally, just ssh.
>
> You dont have to run a login manager, if you are starting X through a
> script from the local startup.
>
> You can set gdm or kdm to automatically login as a specific user,
> which I used to do on the mythfrontends with autologin on GDM.
>
> I now just run the start_X script from the local.start.
>
> X is not set to start, taken out of the runlevels, no gdm/kdm/xdm/whatever.
>
> /etc/conf.d/local.start contains
> su - mythtv -c "/opt/mythtv/scripts/start_X"
>
> which runs the
>
> startx
> /opt/mythtv/scripts/slideshow.sh
>
> I use the mythbox as a frontend upstairs, with the second display in
> the wall in the front room. :0.0 on one, and :0.1 on the other.
>
> --
> Jay Swackhamer
> Reboot The User
> 13416 A Street
> Omaha, NE 68144
> 402-933-6449
> Hours: 7pm-11pm Wed-Fri, 5pm-9pm Sat.
> http://www.reboottheuser.com
> http://www.cafepress.com/rtu
> http://stores.ebay.com/RebootTheUser
> http://www.hotr.com
>
>
> Quoting Obi-Wan <obiwan at jedi.com>:
>
>>> For the screen in the wall at the shop, I just have it startup to a
>>> prompt, then launch X from a script through 'local' start. The script
>>> runs startx, ...
>>
>> Thanks, Jay.  So you still have to have a keyboard accessible in order
>> to log in, right?  I wonder if it's possible to replace g/kdm with
>> another app that would start X and run as a service on startup so that
>> I wouldn't have to touch the keyboard or mouse pad (touch screen
>> support in Fedora 9 & Ubuntu 8.04 sucked on this model -- haven't tried
>> the latest releases yet).  There'd be virtually no writing done to the
>> drive, so I'm not concerned with simply powering it off when done.
>>
>> I've never monkeyed with g/kdm before.  Do any of you know off the
>> top of your head what it would take to run an arbitrary X app instead
>> of the login manager?  If not, I can google as well as anybody...
>>
>> --
>> Ben "Obi-Wan" Hollingsworth                             obiwan at jedi.com
>>    The stuff of earth competes for the allegiance I owe only to the
>>      Giver of all good things, so if I stand, let me stand on the
>>        promise that You will pull me through.  -- Rich Mullins
>> _______________________________________________
>> OLUG mailing list
>> OLUG at olug.org
>> https://lists.olug.org/mailman/listinfo/olug
>>
>
>
>
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>






More information about the OLUG mailing list