Friday, May 2, 2025
Home Hacking How to run VLC player as root in Linux? Fixing “VLC is not supposed to be run as root. Sorry” error.

How to run VLC player as root in Linux? Fixing “VLC is not supposed to be run as root. Sorry” error.

by blackMORE
34 comments
Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -8

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:

Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -1

[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

Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -2

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.

Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -3

 

Type in geteuid and press Enter.

Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -4

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:

Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -5
Press Ctrl + X to exit saving changes. Save as /usr/bin/vlc.

Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -6

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.

Fixing VLC is not supposed to be run as root. Sorry error. - blackMORE Ops -8

Alternate way

Here’s an alternate way if you don’t want to muck around

sed -i ‘s/geteuid/getppid/g’ $( which vlc)

You may also like

34 comments

Tsepo Lesibe November 3, 2015 - 1:10 am

Thanks, works well!!Youtube channel will be good idea!!

Reply
vulk4n0 November 3, 2015 - 4:27 am

wow, thanks dude! it really works!!

Reply
Pedro November 10, 2015 - 11:10 pm

what movie is in the screenshot?

Reply
blackMORE Ops November 17, 2015 - 5:44 pm

Star Wars, The Force Awakens … trailer.

Reply
Pedro November 17, 2015 - 6:50 pm

thx for sharing that, cheers,

Reply
Ⱥƀđnøɍe ɃɇnmouħAmmɇđ December 21, 2015 - 2:40 am

or try this its work for me “sed -i ‘s/geteuid/getppid/’ /usr/bin/vlc “

Reply
ROFL LOL LOL October 15, 2016 - 12:17 am

NEVER ENTER COMMANDS UNLESS YOU KNOW EXACTLY WHAT THEY DO

Reply
asdasdffasdf February 2, 2016 - 7:42 am

why?

Reply
Aduragbemi February 9, 2016 - 8:00 pm

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.

Reply
ROFL LOL LOL February 26, 2016 - 2:00 am

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

Reply
medlab2015ic March 9, 2016 - 11:54 pm

I was aving trouble opening VLC it couldnt happen at all but after this thanks to you it works LOVE IT!! THANKS DUDE

Reply
mikee April 6, 2016 - 4:13 am

tq so much

Reply
Ja-Kozak April 13, 2016 - 6:00 am

Thanks a lot. Realy good job :)

Reply
reynante chua June 5, 2016 - 9:22 pm

thank you very much for the simple but efective tutorial..i made it

Reply
bear2dbone June 27, 2016 - 2:14 am

Yes. Big Thank you indeed. Worked on the first try.

Reply
perkellinen September 6, 2016 - 2:00 am

So much appreciated dude. It was just what I needed. Thanks!

Reply
Juan September 26, 2016 - 1:22 am

it works. thanks bro.. god bless you

Reply
sin9yt October 14, 2016 - 7:09 pm

Like a Boss!! Super !!!

Reply
Adel Alsharafi November 27, 2016 - 12:47 am

Just run the below command and it will work

root@kali:~# sed -i ‘s/geteuid/getppid/g’ /usr/bin/vlc

Thank you

Reply
Adel Alsharafi November 27, 2016 - 12:53 am

root@kali:~# sed -i ‘s/geteuid/getppid/g’ /usr/bin/vlc
root@kali:~# vlc

Reply
bishal December 1, 2016 - 9:45 pm

file:///root/Pictures/Screenshot%20from%202016-12-01%2011-43-04.png
its not working

Reply
Evans December 21, 2016 - 8:56 pm

Ahem! just use it as root, some of us have to learn the hard way.

Reply
Rishikanta Manganag January 8, 2017 - 4:49 pm

Thank………………………………

Reply
Mark January 16, 2017 - 8:37 pm

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.. :)

Reply
morefocus April 9, 2017 - 9:25 pm

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/

Reply
youcef March 30, 2017 - 7:24 am

thaaaaaaaaaaaaaaaaaaaaaaaaaank you..run very well in my kali

Reply
ryan August 17, 2017 - 5:13 pm

sed -i ‘s/geteuid/getppid/’ /usr/bin/vlc

Reply
Kevin December 31, 2017 - 5:12 am

This method worked previously but now I. Kali latest edition or full-upgrade none of these methods are working any Insight is appreciated

Reply
john November 29, 2019 - 1:26 am

it works fine now too, with kali 2019.4…

Reply
Peter December 31, 2017 - 6:29 am

Wow, thanks and such an easy fix!!

Reply
no_guru_but January 4, 2018 - 1:15 am

It’s done that way for YOUR SECURITY people!

Reply
Afro February 10, 2018 - 9:29 am

sed -i ‘s/geteuid/getppid/g’ /usr/bin/vlc

just run this on terminal, VLC will start working

Reply
Bane_of_athropods June 2, 2018 - 2:57 am

yey it works after all that internet page hunting

Reply

Leave a Reply to asdasdffasdfCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About Us

Lorem ipsum dolor sit amet, consect etur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis..

Feature Posts

Newsletter