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
Thanks, works well!!Youtube channel will be good idea!!
wow, thanks dude! it really works!!
what movie is in the screenshot?
Star Wars, The Force Awakens … trailer.
thx for sharing that, cheers,
or try this its work for me “sed -i ‘s/geteuid/getppid/’ /usr/bin/vlc “
NEVER ENTER COMMANDS UNLESS YOU KNOW EXACTLY WHAT THEY DO
why?
you are the best!!! please i would like to have your email and if possible skype…. i use KALI and also a fan of knowledge.
Why? Why would you want to expose your system to malware embedded in media? Giving it inherited root permissions?
You are anti-virus tester perhaps. Ah, but if you had any technical knowledge you wouldn’t be asking the stupid question
Running VLC as root is a plum crazy idea.
I assume that’s why the check is there – a safety measure to remind people, and to warn non-tech people in particular, that running a player (or a browser, for that matter) as root is idiotic.
ROFL
I was aving trouble opening VLC it couldnt happen at all but after this thanks to you it works LOVE IT!! THANKS DUDE
tq so much
Thanks a lot. Realy good job :)
thank you very much for the simple but efective tutorial..i made it
Yes. Big Thank you indeed. Worked on the first try.
So much appreciated dude. It was just what I needed. Thanks!
it works. thanks bro.. god bless you
Like a Boss!! Super !!!
Just run the below command and it will work
root@kali:~# sed -i ‘s/geteuid/getppid/g’ /usr/bin/vlc
Thank you
root@kali:~# sed -i ‘s/geteuid/getppid/g’ /usr/bin/vlc
root@kali:~# vlc
file:///root/Pictures/Screenshot%20from%202016-12-01%2011-43-04.png
its not working
Ahem! just use it as root, some of us have to learn the hard way.
Thank………………………………