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

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

VLC running as root error - Click to expand

VLC running as root error - Click to expand

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

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


Check Also

Correct way of installing VirtualBox Guest Additions in Kali Linux 2016.2/2017 (Kali Rolling)

How to install VirtualBox Guest Additions in Kali Linux (Kali Rolling / Kali Linux 2016.2 / Kali 2017)

Since Kali Linux 2016 came out (also known as Kali Rolling), it seems that Official …

Changing GRUB timeout in Kali Linux - blackMORE Ops -4

Changing GRUB timeout in Kali Linux

I use Kali Linux alongside my Windows in my Laptop (yes I do use Windows …

33 comments

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

    • **** DO NOT RUN VLC AS ROOT.
      **** IT RISKS MALWARE INFECTIONS EMBEDDED IN MEDIA.
      **** AND THERE MAY EVEN BE AN EXPLOIT BASED ON VLC ITSELF
      **** THAT IS WHY THE WARNING IS THERE – TO STOP YOU BEING AN IDIOT.

      Find another way.

  2. wow, thanks dude! it really works!!

    • **** DO NOT RUN VLC AS ROOT.
      **** IT RISKS MALWARE INFECTIONS EMBEDDED IN MEDIA.
      **** AND THERE MAY EVEN BE AN EXPLOIT BASED ON VLC ITSELF
      **** THAT IS WHY THE WARNING IS THERE – TO STOP YOU BEING AN IDIOT.

      Find another way.

      • Take it easy man. A lot of people (idiots) like me love to taking risks. It works! and BTW all the instruction given here are safe as as houses.

        • I bet you get some interesting viruses lol :-)

          It’s certainly not safe as houses, unless you are thinking of an earthquake zone. It creates an open door for malware. Which is why the nice folks at Videolan/VLC put in the code to stop unsuspecting fools running it as root.

          And it’s pretty evident that people here – particularly people offering profuse thanks – are completely clueless (or else are faking it with some dark motive to encourage others to get themselves hacked).
          Not really fair to advantage of fools. Not even that much fun.

          It’s been known for nasty people out there in the internets to post some really vicious code tricks for the naive & the unwary – things that will “break your computer” in the parlance of other clueless advisors. This one comes close, even if it isn’t directly destructive.

          Best of luck, stay safe.

          And DON’T RUN VLC AS ROOT. You never need to. Keep your back door safe.

  3. what movie is in the screenshot?

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

    • I suppose so that scammers can infect systems with malware, for anyone that takes this advice without knowing _exactly_ what they are doing. And, anyone coming here and taking this advice, by definition doesn’t know what they are doing.

      I suppose all the silly “wow, great” comments are actually put there by the scammers themselves.

      Message to the rest of you:

      **** DO NOT RUN VLC AS ROOT.
      **** TO DO SO OPENS YOUR SYSTEM TO MALWARE INFECTIONS EMBEDDED IN MEDIA.
      **** THAT IS WHY THE WARNING IS THERE – TO STOP YOU BEING AN IDIOT.

      Find another way.

  5. 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.

  6. 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

    • **** DO NOT RUN VLC AS ROOT.
      **** IT RISKS MALWARE INFECTIONS EMBEDDED IN MEDIA.
      **** AND THERE MAY EVEN BE AN EXPLOIT BASED ON VLC ITSELF
      **** THAT IS WHY THE WARNING IS THERE – TO STOP YOU BEING AN IDIOT.

      Find another way.

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

  8. Thanks a lot. Realy good job :)

    • **** DO NOT RUN VLC AS ROOT.
      **** IT RISKS MALWARE INFECTIONS EMBEDDED IN MEDIA.
      **** AND THERE MAY EVEN BE AN EXPLOIT BASED ON VLC ITSELF
      **** THAT IS WHY THE WARNING IS THERE – TO STOP YOU BEING AN IDIOT.

      Find another way.

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

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

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

  12. it works. thanks bro.. god bless you

  13. Like a Boss!! Super !!!

    • **** DO NOT RUN VLC AS ROOT.
      **** IT RISKS MALWARE INFECTIONS EMBEDDED IN MEDIA.
      **** AND THERE MAY EVEN BE AN EXPLOIT BASED ON VLC ITSELF
      **** THAT IS WHY THE WARNING IS THERE – TO STOP YOU BEING AN IDIOT.

      Find another way.

  14. Just run the below command and it will work

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

    Thank you

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

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

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

  18. Rishikanta Manganag

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

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

    • If ANYONE out there reads my Question/Problem above and think they have a possible solution.
      Or if you think its not possible at All. Whatever your answer, I NEED to hear it. So please Email me with
      ANY kind of FeedBack!! Much.. Much Appreciated.

      Please Email me at markwelch007@hotmail.com.

      Thanks Again…Cheers!!! :)

Leave a Reply

Your email address will not be published. Required fields are marked *