configuring_the_right_vnc_setup
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| configuring_the_right_vnc_setup [2024/12/24 07:41] – created mike | configuring_the_right_vnc_setup [2026/04/08 08:27] (current) – mike | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Configuring Remote VNC on Ubuntu ====== | ====== Configuring Remote VNC on Ubuntu ====== | ||
| - | ---- | + | |
| Ubuntu 18.04 (and possibly later versions) switched from LightDM to GDM3. Connecting to the login screen with VNC while using GDM3 is currently not possible. The easiest way to get this VNC functionality back is to simply switch back from GDM3 to LightDM (which is still being activity developed and used by many Linux distros). | Ubuntu 18.04 (and possibly later versions) switched from LightDM to GDM3. Connecting to the login screen with VNC while using GDM3 is currently not possible. The easiest way to get this VNC functionality back is to simply switch back from GDM3 to LightDM (which is still being activity developed and used by many Linux distros). | ||
| - | Install LightDM | + | === Install LightDM |
| + | |||
| + | apt install lightdm | ||
| + | |||
| + | Should you for some reason come to regret switching to LightDM you can revert back to GDM3: | ||
| + | |||
| + | dpkg-reconfigure gdm3 | ||
| + | |||
| + | === Install x11vnc from packages === | ||
| + | |||
| + | apt install x11vnc | ||
| + | |||
| + | === Create the file / | ||
| + | |||
| + | # Description: | ||
| + | # File: / | ||
| + | [Unit] | ||
| + | Description=" | ||
| + | Requires=display-manager.service | ||
| + | After=display-manager.service | ||
| + | |||
| + | [Service] | ||
| + | ExecStart=/ | ||
| + | ExecStop=/ | ||
| + | Restart=on-failure | ||
| + | Restart-sec=2 | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | |||
| + | === Set the x11vnc service to automatically start at boot === | ||
| + | systemctl enable x11vnc.service | ||
| + | |||
| + | === Start the x11vnc service === | ||
| + | This assumes screen :0 represents your monitor and binds x11vnc to that monitor instead of a session. If you do not have a monitor (headless) it is possible to install a fake monitor driver and bind x11vnc to that. | ||
| + | |||
| + | systemctl start x11vnc.service | ||
| + | |||
| + | === Side Notes === | ||
| + | - In case you are using virt-manager (which also enables VNC on 127.0.0.1: | ||
| + | - The parameters used to start x11vnc tell it not to ask for an additional password (// | ||
| + | |||
| + | ==== Require username at GUI login (hiding list of valid users) ==== | ||
| + | The user list shown at login can be disabled by setting the '' | ||
| + | |||
| + | When the user list is disabled, users need to type their user name and password at the prompt to log in. | ||
| - | apt install lightdm | + | Create the gdm profile (/ |
| + | user-db: | ||
| + | system-db: | ||
| + | file-db:/ | ||
| + | |||
| + | Create a gdm keyfile for machine-wide settings in / | ||
| + | [org/ | ||
| + | # Do not show the user list | ||
| + | disable-user-list=true | ||
| - | Should you for some reason come to regret switching to LightDM: | + | Update the system databases: |
| + | dconf update | ||
configuring_the_right_vnc_setup.1735054862.txt.gz · Last modified: by mike
