[ale] x window (long)

Mike Kachline kachline at cc.gatech.edu
Thu Nov 26 12:52:34 EST 1998

On Thu, 26 Nov 1998, denethor wrote:

> tell is a GUI for linux. A collegue of mine, tells me that you can also get
> a programe, that, when you a) telnet into your linux machine b) export
> somehow ((I am still new to linux and am learning, so bare with me)) the
> display settings to a remote computer (say from home). c) then you run an
> x-window session from home, that gives you that same GUI interface as if you
> were running x-window from the console at your linux box.

	Ok. If you are sitting on a local linux box and want to run X apps
off of a remote *nix box, then the process is either easy, or easier.

	"Easy" way.

	local_xterm$ xhost +remote.machine.ip
	"remote.machine.ip" added to list.

	local_xterm$ telnet remote.machine.ip
	<login to remote machine>

	remote$export DISPLAY=localmachine.ip.address:0.0
	remote$xv (or favorite X app)
	 <have fun here>
	localhost$xhost -remote.machine.ip

	Note two things. Once you've added the remote to machine to
"xhost", you've essentially told your X server to allow any sort of X
traffic to be able to show up on your X session from that machine. The
downside to this is that, if someone else has an account on both your
remote machine and local machine, once you've done the "xhost +remoe",
that other person could "export DISPLAY" to your session and start popping
windows up for you! Not too good.

	"Easier" way.

	$local ssh remote.machine.ip
	<login to remote machine here>

	$remote xv (or your favorite app).

	Easy X authentication is just the tip of the iceberg when it comes
to the coolness of ssh. ssh (Secure shell) also will encrypt the traffic
across the net, plus avoid the pesky "xhost" problem mentioned above.
IMHO, "ssh" is a "must have" on just about any *nix box.
	The only "downside" really to using ssh is that you must find it
on the net, then install it. For a machine to be an ssh "server", it must
run "sshd", then your local machine can use the "ssh" client to connect
(as per the above example).

	Using xdm remotely.

	If you've ever sat on a *nix box which prompted you for your
initial login via an X interface then, once you've logged in, fires up
your X session for you, then you've experienced "xdm". One cool thing
about xdm is that you can remotely log into a machine which is running
xdm. Here is how:

	1. Make sure the "remote" machine is running "xdm". You can either
just run "xdm" as root or (more appropo), do an /sbin/telinit 5 as root.

	local$ X -query remote.ip.address
	(Note, there is a more "appropriate" way to do this via the
"xinit" program, but, as I don't use that method, someone else will have
to post it.).

	<login to remote machine, have fun>

	This is pretty cool once you realize it's power. By using xdm
remotely, you are effectively turning the network into a big extension
cord for your mouse, keyboard and monitor. You wind up getting a full
screen session on your local machine *just* as you would see it if you
were sitting at the remote machine.

	The final cool X sort of "export" thing I've learned about is that
of Xnest. Technically speaking, Xnest is an X server which runs inside of
an Xserver. What this means is that, while you are running X locally, you
can pull off the above mentioned "xdm" trick and have the new session run
in a window of your current session. Because this email has gotten almost
to FAQ length here, I will be brief on how to use Xnest:

	local$ startx
	local_xterm$ Xnest :1 -query remote.machine.ip

	Wait a bit, and you should get a window pop up in your X session,
then that window will be filled in with the xdm login prompt from the
remote machine.

	Ok, hopefully this will get you off to a good start. Again, quick,
easy and most secure would be to install "ssh" on both the remote and
local machine, then use the ssh method. Otherwise, any of the other above
methods should work. One final note though, Xnest seems to be horribly
broken under RH 5.2, so, if you are running RH 5.2, you may not be able to
get the Xnest thing running.

								- Mike
Michael Kachline - CS, Georgia Tech
kachline at cc.gatech.edu

More information about the Ale mailing list