VLC is not supposed to be run as root. Sorry.解决方案

最近在centos上,安装vlc播放器,发现不能使用root用户打开,报错

VLC is not supposed to be run as root

百度该错误,大概都是下面的解决方案。。。不知道怎么弄的  居然全是英文的,就没一个人翻译下?

This error says straight forward vlc can not be run as root privileged user. What to do now? Don’t be panic. Here is the hacked solution :-D
vi /usr/bin/vlc 
search for geteuid and replace it with getppid

Save file & Exit.

最重要的是,这个已经不起作用了。。。
最后谷歌解决该问题

Run vlc as root

给不能的同志截取一下

cp /usr/bin/vlc /usr/bin/vlc-backup
needle=$(objdump -d /usr/bin/vlc | grep euid | tail -1 | awk '{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6;}')
sed -ir "s/$needle/\xb8\x01\x00\x00\x00/" /usr/bin/vlc

安装完vlc后,依次执行上述三条命令即可。

你可能感兴趣的:(VLC is not supposed to be run as root. Sorry.解决方案)