VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVDs, Audio CDs, VCDs, and various streaming protocols. It is one of the most used and popular Media player for Linux users.Very easy to install as it’s available via almost any Linux distro’s repo. However, in case you use Linux as root user like me, (or you’re a fellow Kali Linux user) then you have already seen this error “VLC is not supposed to be run as root. Sorry
“. This post will go through the steps required to run vlc
as root in Linux (any Linux to be precise).
In case you don’t have VLC
installed, you can use the following command:
apt-get install vlc
But when you try to run VLC
as root
, you will see the following error:
[toggle title=”VLC running as root error – Click to expand” state=”close”]
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).
[/toggle]
Fixing “VLC is not supposed to be run as root. Sorry” error.
Though it is not advisable to run the applications as root, but there is a way to do that. First of all, take a backup:
root@kali:~# cp /usr/bin/vlc /usr/bin/vlc-backup
Now open vlc
binary using hexeditor
:
root@kali:~# hexeditor /usr/bin/vlc
This will open VLC
binary in hexeditor
. Press CTRL+W
to open search window. Select “search for text string
” and press enter.
Type in geteuid
and press Enter.
Now Press Tab
key on your keyboard. This switches you to ASCII
side of hexeditor
.
Replace geteuid
with getppid
as shown in the image below:
Press Ctrl + X
to exit saving changes. Save as /usr/bin/vlc
.
To revert your changes, you just need to restore the backup created earlier:
root@kali:~# cp /usr/bin/vlc-backup /usr/bin/vlc
Pretty easy.
Alternate way
Here’s an alternate way if you don’t want to muck around
sed -i ‘s/geteuid/getppid/g’ $( which vlc)
34 comments
Hello..(Although i can play HEVC/x265 videos just fine using MPC-HC..) ive been doing some research on trying to Hack a version of VLC..to try to get a version to run through Ubuntu on a system running Windows 7 (64 bit)…My Question to anyone who Reads this..is…”Is this Possible at All to Hack and Run a Version of VLC and get it to play HEVC/x265 videos by making it think its being run through an imaginary version of Ubuntu, on a Laptop running a (64bit) of Windows 7? ORRRRR ….. Do i have to actually install Ubuntu and then continue to run Win7 n try the Hack then? in Either Case…is it possible? cuz I believe VLC can only Encode the HEVC/x265 videos but not Audio right now.. Please email me ur answer as soon as you get this. Thanks a Million n Cheers.. :)
Did you try a search engine for [ play HEVC/x265 videos ]?
You might find something from 2014, I don’t know if that still works.
Make sure you have updated your VLC.
Failing that, try a more focused forum https://forum.videolan.org/
thaaaaaaaaaaaaaaaaaaaaaaaaaank you..run very well in my kali
sed -i ‘s/geteuid/getppid/’ /usr/bin/vlc
This method worked previously but now I. Kali latest edition or full-upgrade none of these methods are working any Insight is appreciated
it works fine now too, with kali 2019.4…
Wow, thanks and such an easy fix!!
It’s done that way for YOUR SECURITY people!
sed -i ‘s/geteuid/getppid/g’ /usr/bin/vlc
just run this on terminal, VLC will start working
yey it works after all that internet page hunting