So you have a Raspberry Pi that you are wanting to run the GUI on and not have the display go to sleep (maybe running some displays for a NOC?), well, here’s my setup:
- Login as your user that will auto-login to the GUI desktop, and start a Terminal session.
- From the Terminal, perform the following to remove the default VNC server:
12
sudo
apt remove vnc4server tightvncserver
sudo
apt autoremove
- Then, install Vino and xRDP:
1
sudo
apt
install
vino xrdp
- Now, perform the following as your user:
123456789101112131415
vi
~/.config
/autostart/vino
.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=VINO
Comment=
Exec=
/usr/lib/vino/vino-server
StartupNotify=
false
Terminal=
false
Hidden=
false
vi
~/.xinitrc
xset s off
xset -dpms
xset s noblank
- Lastly, as your user, execute the following commands:
1234
gsettings
set
org.gnome.Vino require-encryption
false
<== Turns off encryption
gsettings
set
org.gnome.Vino prompt-enabled
false
<== Turns off prompting
for
an account
gsettings
set
org.gnome.Vino authentication-methods
"['vnc']"
<== Sets the default authentication method
for
Vino to VNC
gsettings
set
org.gnome.Vino vnc-password
"$(echo -n 'APWnot<8' | base64)"
<== Sets a password to authenticate the session with. NOTE - password needs to be 8 characters or
less
.
- Now, perform the following to configure xRDP:
1234567891011
sudo
vi
/etc/xrdp/xrdp
.ini
[xrdp1]
name=Active Local Login
lib=libvnc.so
username=
password=ask
ip=127.0.0.1
port=5900
sudo
systemctl
enable
xrdp
sudo
systemctl restart xrdp
- Now, perform the following to configure lightDM:
12
sudo
vi
/etc/lightdm/lightdm
.conf
xserver-
command
=X -s 0 -dpms
- Now reboot the pi, and test your connectivity. You should now connect to the active, logged in session that is on the screen.