1

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.

5
  • 1
    We need a clear description of your current set up in order to understand what's going on. Without even knowing what type of remote desktop software you are using we are lacking the most basic of information. What request are you talking about? How are you resetting a password? Password for what? What do you mean by "dummy HDMI plug"? What is that doing for you? Please edit your question and make sure that all details are clear and unambiguous.
    – Nmath
    Mar 9 at 19:32
  • On the rapberry pi I am using the built in sharing accessed via settings - sharing - screen sharing, and in that panel I have checked "require a password" and then set a password, On the PC I use to access the raspberry pi (fedora 35) I can use either TigerVNC
    – pootle
    Mar 10 at 21:49
  • viewer or remote desktop - it makes no difference which client I use. I can disconnect and reconnect to the session as long as the session on the raspberry pi stays open. Once I reboot the raspberry pi the password field in settings - sharing - screen sharing has reset to blank, and I can no longer connect from a VNC viewer until I set the password field again. Is this clear enough?
    – pootle
    Mar 10 at 21:51
  • It is Ubuntu 21.10 64bit gnome 40.4 wayland running on a raspberry pi 4
    – pootle
    Mar 10 at 21:53
  • The dummy hdmi plug is to explain the use case - why I want to be able to do this. Normally if there is no screen connected on boot, then no desktop is started, so there will be no way to remotely connect using screen sharing. A dummy HDMI plug provides EDID info so the computer thinks there is a screen and so it starts a desktop session. amazon.co.uk/…
    – pootle
    Mar 10 at 21:59

2 Answers 2

0

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.