Page 1 of 1

autostart x11vnc server at boot

Posted: Thu Dec 31, 2020 10:43 pm
by mx-user-1704
Hi,

I want to autostart x11vnc server at boot, mx used from usb stick, all-persistent.
So i created a file ~/.config/autostart/x11vnc-start.desktop containing:

[code]
[Desktop Entry]
Type=Application
Name=x11vncstart
Exec=x11vnc -forever -display :0 >/dev/null 2>&1 &
[/code]

But vnc did not start at boot.
Please tell me what I am doing wrong.

Thanks,
mx

ps: i think the code tags dont work for me in the forum atm

Re: autostart x11vnc server at boot

Posted: Thu Dec 31, 2020 11:11 pm
by JayM
What happens when you run that command in a terminal?

Code: Select all

x11vnc -forever -display :0 >/dev/null 2>&1 &

Re: autostart x11vnc server at boot

Posted: Thu Dec 31, 2020 11:59 pm
by mx-user-1704
Thanks for the answer, good idea.
Using that command in the terminal starts the vnc server, bc i can connect from remote, but i get no icon on the side panel, what is not a real problem, well would be nice :)
So the command seems to work, but not from autostart folder.

Re: autostart x11vnc server at boot

Posted: Fri Jan 01, 2021 12:03 am
by JayM
Maybe something's misconfigured in your handmade desktop file. You can add that command in (Menu) Settings -> Session and Startup, on the Application Autostart tab. Just create a new entry and paste that command into it, and check the box to have it run when you log in.

Regarding the icon in your panel, I think it's because x11vnc is a command-line app, not a GUI app, so it doesn't have an icon.

Re: autostart x11vnc server at boot

Posted: Fri Jan 01, 2021 12:22 am
by mx-user-1704
The entry is there at Session and Startup already, and checked. That surprised me :) The name is the Name entry from the autostart file. I copy/pasted the Exec line from the autostart file directly into the terminal for the test, so it seems to work.
The icon in the panel is there if x11vnc server is startet from the menu.
Everything looks good, but still ...

Re: autostart x11vnc server at boot

Posted: Fri Jan 01, 2021 12:40 am
by mx-user-1704
Changed the Name entry in the autostart file to something crazy, reboot, Session and Startup shows that name, so its that file. Funny.
And maybe I should work on the cmd line, mom I will try the one from the menu.

Re: autostart x11vnc server at boot

Posted: Fri Jan 01, 2021 1:06 am
by mx-user-1704
New try, and sorry for all the garbage:
Used the cmd from the menu: x11vnc -gui tray=setpass -rfbport PROMPT -bg -o %%HOME/.x11vnc.log.%%VNCDISPLAY
Now at boot, the interface appears, i need to press ok, accept connections, ok.
Thats no good for unattended, but top says x11vnc is running, but i cant connect.
Startet vnc from menu, clicked the mentioned buttons, can connect from remote.
Now top shows 2 xvnc111 running.
Ha, what an adventure :)

I guess i need to work at x11vnc command line.

PS: thanks for the fast answers and happy new year :)