X Display Server - Resolve "Error: Can't open display"

by
Jeremy Canfield |
Updated: September 19 2023
| X Display Server articles
This error appears when attempting to launch an X application from a remote client machine.
[root@server1 ~]# xclock
Error: Can't open display:
SSH is probably being used to connect from the client machine to the X server. If this is true, use the -Y option when connecting to the SSH server. The -Y option enables trusted X11 forwarding. When connecting using the -Y option, if you are able to open x application on the client, this means there is some trust issue with X11 forwarding.
[root@server1 ~]# ssh -Y user1@example.com
Did you find this article helpful?
If so, consider buying me a coffee over at