How to display xclock on another computer?

Two things to check for: Port 6000 needs to be open on the 222 machine (configure or disable the firewall), and the X server itself needs to be listening on that port. This is often disabled in modern distros. Check if it's listening with

# netstat -nltp | grep 6000
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN      10818/Xorg          
tcp6       0      0 :::6000                 :::*                    LISTEN      10818/Xorg          

If not, you can enable it for gdm in /etc/gdm/custom.conf

[security]
DisallowTCP=false

Logout/restart gdm on the 222 machine and log in again. You should then see Xorg listening on port 6000.


On my computer (111):

ssh -X 192.168.0.222

followed simply by:

xclock

will run xclock on the other computer (222) and display on my computer (111).

Note: For this to work X11Forwarding should be enabled in /etc/ssh/sshd_config at computer (222)