Compile and install mp-switch-video
-----------------------------------

Couldn't be easier:

make
make install

By default, it'll put the executable ("mp-switch-video") in /usr/local/bin. 
If you don't like this, change the makefile as appropriate.

mp-switch-video needs root permissions to run. This will get things off and running.


Applying the kernel-patch which fixes the problem with the system beep
----------------------------------------------------------------------
To apply the patch to your kernel, cd to your kernel source directory
(most probably /usr/src/linux) and call patch:

patch -p0 < /where/you/put/the/file/kernel-patch-no-speaker.diff


Using mp-switch-video in the inittab
------------------------------------

You can use mp-switch-video either in a script before you start vdr or
in /etc/inittab to define a hotkey to switch manually between VGA and DVB.
For sure, you can start it directly by hand, if  you want.

Here are two real-life examples from my /etc/inittab:

# Switch between VGA and DVB out when <ALT>+<CRSR-UP> is pressed.
# The key combination can be changed
kb::kbrequest:/usr/local/bin/mp-switch-video

# Run vdr on console 8, automatically enable DVB-out and switch
# focus to this console so the keyboard can be be directly used
# to control vdr (the "mp-runvdr" script is included in this
# package). When you want to use another tty, you also have
# to change the script.
8:2345:respawn:/usr/local/bin/mp-runvdr


How to give a normal user root permissions so she can use mp-switch-video
-------------------------------------------------------------------------

By default mp-switch-video is not installed with the suid bit set,
because that would just be zany. The only reason not to is that
any suid program is a potential security hole. Conveniently,
mp-switch-video is very short, so auditing it is pretty 
straightforward.

Decide for yourself, of course, but it looks safe to me - there's only one 
buffer and fgets doesn't let it overflow, there's only some port reads and
writes to fixed addresses, so the risk is not very high.

So the quick solution is mp-switch-video is not working when you want it to is:

$ su
Password:
# chmod 4755 /usr/local/bin/mp-switch-video

(or wherever you put it)

The one snag is that this will give any little nitwit the ability to run mp-switch-video 
successfully - make sure this is what you want.  If it isn't, a slightly more 
complex fix would be something like:

# chgrp video /usr/local/bin/mp-switch-video
# chmod 4750 /usr/local/bin/mp-switch-video

and then add only "mp-switch-video" worthy users to the 'video' group.

