I am trying to configure the x11vnc on my Lubuntu 18.04 machine in order to send it somewhere else and work remotely on it via TightVnc from a windows pc. I've been trying to achieve this many days, reading many tutorials, and finally I did it. However, I can only connect with my VNC client software after the login. I tried to make x11vnc to auto-start from the Default applications for LXSession, but it still auto-runs only after the login. When I try to connect with TightVnc when the login appears , a black screen is shown. I've read many solutions, especially for Ubuntu, but are not suitable for Lubuntu 18.04. I think I need to make the x11vnc to start while the device is booting. Any advice would be appreciated.
These are the steps I followed:
sudo apt-get install x11vnc
Set a password
sudo x11vnc -setpasswd
Run the following command to enable the vnc connections
x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
After these commands, I was able to connect with VNC client software