4

I am running a headless raspberry pi and I want to remote into the desktop. I set the user to auto login, enable screen sharing with a password (there's nobody there to respond to a request!), and it works fine for 1 session, but after a reboot, I have to reset the password. Is there a way to prevent this so I can power it on and then log in from another machine? (and logout and in and get back the same session).

Even a simple startup script would be a viable solution for me.

headless well not quite 'cos I put a dummy hdmi plug into the pi so it can run up the desktop.

In essence I want to power on the raspberry pi and then connect to it from another pc for a couple of hours then rinse and repeat. All the other "solutions" I have investigated (like setting up vnc servers) are not wayland converted, apart from being way more complex both to setup and manage.

A desktop share is so easy to setup and use, I just have this one smaaaaaalll problem to fix.

pootle
  • 151

2 Answers2

6

This issue is caused by the default keyring not being unlocked when the VNC server starts. Since you are using "automatic login", no password is ever entered on reboot and the keyring remains locked.

As seen in this related answer, there is a reasonably secure way to complete this setup that will leave the RDP password unencrypted while preserving encryption on your other passwords. Some solutions suggest using no login password, but this is very insecure as it would store all your passwords in plain text (unencrypted).

I'll outline the steps below:

  1. Open "Passwords and Keys" app on the desktop. Password and Keys App
  2. Create a new "Password Keyring" using the "+" icon. Create a new Password Keyring
  3. Name the new keyring "Zero Security Keyring" or something that reminds you it will be un-encrypted. Leave the password blank so that the keychain is unencrypted. You will be warned that you are creating an unencrypted keychain.
    Name the keyring so that you will remember it is unencrypted
  4. Right-click on the new keyring and choose "set as default" Set the new keyring as the default
  5. Click on the old "Default" keyring and delete "GNOME Remote Desktop RDP Credentials" Delete the old RDP password from the "Default keyring"
  6. Open settings and set a new RDP password set a new RDP password
  7. Check that the password was stored under the "Zero Security Keyring" Check that the RDP password was stored in the new keychain
  8. Right click on "Default" keyring and choose "set as default" Remember to set "Default keyring" as the default

At this point, you should be able to reboot and the system will be able to read the RDP password since it is unencrypted, but other passwords stored in your login and default keyrings will remain secure and encrypted.

Nate Stone
  • 161
  • 1
  • 4
0

I switched to using vnc, and this works OK. I wasn't to keen on the very involved answer from Nate, and using vnc seems to maintain whatever level of security you prefer

pootle
  • 151