Starting x11vnc on boot?


Recommended Posts

I am moving my systems over to debian ( I know I said that a while back, but RL has a habit of kicking you up the rear) I have set the server to autologin so that X is started, I have tried various ways to get x11vnc to start on boot after doing a bit of googling and they all suggest the same thing.

 

make a file in /etc/init named x11vnc.conf and add

start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -rfbauth ~/.vnc/passwd -rfbport 5900
end script

this does not work, if i ssh in and type the same line as a normal user it runs and I can connect via vnc.

 

Can anyone see where or what I am doing wrong?

Link to comment
Share on other sites

try this :)

apt-get -y install x11vnc

/usr/bin/x11vnc -storepasswd [password_vnc] /etc/x11vnc.pass

chmod 644 /etc/x11vnc.pass

nano /etc/gdm3/Init/Default

Type above the "exit 0" the following:

/usr/bin/x11vnc -noxdamage -rfbauth /etc/x11vnc.pass -o /var/x11vnc.log -forever -bg -rfbport 5900 -auth guess

reboot
Link to comment
Share on other sites

wont putting

x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -rfbauth ~/.vnc/passwd -rfbport 5900 &

in ~/.xinitrc work? Notice the ampersand at the end

Link to comment
Share on other sites

 

try this :)

apt-get -y install x11vnc

/usr/bin/x11vnc -storepasswd [password_vnc] /etc/x11vnc.pass

chmod 644 /etc/x11vnc.pass

nano /etc/gdm3/Init/Default

Type above the "exit 0" the following:

/usr/bin/x11vnc -noxdamage -rfbauth /etc/x11vnc.pass -o /var/x11vnc.log -forever -bg -rfbport 5900 -auth guess

reboot

 

 

That would work if I was using the Gnome desktop which I am not, I am using XFCE, I have even tried making an auto start entry for it, still didn't work :/

 

wont putting

x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -rfbauth ~/.vnc/passwd -rfbport 5900 &

in ~/.xinitrc work? Notice the ampersand at the end

 

Tried that, still didnt work.

 

The command I used above

x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -forever -rfbauth ~/.vnc/passwd -rfbport 5900 &

Works if I set lightdm to auto log me in, so that X is started, if I ssh in and issue that command, I can use a vncviewer and see the desktop, I can even close the ssh window, so I suppose I will have to live with it as it is, now I have to figure out how to set a dummy monitor as I want it to be headless.

Link to comment
Share on other sites

This topic is now closed to further replies.