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
Draft — not checked yet. This question was written from the published exam objectives and cites the clause it comes from, but nobody has yet read it against that clause and signed for it.
It is kept out of search results and out of mock exams until they have. Read the source below before you take the answer as settled.
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 set from objective 106 and space the ones you get wrong.