Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Nov 2008 15:38:40 -0800
From:      Bill Campbell <freebsd@celestial.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Running X without a videocard
Message-ID:  <20081119233840.GA14744@ayn.mi.celestial.com>
In-Reply-To: <20081119224923.L8555@wojtek.tensor.gdynia.pl>
References:  <006b01c949da$2985e9f0$7c91bdd0$@com> <20081119112554.R6005@wojtek.tensor.gdynia.pl> <200811191035.mAJAZc21042934@banyan.cs.ait.ac.th> <11167f520811191058m7e07c347u272dc9db0a15027d@mail.gmail.com> <20081119224923.L8555@wojtek.tensor.gdynia.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@remotesystem xterm

	xterm -e ssh remoteusername@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 :-).

Bill
-- 
INTERNET:   bill@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081119233840.GA14744>