Sunday, November 4, 2012

Kali Linux - vlc as root ???

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

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.

credit to this link : https://www.blackmoreops.com/2015/11/02/fixing-vlc-is-not-supposed-to-be-run-as-root-sorry-error/

No comments:

Post a Comment