How to run VLC player as root user

I ran into this a while back when I needed VLC running as root on a headless server, and the usual --no-sandbox flag didn’t cut it. VLC refuses to start as root by default, which makes sense from a security standpoint but is annoying when you actually need it. The fix is brutal and hacky, but it works: sed -i 's/geteuid/getppid/' /usr/bin/vlc What’s actually happening here? VLC’s startup script checks whether the effective user ID is zero (root). If it is, it bails out. By swapping geteuid with getppid, we’re telling the script to check the parent process ID instead of the effective UID. Since getppid() returns a number way bigger than zero, the check passes and VLC starts. ...