Run VLC on Linux as Root
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:
-
check whether VLC can run as root, via Terminal or FileManager
-
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 -
Backup the vlc (optional in case you trust yourself)
cp /usr/bin/vlc /usr/bin/vlc.bkp
-
Open the vlc with the hexeditor
hexeditor /usr/bin/vlc
-
Search for 'geteuid'
Pressctrl + w
to search.
Once the search dialog is displayed,
You can pressA
for text search,
or
select 'search for text string' and PressENTER
to search -
Replace 'geteuid' with 'getppid'
Press thetab
button to switch from hex to text as it is easier to edit plain text than Hex. -
Save & exit.
Pressctrl + x
Press ctrl + c
to exit the hexeditor without saving the changes you've made to 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
- 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.