My Raspberry Pi currently boots to the desktop login screen, and I would like to keep it that way. However I would also like to be able to login to a user's (like pi) desktop using something like ssh and end up seeing the desktop on the display plugged into the RPi's hdmi port.

To clarify, I do not want to see the RPi's display on the remote computer, just use the remote computer to login and see the desktop on the display plugged into the RPi so I do not have to plug a keyboard into the RPi just to login.

Is there any way to do that?

I've tried things like stopping lightdm and starting an xserver with startx however I get errors when I try to start any desktop application. I've also tried running dm-tool switch_to_user pi, but I get this error: Not running inside a display manager, XDG_SEAT_PATH not defined.

NOTE: I have run all these commands over ssh and would like to continue to use ssh to run these commands, as I am trying to avoid accessing the RPi's I/O to plug in a keyboard, and it is easy to automate running commands over ssh.


You can't with ssh (without serious software installation on both), BUT you can (relatively) easily remotely access the Pi Desktop with VNC

Raspbian comes with VNC (it needs to be enabled) and you need to install a VNC Viewer on your computer. The link has instructions. (I suggest you avoid the cloud setup - this is unnecessary on a local network.)

You can use ssh and VNC simultaneously.

  • Using VNC isn't what the OP wants. He wants to see the Desktop on the screen connected to the RasPi but only use keyboard and mouse from the remote computer. – Ingo Jan 5 '19 at 12:21
  • @Ingo Obviously you haven’t tried this - you can use either or both and see the results on both. – Milliways Jan 5 '19 at 21:01
  • You are right, I'm not very familiar with GUI. I haven't tried it. But it would worth half a sentence in your answer about this behavior. – Ingo Jan 5 '19 at 22:04

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.