0

I'm a newbie - especially to Ubuntu (running 22.04 on the RP4B with no disk encryption). While the PI OS comes out of the box with full-time SSH capability - I'm running into trouble in trying to log-in remotely after a reboot of the PI4B (as would be necessary as it is a remote "headless" security camera system set-up). I can get SSH to run after log-in as well as get a terminal with cmd putty.exe before log-in. But cannot get a desktop after the remote reboot (when the PI is waiting for a log-in).

Summary:

SSH works only in terminal mode (no GUI).
VNC only works if someone is logged into the PI already.
XRDP also works if someone is logged into the PI already but flashes for a second and then reverts back to windows screen if someone is not logged in.

Tboon
  • 23

1 Answers1

0

Solution (thank you USER68186!):

SSH Server Gnome Set-up to remotely login via RDP into server when server is rebooted.

FROM: https://cloudzy.com/blog/gnome-remote-desktop/ and Ubuntu 22.04 remote desktop headless Ubuntu 22.04 remote desktop headless?

1)Install GNOME

sudo apt install ubuntu-gnome-desktop –y

2)Reboot system

sudo reboot

3)Enable RDP Feature

sudo apt install xrdp
sudo systemctl enable xrdp
sudo systemctl start xrdp

4)Allow traffic through firewall

sudo ufw allow from any to any port 3389 proto tcp

5)The desktop may look different than the normal Ubuntu, so create the hidden file

/home/$USER/.xsessionrc with the following content:

export GNOME_SHELL_SESSION_MODE=ubuntu 
export XDG_CURRENT_DESKTOP=ubuntu:GNOME
export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
user68186
  • 33,360
Tboon
  • 23