Installing x11vnc
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Installing x11vnc
Do not use tightvnc-server as those create virtual desktops rather than the actual one. For actual desktop, you will need an x11 compatible vnc.
https://tecadmin.net/setup-x11vnc-serve ... linuxmint/
https://askubuntu.com/questions/229989/ ... gin-screen
In this case, follow the instructions in the comments regarding setting up the service, rather than using /etc/init/x11vnc.conf
If the port is in use, you may run:-
lsof -i :5901
to see what is using port 5901
The program may suggest using the ncache option, but this is incompatible with several clients and produces long screens, so leave this out unless the client understands the caching.
https://tecadmin.net/setup-x11vnc-serve ... linuxmint/
https://askubuntu.com/questions/229989/ ... gin-screen
In this case, follow the instructions in the comments regarding setting up the service, rather than using /etc/init/x11vnc.conf
If the port is in use, you may run:-
lsof -i :5901
to see what is using port 5901
The program may suggest using the ncache option, but this is incompatible with several clients and produces long screens, so leave this out unless the client understands the caching.
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
The contents of the /etc/systemd/system/x11vnc.service is as follows:-
1. installed x11vnc and net-tools
2. installed lightdm and switched to it from gdm3
3. installed the passwords for vnc
4. sudo systemctl enable x11vnc (so that this starts up at boot)
5. sudo systemctl start x11vnc
This assumes that you have successfully:-[Unit]
Description=x11vnc remote desktop server
Requires=display-manager.service
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -noxdamage -repeat -rfbauth /etc/init/x11vnc.pass -rfbport 5901 -shared -display :0
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target
1. installed x11vnc and net-tools
2. installed lightdm and switched to it from gdm3
3. installed the passwords for vnc
4. sudo systemctl enable x11vnc (so that this starts up at boot)
5. sudo systemctl start x11vnc
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
This presumes placing the password in the /etc/init/x11vnc.pass file with the command:-
sudo x11vnc -storepasswd xxxxxxx /etc/init/x11vnc.pass
sudo x11vnc -storepasswd xxxxxxx /etc/init/x11vnc.pass
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
This might help with potential solutions. We're having difficulty installing x11vnc on Ubuntu 18.04 with Wayland. The problem is that display :0 is not accessible it seems. This is especially so when launched in headless mode.
https://askubuntu.com/questions/767752/ ... less-16-04
https://askubuntu.com/questions/767752/ ... less-16-04
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
This might help get display :0 on headless setups
https://fabianlee.org/2018/10/14/ubuntu ... ver-hosts/
https://fabianlee.org/2018/10/14/ubuntu ... ver-hosts/
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
Another thing to do is to use lightdm as the display-manager:-
sudo dpkg-reconfigure lightdm
sudo systemctl start lightdm
Then in the start up of x11vnc use:-
-auth /var/run/lightdm/root/:0
assuming that exists in the directory
sudo dpkg-reconfigure lightdm
sudo systemctl start lightdm
Then in the start up of x11vnc use:-
-auth /var/run/lightdm/root/:0
assuming that exists in the directory
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
Prior to anything working, you will need to ensure that:-
echo $DISPLAY
actually returns something like "localhost 0:0"
xhost
should also return something
echo $DISPLAY
actually returns something like "localhost 0:0"
xhost
should also return something
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
In several cases, you may need to set up a dummy monitor with headless servers.
https://askubuntu.com/questions/453109/ ... plugged-in
https://askubuntu.com/questions/1066721 ... o-graphics
https://askubuntu.com/questions/453109/ ... plugged-in
https://askubuntu.com/questions/1066721 ... o-graphics
-
- Site Admin
- Posts: 2449
- Joined: Wed 25 Feb 25 2009 8:00 pm
Re: Installing x11vnc
This gives a working setup with lightdm:
https://www.crazy-logic.co.uk/projects/ ... en-sharing
This one is interesting in that it covers headless setups and also provides a gdm3 solution.
https://lxtreme.nl/blog/headless-x11/
Switching between lightdm and gdm3 can be done using:-
sudo dpkg-reconfigure gdm3
https://www.crazy-logic.co.uk/projects/ ... en-sharing
This one is interesting in that it covers headless setups and also provides a gdm3 solution.
https://lxtreme.nl/blog/headless-x11/
Switching between lightdm and gdm3 can be done using:-
sudo dpkg-reconfigure gdm3