Making technology work for you...

Get Your Free Subscription By Email:

Hacking VLC To Run As Root On Linux

If you try to run VLC under root user on Linux, you will be blocked with message : "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).". While it is a good security practice to not run non-system executables under root privileges, but at times you might need the exception. Here's a solution to allow VLC and cvlc (command-line version of vlc) run under the root user-account.

VLC no root allowed error

To get VLC working under root user we must hack the executable using the following method:

  1. If you are not a vi ninja, install the graphical editor using sudo apt-get install vim-gnome and start it.
  2. Open the vlc executable in vi from /usr/bin/vlc and search for string geteuid, replacing it with getppid as shown below. Make sure you make a backup of vlc app before doing this and no other changes are made to the file.
  3. VLC set uid
    vlc user id hacked
  4. Save this modified vlc file and execute it again, it should now work fine under root user as shown below.
  5. VLC working under root

Add new comment

This is just one of the many helpful tips we have posted, You can find more stories here,
Do subscribe to updates using your favorite RSS feed reader or using the secure FeedBurner email update form on top of this post.