From your desktop workstation you run `ssh -X admin@fileserver` and then start `xterm` in that session. The xterm window appears on your workstation's screen. Which machine is running the X server in this arrangement, and which is running the X client?

LPIC-1 Exam 102-500, objective 106. User interfaces and desktops medium

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Correct The workstation runs the X server; fileserver runs the X client (xterm).

Correct. The screen, keyboard and mouse are on the workstation, so the workstation runs the X server. The xterm process executes on fileserver and connects back to that server as a client through the forwarded channel.

Not correct fileserver runs the X server; the workstation runs the X client (xterm).

Wrong. This is the intuitive-but-backwards reading. xterm is the application, so it is the client, and it is running on fileserver.

Not correct Both machines run an X server, and ssh copies the rendered image between them.

Wrong. ssh forwards X protocol requests, not rendered images or screenshots. fileserver needs no X server at all to run X clients; it only needs the X client libraries.

Not correct Neither machine runs an X server, because -X tells ssh to render the window itself.

Wrong. ssh does no rendering. -X sets up a proxy display on the remote side and tunnels the X protocol to the X server that is already running on the local machine.

Why

With `ssh -X`, sshd on the remote host sets DISPLAY in the remote shell to something like localhost:10.0 and listens on that proxy display. X clients started there connect to the proxy, ssh tunnels their traffic back over the encrypted connection, and the local ssh hands it to the local X server. The remote host needs X client libraries but no X server. `ssh -X` requests untrusted forwarding with X security extension restrictions and `ssh -Y` requests trusted forwarding, although Debian and Ubuntu ship `ForwardX11Trusted yes` in /etc/ssh/ssh_config, which makes -X behave like -Y there. Either way the server side must have X11Forwarding enabled in sshd_config, and xauth must be present on the remote host for the cookie to be set up.

Where this comes from

Cited
LPI exam objective 106.1
What it says
Understand the client and server model used by X and the use of remote displays.

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 106 and space the ones you get wrong.

Practise LPIC-1 Exam 102-500

More questions on this objective

All questions on User interfaces and desktops

Practise LPIC-1 Exam 102-500