How to Install and Run VLC Media Player as Root in Linux

VLC is a free and open source cross-platform multimedia player, encoder and streamer that works. It is a very popular (and possibly the most used) media player out there.

Some of its notable features include support for almost all (if not most) multimedia files, it also supports Audio CDs, VCDs, and DVDs. Additionally, VLC supports various streaming protocols enabling users to stream content over a network.

Suggested Read: 10 Best Open Source Media Players for Linux

In this article, we will show you a simple hack that will enable you to run VLC media player as root user in Linux.

Note: There is a reason why VLC won’t run in a root account (or can’t be run as root), so because the root account is for system maintenance only, not for everyday activities.

Install VLC Player in Linux

Installing VLC is so easy, it is available in official repositories of mainstream Linux distros, just run the following command on your respective Linux distribution.

$ sudo apt install vlc   	 #Debain/Ubuntu
$ sudo yum install vlc 	         #RHEL/CentOS
$ sudo dnf install vlc   	 #Fedora 22+

If you are running your Linux system as root, for example Kali Linux, you’ll get the error below when you try to run VLC.

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

Alternative Ways to Run VLC as Root User

Run the sed command below to make changes in the VLC binary file, it will replace the geteuid variable (which determines the effective user ID of the calling process) with getppid (which will determine the parent process ID of the calling process).

In this command, ‘s/geteuid/getppid/‘ (regexp=geteuid, replacement=getppid) does the magic.

$ sudo sed -i 's/geteuid/getppid/' /usr/bin/vlc

Alternatively, edit the VLC binary file using a hex-editor such as bless, hexeditor. Then search for geteuid string and replace it with getppid, save the file and exit.

Yet again, another way around this is to download and compile the VLC source code by passing the --enable-run-as-root flag to ./configure and VLC should be able to run as root.

That’s all! You should now run VLC as root user in Linux. To share any thoughts, use the feedback form below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

16 Responses

  1. DK says:

    Thank You Sir…. within 3 seconds problem solved ” Love You So Much

  2. Angel says:

    thanks so very much; very helpful

  3. kunal says:

    “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-U
    please help me sir and give command for problem rectification

  4. PHILEMON SUNDAY says:

    Thanks very much.

  5. ashish says:

    thanks alot sir for your help

  6. Tony Rawlings says:

    Off subject a bit but just installed Kodi. Great video player.
    Easily installed
    sudo dnf install kodi
    Job done

  7. Dale Pontius says:

    This just seems like a BAD idea, to me. From what I’ve read, a frequent exploit path is a cleverly designed media file that takes advantage of a bug in the player software. This is one of the reasons we don’t do such things as root.

    • Aaron Kili says:

      @Dale

      Okay, we have taken note of all the concerns here. However, a number of Kali Linux newbies had requested for this solution and that is why we offered it. As you have stated, it could be so dangerous.

  8. IPnonymouse says:

    what are some reason why a person would want to run vlc as root?

Got something to say? Join the discussion.

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

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