Re: [vdr] Launching vdr + xineliboutput at startup

2011-10-31 Thread Nicolas Huillard
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

-- 
NH


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] Launching vdr + xineliboutput at startup

2011-10-31 Thread Laz
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


Re: [vdr] Launching vdr + xineliboutput at startup

2011-10-29 Thread Steffen Barszus
On Fri, 28 Oct 2011 22:59:09 +0200
Damien Bally bir...@free.fr wrote:

 Hello
 
 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.
 
 For now, I'm doing manually :
 # xinit /usr/bin/rxvt
 then type : # vdr -Pxineliboutput
 
 I tried to type directly : # xinit /usr/local/bin/vdr -Pxineliboutput
 but vdr just displays its logo, with no error in /var/log/messages
 though.
 
 I can still launch vdr with : # xinit /usr/bin/rxvt -e 
 /usr/local/bin/vdr -Pxineliboutput but it's not very elegant.
 
 What's the trick ?


You don't need to start vdr inside X , you start vdr in the background
(whatever your init system is). With X you need to start vdr-sxfe .

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] Launching vdr + xineliboutput at startup

2011-10-28 Thread Damien Bally

Hello

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.


For now, I'm doing manually :
# xinit /usr/bin/rxvt
then type : # vdr -Pxineliboutput

I tried to type directly : # xinit /usr/local/bin/vdr -Pxineliboutput
but vdr just displays its logo, with no error in /var/log/messages though.

I can still launch vdr with : # xinit /usr/bin/rxvt -e 
/usr/local/bin/vdr -Pxineliboutput but it's not very elegant.


What's the trick ?

Thanks

Damien

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr