0

I have Void Linux with openssh-9.9p2_1 on my laptop. And Raspberry PI Zero 2W with Raspbian Bullseye and openssh 1:8.4p1-5+deb11u3. I want to use the Raspberry Pi Zero to read data from the CAN bus in my car over wifi network.

I have been reading How to forward X over SSH to run graphics applications remotely? and suspect I may have server and client confused.

Raspberry Pi has no xorg-server installed. I have a C++ program with a gui installed my laptop that runs Openbox, that I want to run on the Pi to connect via a CAN hat.

On laptop in /etc/ssh/ssh_config:

   ForwardAgent yes
   ForwardX11 yes

On the Pi in /etc/ssh/sshd_config:

X11Forwarding yes
X11DisplayOffset 10

Struggling to understand how to run anything over ssh -X, On xterm on my laptop have tried with simple

ssh -v -X [email protected] xeyes

and get (among other stuff)

debug1: Sending command: xeyes
bash: line 1: xeyes: command not found

Do the versions of openssh matter?

Should my laptop be server or client?

Or am I starting the executable incorrectly?

Please help a stupid guy :-)

2
  • All settings seems OK to me, just xeyes: command not found, have you tried other X program ? Commented Mar 9 at 18:37
  • I've come to the conclusion that X11 Forwarding is obsolete and more or less useless for what I wanted. Sorry for wasting time and thanks for the help. Commented Mar 16 at 14:45

2 Answers 2

0

The ssh command is the ssh client. The remote machine you log into is running sshd and that is the sshd server.

The graphical client is the application that generates the graphics. The X server runs on the machine that has the screen on it.

So you ssh from your local machine (client) to the remote machine (server) and run the application (client) on the remote machine which then sends graphics back to your local X server...

It's not surprising you are confused. Both machines are clients and both machines are servers. It's the application not the machine that is relevant here.

0

From a ssh point of view, the computer you are running ssh -X from is the client, and the other one is the server.

From a X11 point of view, it might help to think of the screen as a printer that some process is writing to. The computer where the drawing happens is the server and the other one is the client.

So, if you are doing:

user1@computer:~$ ssh -X user2@remote

user2@remote:~$ xeyes

ssh: computer is the client, remote is the server

X11: computer is the server, remote is the client

Because of forwarding though, you could be picky and say that for xeyes the actual server is at remote, as the DISPLAY variable will show.

2
  • The X11 server serves the screen, keyboard, and mouse to the application program. Commented Mar 9 at 6:22
  • @SottoVoce, generally it does. Check Xfb. I was trying to answer just the OP's question on client/server. If one gets really picky, the ssh client also acts a a server when local port forwarding is used. But to answer this specific question I thought that the simpler, the better. Commented Mar 9 at 15:37

You must log in to answer this question.