On Monday 31 October 2011 08:07:10 Nicolas Huillard wrote:
Le vendredi 28 octobre 2011 à 22:59 +0200, Damien Bally a écrit :
I'm making some kind of embedded vdr distribution based on busybox and
minimal X11, the problem is I have no idea of how I can launch vdr and
xineliboutput at startup.
What I recently did, based on Debian + e-tobi + minimal X11 + vdr-sxfe:
* use nodm to auto-log-in and launch X11 (tweak /etc/default/nodm), and
relaunch in case of crash
* create a simple /var/lib/vdr/.xsession to run xcompmgr and vdr-sxfe
with proper options
* comment-out a few useless lines in /etc/X11/Xsession.options
* standard output and errors lies in /var/lib/vdr/.xsession-errors
The way I did it (hacked together from what I've done before and various
things I've found on t'internet!). I'm not saying it's the best way or perfect
but it works for me and I may improve it later on. This is on a basic Debian
installation.
Autologin: /etc/inittab:
Change 1:2345:respawn:/sbin/getty 38400 tty1 to
1:2345:respawn:/sbin/mingetty --autologin vdr tty1
(Autologin on tty1 as user vdr)
Start X when user vdr logs in on the console (and it isn't already running):
~vdr/.bashrc ends with:
if [ -z $DISPLAY ] [ $(tty) == /dev/tty1 ]; then
startx
fi
(This means I can su to the user vdr without it trying to run X all the time!)
Then set up the commands to run vdr-sxfe.
~vdr/.xinit contains:
#!/bin/sh
xsetroot -solid black
evilwm
xcompmgr -n
unclutter -idle 2
exec /home/vdr/bin/start_vdrfe
(Set the root window to black rather than the X checkerboard thing, although
htis doesn't seem to work! Run a very lightweight window manager. Run xcompmgr
to handle compositing for HUD. Run unclutter to hide the mouse cursor. Then
start my start+vdrfe script.)
~vdr/bin/start_vdrfe:
#!/bin/bash
FEOPTS=--fullscreen
FEOPTS=${FEOPTS} --reconnect
FEOPTS=${FEOPTS} --post method:tvtime=use_vo_driver
FEOPTS=${FEOPTS} --video=vdpau
FEOPTS=${FEOPTS} --audio=alsa:hw:1,7
FEOPTS=${FEOPTS} --hud
FEOPTS=${FEOPTS} --nokbd
FEOPTS=${FEOPTS} --silent
LOGFILE=/var/tmp/vdr-sxfe.log
mv $LOGFILE ${LOGFILE}.old
while (true)
do
vdr-sxfe $FEOPTS $LOGFILE
done
(vdr-sxfe options probably not optimal but it seems to work for now!)
As I say, there's many ways to do this and this is what I'm currently using
for the lightweight client I've just built.
I still have my remote receiver attached to the server and I have
commands.conf containing lines such as:
Restart vdr frontend: ssh vdrfe killall -KILL vdr-sxfe
for when the frontend hangs (seems to happen mainly when I skip forward
several times in quick succession). I also have a command set up to shut down
the client from the remote.
Cheers,
Laz
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr