Bad Idea of the day, Disabling VLC root check

Trailing in the deeps of the interwebs, I found an interesting Post, It teaches how to disable the root check for the VLC media player.
 
As some may know VLC rightfully refuses to run as root, and why you would want to run a video player as root is beyond me, but the post explain in some detail how to use a hex editor to search and alter the call to the ‘geteuid()’ function to a call of the ‘getppid()’ function effectively neutering the root check.
 

While the above method is entertaining a faster way of doing this kind of dirty patch is to simply use sed running the following as root:

sed -i ‘s/geteuid/getppid/g’ $( which vlc)

 
With this your pesky VLC player won’t be complaining of running as root.
While this is a generally bad idea and you probably shouldn’t be running stuff as root in the first place, the basic idea applies to any program and is an easy way to patch Linux binaries.
 

Sources:

https://www.blackmoreops.com/2015/11/02/fixing-vlc-is-not-supposed-to-be-run-as-root-sorry-error/
https://linux.die.net/man/2/geteuid
https://linux.die.net/man/2/getppid