$ sudo apt-get install build-essential linux-headers-generic
$ sudo apt-get install libjpeg62-dev libcap-dev libncurses5-dev libfreetype6-dev libfontconfig1-dev gettext
$ sudo mkdir /vdr $ sudo chmod -R 777 /vdr
$ cd /vdr $ sudo wget -c ftp://ftp.cadsoft.de/vdr/vdr-1.6.0.tar.bz2 -P /vdr
$ sudo tar -jxvf vdr-1.6.0.tar.bz2 $ sudo ln -s vdr-1.6.0 current
$ cd /vdr/current $ sudo wget ftp://ftp.cadsoft.de/vdr/Developer/vdr-1.6.0-1.diff -P /vdr $ sudo patch -p1 < /vdr/vdr-1.6.0-1.diff
$ sudo wget ftp://ftp.cadsoft.de/vdr/Developer/vdr-1.6.0-2.diff -P /vdr $ sudo patch -p1 < /vdr/vdr-1.6.0-2.diff
$ sudo cp Make.config.template Make.config $ sudo gedit Make.config
Modifiche (sezione remote control)
### The remote control: NO_KBD = 0 #LIRC_DEVICE = /dev/lircd #RCU_DEVICE = /dev/ttyS1
Se non vogliamo utilizzare i plugin di esempio forniti con VDR possiamo cancellarli in questo modo:
$ sudo rm -R /vdr/current/PLUGINS/src/*
Se tutto è andato a buon fine senza dare alcun tipo di problemi allora possiamo passare alla configurazione delle diverse parti necessarie a VDR per poter funzionare correttamente.
Esistono dei fonts creati da Andreas Mair che prendono il nome di VDRSymbols e che servono ad abbellire l'aspetto grafico delle icone mostrate nell'OSD.
$ cd /tmp $ wget http://andreas.vdr-developer.org/fonts/download/vdrsymbols-ttf-20080411.tgz $ tar -zxvf vdrsymbols-ttf-20080411.tgz $ sudo cp /tmp/vdrsymbols/*.ttf /usr/share/fonts/truetype
Questo script ci permette di eseguire dei comandi da inviare a VDR per gestione del nostro ambiente.
$ sudo cp /vdr/current/svdrpsend.pl /usr/bin
Dobbiamo creare la directory che conterrà tutte le nostre regitrazioni assegnando i permessi lettura/scrittura. Tale directory la chiameremo /video:
$ sudo mkdir /home/video $ sudo ln -s /home/video /video $ sudo chmod -R 777 /video
All'interno di questa directory verranno salvati tutti i file di configurazione di VDR e dei plugins, per questo motivo tale directory deve avere i permessi di lettura/scrittura:
$ sudo mkdir /etc/vdr $ sudo mkdir /etc/vdr/plugins $ sudo chmod -R 777 /etc/vdr $ sudo cp /vdr/current/*.conf /etc/vdr
Questo script ci permetterà di spegnere la nostra VDR in un modo corretto non appena premeremo sul tasto Power del nostro telecomando/tastiera.
$ sudo gedit
Script spegnimento VDR
#!/bin/sh /sbin/shutdown -h now &>/dev/null
$ sudo mkdir /usr/local/bin $ sudo cp /tmp/stopvdr.sh /usr/local/bin/ $ sudo chmod +x /usr/local/bin/stopvdr.sh
Questo script è molto importante visto che viene eseguito per poter caricare VDR con i suoi plugins e le varie opzioni di configurazione.
Una errata sintassi comporterà la mancata esecuzione di VDR.
$ sudo gedit /vdr/current/runvdr
Segmento script "runvdr" impostazione lingua
export LANG="it_IT.UTF8" export LC_CTYPE="it_IT.UTF8" export LC_ALL="it_IT.UTF8" #export VDR_CHARSET_OVERRIDE=ISO_8859-15
Segmento script "runvdr" comando "VDRCMD"
VDRPRG="./vdr" VDRCMD="$VDRPRG -w 60 -c /etc/vdr -s'/usr/local/bin/stopvdr.sh' \ "
Script esempio "runvdr"
#!/bin/sh
# runvdr: Loads the DVB driver and runs VDR
#
# If VDR exits abnormally, the driver will be reloaded
# and VDR restarted.
#
# In order to actually use this script you need to implement
# the functions DriverLoaded(), LoadDriver() and UnloadDriver()
# and maybe adjust the VDRPRG and VDRCMD to your particular
# requirements.
#
# Since this script loads the DVB driver, it must be started
# as user 'root'. Add the option "-u username" to run VDR
# under the given user name.
#
# Any command line parameters will be passed on to the
# actual 'vdr' program.
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: runvdr 1.19 2006/05/14 16:02:05 kls Exp $
export LANG="it_IT.UTF-8"
export LC_CTYPE="it_IT.UTF-8"
export LC_ALL="it_IT.UTF-8"
#export VDR_CHARSET_OVERRIDE="ISO-8859-15"
VDRPRG="./vdr"
VDRCMD="$VDRPRG -w 60 -c /etc/vdr -s'/usr/local/bin/stopvdr.sh'"
KILL="/usr/bin/killall -q -TERM"
# Detect whether the DVB driver is already loaded
# and return 0 if it *is* loaded, 1 if not:
function DriverLoaded()
{
if [ "`lsmod | grep dvb | wc -l`" -eq "0" ] ; then
return 1
else
return 0
fi
}
# Load all DVB driver modules needed for your hardware:
function LoadDriver()
{
modprobe dvb-ttpci
}
# Unload all DVB driver modules loaded in LoadDriver():
function UnloadDriver()
{
modprobe -r dvb-ttpci
}
# Load driver if it hasn't been loaded already:
if ! DriverLoaded; then
LoadDriver
fi
while (true) do
eval "$VDRCMD"
if test $? -eq 0 -o $? -eq 2; then exit; fi
echo "`date` reloading DVB driver"
$KILL $VDRPRG
sleep 10
UnloadDriver
LoadDriver
echo "`date` restarting VDR"
done
$ cd /vdr/current $ sudo ./vdr -c /etc/vdr
$ sudo ./vdr -c /etc/vdr $ vdr: error while reading '/etc/vdr/commands.conf' $ vdr: error while reading '/etc/vdr/reccmds.conf' $ vdr: error while reading '/etc/vdr/timercmds.conf'
$ sudo touch /etc/vdr/commands.conf.it_IT $ sudo touch /etc/vdr/reccmds.conf.it_IT $ sudo touch /etc/vdr/timercmds.conf.it_IT
Una volta che VDR è funzionante (per le schede SS2 vedi capitolo successivo) è necessario modificare le voci del menu Opzioni → OSD in modo da poter visualizzare correttamente le icone (vedi sezione VDRSymbols per maggiori info).
| Voce | Parametro |
|---|---|
| Caratteri predefiniti piccoli | VDRSymbols Sans: Bold |
| Caratteri piccoli | VDRSymbols Sans |
| Caratteri fissi | VDRSymbols Sans |
L'installazione del frontend (ovvero dell'interfaccia che verrà mostrata a video) consiste nell'installazione di uno o diversi plugins: