简体   繁体   中英

Unable to launch x11vnc before login on Kubuntu 16.04

I was following this guideline regarding Continuously running x11vnc on my Kubuntu 16.04. I found Xsetup in here /etc/sddm/Xsetup and I added there:

 /usr/local/bin/x11vnc -rfbauth /path/to/the/vnc/passwd -o /var/log/x11vnc.log -forever -bg

x11vnc is started correctly and I can see it in process list AFTER I login as some user. I'd like for it to be working BEFORE I log into Linux.

I found some solutions on Stack Overflow however they are not relevant to Kubuntu 16.04

Any ideas?

Thanks!

So aparently 16.04 has a bug related to sddm that make the x11vnc's -auth guess (which I think is happening by default in your example) logic to fail. The solution is to add -auth /var/run/sddm/* -display :0 to your command line, which I have had success with.

I solved this problem on Kubuntu 16.04 adding into /usr/share/sddm/scripts/Xsetup the following line:

/usr/bin/x11vnc -rfbauth [YOUR X11VNC PASSWORD FILE LOCATION]  -o /var/log/x11vnc.log -forever -bg

Before that I generated password using:

sudo x11vnc -storepasswd 

This allows to launch x11vnc process as root even at Kubuntu login screen.

To run a script at startup of Kubuntu, before login, you would edit /etc/rc.local and add your desired commands.

Make sure that the script ends with exit 0 .

For example:

/usr/local/bin/x11vnc -rfbauth /path/to/the/vnc/passwd -o /var/log/x11vnc.log -forever -bg
exit 0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM