I'm trying to use Vlc with sudo but it doesn't work.
This is the error:
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).
Can you help me here?
Edit: I am adding a reason after reading comments.
I just want to give one reason: I am using mac + ubuntu and my movies collection are in mac boot disk. which is shown as read only form ubuntu(I don't know why) and I cant run chmod on files. I can access Movies,Documents files using nautilus with sudo. But to play these files I need VLC with sudo. I think it's a good reason.
You will be able to run VLC as root by modifying the VLC binary, located in
/usr/bin
First, you'll need a hex-editor, like Bless :
Then, you'll open the VLC binary with the hex-editor :
Search and change the
geteuid
string bygetppid
, save and exit.You can now launch VLC as root.
Sudo is your friend, it is there to protect you. If you really just don't want to type your password and you don't care about the security then you should look into
ssh-agent
. It can save your password so you will only need to type your password once per session.You really should not be logged in as root all the time. End of story. A lot of programs and applications will detect this and refuse to run, because it's bad practice.
If the only reason you have to run as root is to avoid being bothered to enter your password when you run a potentially system-damaging command (also there for your protection), you can simply configure sudo to not require the password all the time.
You will still have to type "sudo" before running some commands, but it will not ask for the password.
Bu default you should already be in the
sudo
group, so just do this:Then look for this line:
Change it to:
Then save the file and exit. Then it will not ask for your password every time.
No, you're jumping to conclusions without thinking twice about possible causes for the issue you have and side effects or damage done to your installation by using such a crude workaround.
The following worked for me:
credit to @rodvlopes : https://unix.stackexchange.com/a/199422