Running VLC as root

Code:
root@ThinkPad:~ # vlc
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).

I know I'm not supposed to run as root but I'm the only person using the system so I'll take the risk...

Can someone explain how to use vlc-wrapper?

The manpage for vlc-wrapper says:

Code:
USAGE
       The preferred way is to use sudo :

        $ sudo vlc-wrapper --option1 --option2

       You can also set the SUDO_UID environment variable:

        # SUDO_UID=1000 vlc-wrapper --option1 --option2
 
Thanks for the suggestion... I don't usually like to build pkgs as they take a long time and something often goes wrong.

I tried to find a command line parameter equivalent to SUDO but couldn't stumble upon it although I'm sure there must be one.
 
There is a dirty hack to patch the actual binary by replacing one string with another in a hexeditor:
geteuid -> getppid

People report that even a sed(1) command works:
sed -i 's/geteuid/getppid/' /usr/local/bin/vlc
Not sure how save would be using sed(1) on binary files though. You can always back up the vlc executable prior.
 
Please take a step back and look at the extraordinary measures you are taking to try to use an unsafe option. The simpler, easier, and safer way is to not run as root. You can learn the easy way, from other users' mistakes, or the hard way by making your own, but it is not a lesson that can be avoided.
 
If you are able to let us know why you want to run VLC as root we might be able to offer an alternative way to get the same end result you're seeking.
 
If you are able to let us know why you want to run VLC as root we might be able to offer an alternative way to get the same end result you're seeking.

It's OK - someone pointed out that one of the options available when building VLC is 'runasroot'. I selected that and managed to build it.
 
Please take a step back and look at the extraordinary measures you are taking to try to use an unsafe option. The simpler, easier, and safer way is to not run as root. You can learn the easy way, from other users' mistakes, or the hard way by making your own, but it is not a lesson that can be avoided.

I'm in a home environment and would like to put together a desktop environment suitable for a typical Windows user, ie browsing the Internet, having access to a Microsoft Office-type suite, listening to music, watching movies etc. I'm not entirely sure what harm I can do running VLC as root.
 
Well, it's not recommended working as root in general. There are many reasons for that. Besides setting up software and configuring the system there is no need to do so.
Regarding the VLC itself: I do use it much in my home computer (which is hooked up to a large TV), but I never had any issue with running it as regular user. If you want to stream video/audio through the privileged ports outside of your home network, that could be a reason. However it can be solved with a router which is needed in such case anyway.
 
Back
Top