A Slice of Pi

Printer-friendly version

So, I'm reading a Usenet newsgroup and see this post talking about how to view the Raspberry Pi desktop on another machine. The post recommended downloading and installing yet another application to the Pi, and to the system that would view the Pi desktop. I guess that's the answer for some, but it's not the answer for me.

The johnny-come-lately Linux users who grew up on Microsoft Windows usually prefer an RDP-like app, and such are already available on the Raspberry Pi. The Pi supports VNC as well, so, if that's your preference, you have it. But old-school users, like myself, know of other tools.

Now, my preference is to not have a monolithic view of the Raspberry Pi desktop; I already have a desktop (on my Linux workstation) that works quite well, thank you. What I like is to launch individual programs on the Pi and have them show up on my desktop, unaccompanied by the cruft of the desktop on the Pi.



However, I understand the need for other types of users to want to see "the desktop". I just don't think that you need all that extra software to do it. So, to demonstrate "remote desktop, old-school", I used Xnest.

This technique works in two parts:

  1. the user runs an ssh command on their workstation, which logs into the Pi and
  2. executes a script that invokes Xnest and lxsession.

This results in a single window on the origin workstation that contains, in it's entirety, the "desktop" presented by the Raspberry Pi. You can work in this window exactly as if you were working on a monitor directly connected to the Pi. You don't need any extra (or fancy) software or hardware to do it.

I include the script (called Xdesk.sh) for your reference. Customize it as you need. Save it in a well-known (to you) place on your Raspberry Pi, and invoke it from your (X-enabled) workstation with an ssh -Y -f command.

Luck be with you.