4

I'm running Raspbian on an RPi2 and I'm trying to start x11vnc on boot but I can't get it to work.

x11vnc is working but the autostart is not. I created /home/pi/.config/autostart/x11vnc.desktop with the following contents:

[DESKTOP ENTRY]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false

but it's not executing the command on startup...

Any ideas why this is not working?

4

To start x11vnc at boot (not from the user profile) it would be better to add the following line to the /etc/rc.local (before exit 0) Source

/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log  > /dev/null 2>&1
4

note that by using -fbauth you will first need to store the password. Issue this command a single time. Change "somepassword" to whatever you want

/usr/bin/x11vnc -storepasswd somepassword /etc/x11vnc.pass
3

I'm not sure why this worked but I copied the x11vnc.desktop file from /usr/share/applications/ and modified it to look similar to the contents above and it seemed to fix the problem...

  • 1
    How did you modify it? Your answer is useless without that information. – T3db0t Jun 8 '16 at 19:09
  • pi@raspberrypi:~ $ cat .config/autostart/x11vnc.desktop [Desktop Entry] Name=X11VNC Server Comment=Share this desktop by VNC Exec=x11vnc -gui -usepw -forever -loop Icon=computer Terminal=false Type=Application StartupNotify=false #StartupWMClass=x11vnc_port_prompt Categories=Network;RemoteAccess; – vaddieg Sep 3 '17 at 1:02

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.