Ubuntu HD VDR mittels Xine und VDPAU - LCDProc

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Skript erstellen)
Zeile 35: Zeile 35:
 
  vi lcdproc
 
  vi lcdproc
  
  #!/bin/sh
+
  #! /bin/sh
 
  ### BEGIN INIT INFO
 
  ### BEGIN INIT INFO
  # Provides:          lcdproc
+
  # Provides:          lcdd
  # Required-Start:    $irtrans
+
  # Required-Start:    $network $syslog
  # Required-Stop:    $irtrans
+
  # Required-Stop:    $network $syslog
  # Default-Start:    3 5
+
  # Default-Start:    2 3 4 5
  # Default-Stop:      0 1 2 6
+
  # Default-Stop:      0 1 6
  # Description:      Start, Stop or Restart the LCDProc Server
+
# Short-Description: LCDd
 +
  # Description:      Starts the LCDd.
 
  ### END INIT INFO
 
  ### END INIT INFO
 
   
 
   
  # Shell functions sourced from /etc/rc.status:
+
  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  . /etc/rc.status
+
  DESC="LCDd"
 +
NAME=lcdd
 +
SCRIPTNAME=/etc/init.d/$NAME
 +
 
 +
d_start() {
 +
    sudo /usr/local/sbin/LCDd -c /etc/LCDd.conf
 +
}
 
   
 
   
  # Reset status of this service
+
  d_stop() {
  rc_reset
+
    sudo killall LCDd
 +
  }
 
   
 
   
#
 
 
  case "$1" in
 
  case "$1" in
    start)
+
  start)
        echo -n "Starting LCDProc Server "
+
    echo -n "Starting $DESC: $NAME"
        /usr/local/sbin/LCDd -c /etc/LCDd.conf
+
    d_start
 +
    echo "."
 +
    ;;
 +
  stop)
 +
    echo -n "Stopping $DESC: $NAME"
 +
    d_stop
 +
    echo "."
 +
    ;;
 +
  *)
 +
    echo "Usage: $SCRIPTNAME {start|stop}" >&2
 +
    exit 1
 +
    ;;
 +
esac
 
   
 
   
        # Remember status and be verbose
+
  exit 0
        rc_status -v
+
        ;;
+
    stop)
+
        echo -n "Shutting down LCDProc Server "
+
        killall LCDd
+
        sleep 2
+
   
+
        # Remember status and be verbose
+
        rc_status -v
+
        ;;
+
    restart)
+
        echo -n "Restart LCDProc Server "
+
        $0 stop
+
        $0 start
+
+
        # Remember status and be quiet
+
        rc_status
+
        ;;
+
    *)
+
        echo "Usage: $0 {start|stop|restart}"
+
        exit 1
+
        ;;
+
esac
+
rc_exit
+
  
 
===Skript ausführbar machen===
 
===Skript ausführbar machen===

Version vom 6. Februar 2010, 17:24 Uhr

Inhaltsverzeichnis

LCDProc

Installationsdateien herunterladen

cd /data/installfiles/irtrans/
wget http://sourceforge.net/projects/lcdproc/files/lcdproc/0.5.3/lcdproc-0.5.3.tar.gz/download

LCDProc Installieren

Diese Installation beschreibt das vorgehen mit dem IRTrans LCPProc Treiber.

sudo su -
cd /tmp
tar -xzf /data/installfiles/irtrans/lcdproc-0.5.3.tar.gz
cd lcdproc-0.5.3/
./configure --enable-drivers=irtrans && make && make install
cp -a LCDd.conf /etc/
exit

LCDdproc.conf anpassen

cd /etc/
sudo vi LCDd.conf
DriverPath=/usr/local/lib/lcdproc/
Driver=irtrans
Foreground=no

LCDProc manuell starten

Nach dem Start sollte auf dem Display etwas vom LCDProc angezeigt werden.

cd /usr/local/sbin/
sudo ./LCDd -c /etc/LCDd.conf

LCDRProc in den Autostart

Skript erstellen

cd /etc/init.d/
vi lcdproc
#! /bin/sh
### BEGIN INIT INFO
# Provides:          lcdd
# Required-Start:    $network $syslog
# Required-Stop:     $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: LCDd
# Description:       Starts the LCDd.
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="LCDd"
NAME=lcdd
SCRIPTNAME=/etc/init.d/$NAME
d_start() {
   sudo /usr/local/sbin/LCDd -c /etc/LCDd.conf
}

d_stop() {
   sudo killall LCDd
}

case "$1" in
  start)
   echo -n "Starting $DESC: $NAME"
   d_start
   echo "."
   ;;
  stop)
   echo -n "Stopping $DESC: $NAME"
   d_stop
   echo "."
   ;;
  *)
   echo "Usage: $SCRIPTNAME {start|stop}" >&2
   exit 1
   ;;
esac

exit 0

Skript ausführbar machen

cd /etc/init.d/
chmod +x lcdproc

IRTrans in den Autostart aufnehmen

sudo update-rc.d irtrans defaults

IRTrans aus dem Autostart entfernen

sudo update-rc.d -f irtrans remove

IRTrans als root starten

Damit der vdruser das runvdr Skript ausführen kann benötigt dieser root Rechte. Achtung! Der untiger Eintrag muss als letzte Zeile hinzugefügt werden.

sudo visudo
vdruser ALL=(ALL) NOPASSWD: /usr/local/irtrans/irserver64

System neu starten

sudo init 6

Links

  1. LCDProc Homepage