DEBIAN Configuring VDR: Difference between revisions
m (link to dvb-utils help page on DVB wiki) |
m (added info boxes) |
||
Line 1: | Line 1: | ||
'''It is assumed that you have already installed a Debian VDR package either [[DEBIAN_VDR_Packages|from the standard repositories]], or [[DEBIAN_Compiling_VDR_Source_Packages|by compiling a source package yourself]].''' |
'''It is assumed that you have already installed a Debian VDR package either [[DEBIAN_VDR_Packages|from the standard repositories]], or [[DEBIAN_Compiling_VDR_Source_Packages|by compiling a source package yourself]].''' |
||
{{Box Warning | |
|||
* Before continuing, please read the following documents carefully: |
* Before continuing, please read the following documents carefully: |
||
<pre> |
<pre> |
||
Line 12: | Line 13: | ||
richard@vito:~$ man 5 vdr |
richard@vito:~$ man 5 vdr |
||
</pre> |
</pre> |
||
}} |
|||
Having read '''all''' of those, you are now ready to continue: |
Having read '''all''' of those, you are now ready to continue: |
||
Line 21: | Line 23: | ||
You may see this error (at least I did) and it means that the channels.conf file is somehow corrupt. You need to update the channels.conf anyway; it must be tailored to your DVB type (ie DVB-C, DVB-S, DVB-T) and if you are using DVB-T the frequencies depend on your local transmitter. |
You may see this error (at least I did) and it means that the channels.conf file is somehow corrupt. You need to update the channels.conf anyway; it must be tailored to your DVB type (ie DVB-C, DVB-S, DVB-T) and if you are using DVB-T the frequencies depend on your local transmitter. |
||
To make a channels.conf use the 'scan' commandline tool, which is part of the dvb-utils package. In my case (DVB-T in the Midlands, UK). |
To make a channels.conf use the 'scan' commandline tool, which is part of the dvb-utils package. In my case (DVB-T in the Midlands, UK). |
||
⚫ | |||
In my case I use: |
In my case I use: |
||
<pre> |
<pre> |
||
Line 28: | Line 29: | ||
</pre> |
</pre> |
||
...replace dvb-t/uk-SuttonColdfield with whatever is appropriate for your area. |
...replace dvb-t/uk-SuttonColdfield with whatever is appropriate for your area. |
||
{{Box Info | |
|||
⚫ | |||
}} |
|||
Having done that, you should be able to run vdr from the command line. |
Having done that, you should be able to run vdr from the command line. |
||
Line 36: | Line 41: | ||
...well it runs, but if you're using a budget card, it has no way of displaying the picture. |
...well it runs, but if you're using a budget card, it has no way of displaying the picture. |
||
Before moving on, and now that we know that vdr is able to run, lets set it up to run as a |
Before moving on, and now that we know that vdr is able to run, lets set it up to run as a service at startup. Open /etc/default/vdr in your editor of choice and add 'export LANG="c"' at the top and set ENABLED=1. Mine looks like this: |
||
<pre> |
<pre> |
||
richard@vito:~$ sudo nano -w /etc/default/vdr |
richard@vito:~$ sudo nano -w /etc/default/vdr |
||
Line 66: | Line 71: | ||
richard@vito:~/src/debian-vdr/build-area$ sudo chown -R vdr:vdr /srv/vdr |
richard@vito:~/src/debian-vdr/build-area$ sudo chown -R vdr:vdr /srv/vdr |
||
</pre> |
</pre> |
||
Now try starting the service |
Now try starting the service... |
||
<pre> |
<pre> |
||
richard@vito:~$ sudo invoke-rc.d vdr start Starting Linux Video Disk Recorder: vdr |
richard@vito:~$ sudo invoke-rc.d vdr start Starting Linux Video Disk Recorder: vdr |
||
Searching for plugins (VDR 1.4.1/1.4.1):. |
Searching for plugins (VDR 1.4.1/1.4.1):. |
||
</pre> |
</pre> |
||
Use the 'ps' command to check |
Use the 'ps' command to check it's running and look at the syslog to see if there were any errors... |
||
<pre> |
<pre> |
||
richard@vito:~$ ps fax | tail | less -S |
richard@vito:~$ ps fax | tail | less -S |
||
Line 94: | Line 99: | ||
(END) |
(END) |
||
</pre> |
</pre> |
||
There are some errors reported but nothing fatal. |
|||
There are some errors reported but nothing fatal. From the 'ps' output you can see that the vdr daemon is being launched from another script called 'runvdr'. Amongst other things, this script searches for configuration data from /etc/default/vdr, searches for VDR plugins and related config data from /etc/vdr/plugins. In common with the original runvdr, it periodically checks that the vdr daemon is still running and tries to restart it if it has crashed. |
|||
From the 'ps' output you can see that the vdr daemon is being launched from another script called 'runvdr'. Amongst other things, runvdr: |
|||
* searches for configuration data from /etc/default/vdr. |
|||
* searches for VDR plugins and related config data from /etc/vdr/plugins. |
|||
* periodically checks that the vdr daemon is still running and tries to restart it if it has crashed. |
|||
* tries to load necessary DVB kernel modules. |
|||
If there is a problem with VDR running as a service, you will notice repeated entries in the syslog that say "restarting VDR". In this case double check that vdr will run directly from the command line and check that it will run as the "vdr" user by passing the -u vdr commandline option. |
If there is a problem with VDR running as a service, you will notice repeated entries in the syslog that say "restarting VDR". In this case double check that vdr will run directly from the command line and check that it will run as the "vdr" user by passing the -u vdr commandline option. |
||
Line 101: | Line 112: | ||
root@vito:/home/richard# LANG="c" vdr -v /srv/vdr -u vdr |
root@vito:/home/richard# LANG="c" vdr -v /srv/vdr -u vdr |
||
</pre> |
</pre> |
||
...note, you must be logged in as root for it to be able to switch to the vdr user. |
|||
⚫ | |||
⚫ | |||
[[Category:Debian]] |
[[Category:Debian]] |
Revision as of 13:19, 20 July 2006
It is assumed that you have already installed a Debian VDR package either from the standard repositories, or by compiling a source package yourself.
- Before continuing, please read the following documents carefully:
richard@vito:~$ less /usr/share/doc/vdr/README richard@vito:~$ less /usr/share/doc/vdr/README.Debian.gz richard@vito:~$ less /usr/share/doc/vdr/INSTALL.gz
Also read, and have open the two VDR man pages:
richard@vito:~$ man vdr richard@vito:~$ man 5 vdr
Having read all of those, you are now ready to continue:
- Try running vdr. The default Video directory is not writable by my user so while we are testing vdr we ask it to use /tmp for video files. You may see a message "please turn off UTF-8 before starting VDR". If so try defining the LANG environment variable:
richard@vito:~$ LANG=c vdr -v /tmp vdr: error while reading '/var/lib/vdr/channels.conf'
You may see this error (at least I did) and it means that the channels.conf file is somehow corrupt. You need to update the channels.conf anyway; it must be tailored to your DVB type (ie DVB-C, DVB-S, DVB-T) and if you are using DVB-T the frequencies depend on your local transmitter. To make a channels.conf use the 'scan' commandline tool, which is part of the dvb-utils package. In my case (DVB-T in the Midlands, UK). In my case I use:
richard@vito:~$ scan -o vdr /usr/share/doc/dvb-utils/examples/scan/dvb-t/uk-SuttonColdfield > /tmp/channels.conf richard@vito:~$ sudo mv /tmp/channels.conf ./
...replace dvb-t/uk-SuttonColdfield with whatever is appropriate for your area.
Having done that, you should be able to run vdr from the command line.
richard@vito:~$ LANG="c" vdr -v /tmp vdr: no primary device found - using first device!
...well it runs, but if you're using a budget card, it has no way of displaying the picture.
Before moving on, and now that we know that vdr is able to run, lets set it up to run as a service at startup. Open /etc/default/vdr in your editor of choice and add 'export LANG="c"' at the top and set ENABLED=1. Mine looks like this:
richard@vito:~$ sudo nano -w /etc/default/vdr
# /etc/default/vdr # # See also /usr/share/doc/README.Debian # export LANG="c" # Change to 1 to enable vdr's init-script ENABLED=1 # Change this to 1 if you want vdr to be able to shutdown the # computer ENABLE_SHUTDOWN=0 # Options that will be passed to vdr's commandline # for example: OPTIONS="-w 15" OPTIONS="-w 60" VIDEO_DIR="/srv/vdr"
If you choose to use a different video directory than the one recommended at installation, you'll have to create it and change its owner to vdr:vdr.
richard@vito:~/src/debian-vdr/build-area$ sudo mkdir -p /srv/vdr richard@vito:~/src/debian-vdr/build-area$ sudo chown -R vdr:vdr /srv/vdr
Now try starting the service...
richard@vito:~$ sudo invoke-rc.d vdr start Starting Linux Video Disk Recorder: vdr Searching for plugins (VDR 1.4.1/1.4.1):.
Use the 'ps' command to check it's running and look at the syslog to see if there were any errors...
richard@vito:~$ ps fax | tail | less -S 8563 ? Ss 0:00 /bin/bash /usr/sbin/runvdr -v /srv/vdr -c /var/lib/vd 8574 ? S 0:00 \_ /usr/bin/vdr-kbd -v /srv/vdr -c /var/lib/vdr -L / 8575 ? S 0:00 \_ /usr/bin/vdr-kbd -v /srv/vdr -c /var/lib/vdr 8578 ? S 0:02 \_ /usr/bin/vdr-kbd -v /srv/vdr -c /var/lib/ 8579 ? RN 0:02 \_ /usr/bin/vdr-kbd -v /srv/vdr -c /var/lib/
richard@vito:~$ tail /var/log/syslog | less -S Jul 19 16:10:34 vito vdr: [8739] found 1 video device Jul 19 16:10:34 vito vdr: [8739] ERROR: invalid primary device number: 2 Jul 19 16:10:34 vito vdr: [8739] ERROR: no primary device found - using first de Jul 19 16:10:34 vito vdr: [8739] setting primary device to 1 Jul 19 16:10:34 vito vdr: [8739] SVDRP listening on port 2001 Jul 19 16:10:34 vito vdr: [8739] setting current skin to "classic" Jul 19 16:10:34 vito vdr: [8739] loading /var/lib/vdr/themes/classic-default.the Jul 19 16:10:34 vito vdr: [8739] switching to channel 19 Jul 19 16:10:34 vito vdr: [8739] setting watchdog timer to 60 seconds Jul 19 16:10:34 vito vdr: [8739] ERROR: no OSD provider available - using dummy (END)
There are some errors reported but nothing fatal.
From the 'ps' output you can see that the vdr daemon is being launched from another script called 'runvdr'. Amongst other things, runvdr:
- searches for configuration data from /etc/default/vdr.
- searches for VDR plugins and related config data from /etc/vdr/plugins.
- periodically checks that the vdr daemon is still running and tries to restart it if it has crashed.
- tries to load necessary DVB kernel modules.
If there is a problem with VDR running as a service, you will notice repeated entries in the syslog that say "restarting VDR". In this case double check that vdr will run directly from the command line and check that it will run as the "vdr" user by passing the -u vdr commandline option.
richard@vito:~$ sudo su root@vito:/home/richard# LANG="c" vdr -v /srv/vdr -u vdr
...note, you must be logged in as root for it to be able to switch to the vdr user.
TODO: more debugging tips.