I'm using a customized Linux distribution generated via buildroot. I use x11vnc for remote access, always logging in with root. But now, I need to enable an user without root privileges to start x11vnc, even though the X server was started by root.

In my research, I came across numerous methods for doing so, but all of them using resources our customized distribution doesn't currently have, such as xauth or xhost.

Is there any simple way to enable x11vnc for non-root users?


I found a way for a non-root user to start x11vnc without having to install or configure anything else. It's perhaps not the cleanest way to do it, but it works.

I created a script that runs during startup:


cd  /home/amorimph/
while true; do
    if [ -e startVNC ]
        x11vnc -display :0
        rm startVNC

It checks the user's directory for the existence of the 'startVNC' file. Then, when I log in as this non-root user, a touch startVNC starts x11vnc and the file is removed after the process exits.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.