Running X without a videocard

Bill Campbell freebsd at
Wed Nov 19 15:38:42 PST 2008

On Wed, Nov 19, 2008, Wojciech Puchar wrote:
>>> X windows has client/server built into the protocol: you can run an X
>>> application on a machine that has no video card and display the result
>>> on another machine that has video facility and an X display (called an
>>> X server).
>> Does anyone know of a tutorial or a how-to, I would like to try this out.
> i already answered it before
> DISPLAY variable must point to display
> like IP-number:0 (or non-zero if you have more than 1 display :)
> and computer with display must allow remote connections

This complexity of DISPLAY ans xhost is why I find it far easier to use ssh
to make connections where I want to run X-clients.

On the remote system to which one is connecting, make sure that the
sshd_config file has ``X11Forwarding yes'' (and perhaps also
``ForwardX11Trusted yes'').  Restart the sshd process if these need to be
changed.  There are corresponding options in the ssh_config file.

The easiest way to execute a remote X-Client is probably

This runs the remote program with the local username.  The ``-f'' option
automatically runs it in background, detaching from the current session.

	ssh -f -Y remotesystem path_to_x_client

These run as a different user on the remote system.

	ssh -f -Y -l remoteusername remotesystem path_to_x_client

	ssh -f -Y remoteusername at remotesystem path_to_x_client

If I may to be running multiple x-clients on the remote system, I will
generally connect with an xterm, then launch the x-clients from that
connection.  There are two options here, the first on fast links where I
want to run the xterm on the remote system, the second for slow links
running the xterm on the local system.  In the first, one may have to
specify the full path to the xterm executable if it's not in the default
PATH that sshd will set up.

	ssh -f -Y remoteusername at remotesystem xterm

	xterm -e ssh remoteusername at remotesystem &

Letting ssh take care of the DISPLAY makes life a lot easier than having to
mess with it and xhosts manually, not to mention that it's far more secure
than telnet.  The ssh connections may well be compressed making remote
connections seem faster than a straight telnet session even on a LAN
(nobody would telnet over the Internet in an unencypted connection would
they :-).

INTERNET:   bill at  Bill Campbell; Celestial Software LLC
URL:  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

Freedom from prices is freedom from responsibility. You can simply pass
laws, using the magic wand of government to satisfy your own desires at
unspecified costs to be paid by others. -- Thomas Sowell Aug 2000

More information about the freebsd-questions mailing list