Skip to content

4dbyron/VLC_as_Root

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

VLC_as_Root

Run VLC on Linux as Root

By Byron Taaka

For security reasons, VLC does not run on Linux as root by default.
However, if you really need to run VLC when logged in as root.

You can watch this video
or
Follow this 'One-Time' procedure:

  1. check whether VLC can run as root, via Terminal or FileManager

  2. Get the Absolute path to our VLC using the 'which' command:
    which vlc
    in my case and probably Yours, the resulting path is /usr/bin/vlc

  3. Backup the vlc (optional in case you trust yourself)
    cp /usr/bin/vlc /usr/bin/vlc.bkp

  4. Open the vlc with the hexeditor
    hexeditor /usr/bin/vlc

  5. Search for 'geteuid'
    Press ctrl + w to search.
    Once the search dialog is displayed,
    You can press A for text search,
    or
    select 'search for text string' and Press ENTER to search

  6. Replace 'geteuid' with 'getppid'
    Press the tab button to switch from hex to text as it is easier to edit plain text than Hex.

  7. Save & exit.
    Press ctrl + x

We Are Done!

Now You can Enjoy VLC on root.



Undoing Changes:

7. Exit Without Saving

Press ctrl + c to exit the hexeditor without saving the changes you've made to VLC.

8. Restore Original VLC

In case You change your mind about running vlc as root,
replace the getppid with geteuid,
or
Restore the VLC backup with:
cp /usr/bin/vlc.bkp /usr/bin/vlc


Note:

  • Upon upgrading VLC, You will need to ReDo steps 1-6.
  • hexeditor comes preinstalled in most Linux/Unix-Like distributions.
  • All the hexeditor commands / shortcuts used here are displayed at the bottom of the hexeditor screen whenever applicable.