Re: [SLUG] Remote X

From: Kwan Lowe (kwan@digitalhermit.com)
Date: Tue Feb 11 2003 - 14:22:35 EST


On Tue, 2003-02-11 at 13:37, John wrote:
> Back on Jan 21, Ian was on this list talking to someone
> about stuff like ~X :0 -query <box ip> and XDMCP and
> more.
>
> Since that time, I've been trying to make one Linux box
> talk to another, without success.
>
> One of the biggest strengths of X is the ability to
> have the X Server remote from the application client.
> Great, I understand the concept, and now I'd like to
> see it in front of my eyes.
>
> I've gone through a three-inch stack of how-tos, mini-
> how tos, manpages, and google-groups printouts.
>
> People tell you to "X -query yyyyy" (as above), and
> "ssh -X stuff" and "startx" and "startkde" and "export
> DISPLAY=somebody:0" and xhost and xauth and magic
> cookies and on and on. I've tried them all, in various
> permutations and combinations.

>
> Obviously I haven't yet hit on the right combination,
> and I realize this makes me the stupidest person in the
> universe, but I just don't get it.
>
> Ok, if I can get any advice, here's where I am:
>
> I have two Linux boxes, both exactly identical,
> installed with RH8. They both have KDE desktop,
> and DO NOT have Gnome. Both machines have an
> account "john" (as well as root, of course).
>
> In addition, there is a third box with a local
> DNS server.
>
> The two boxes are static ip, named:
> alpha.jp.org ( 192.168.1.61 ) and
> beta.jp.org ( 192.168.1.62 ).
>
> Both of them can ping or ssh the other.
>
> Both of them, for now, have a keyboard/monitor/mouse connected.
>
> Both of them, for now, boot up to a graphic login screen.
>
> OBJECTIVE NUMBER 1: I would just like to control the
> two machines, using a graphic KDE environment, on ONE
> keyboard/monitor. In other words, replace a KVM switch.

Assuming you have two machines without any firewall software that could
be blocking the ports called Alpha and Omega:

Login to your first machine, Alpha, with the KDE desktop.

Open a terminal window.

In the terminal type:
  xhost +omega

  ssh -X john@omega

Note that the 'X' is case sensitive. Using a 'x' will *disable* X11
forwarding.

Enter your password.

In the terminal session try:

  xclock &

This should launch the xclock program, running on Omega with the display
on Alpha.

If this doesn't work there are a few things to check:

On Omega, verify that X11_forwarding is enabled in the sshd_config file.
On Alpha, verify that X11_forwarding is enabled in the ssh_config file.
Turn off firewalling temporarily.

Your other option is to allow remote connections to your gdm/kdm/xdm
process. This is not enabled by default on RH8.0.

>
> Also, I don't want VNC, for now.
>
> If using ssh makes it easier, that's fine, but right now
> I'm just trying to learn, so I don't care about security.
>
> A big part of my problem is that I don't understand where
> I'm supposed to be when I start off. I assume I should
> Ctl-Alt-F1 to a VC, on the machine that I will use as a
> remote--is that right? Is it all right that a graphic
> login screen has been started on both machines? Or
> should I telinit 3 to kill the X servers on both?
> I dunno. Can anybody help me with STEP ONE?!

It doesn't matter what runlevel the remote machine is in. The only
requirement is that the X libraries are installed (and they are if you
can start X on the remote machine). You need to have X running on the
local machine.

BTW, it may also be some confusion about X-servers and X-clients. The
X-server is the local machine with the graphical display. The X-client
is the remote process. This is reverse to what's normally thought of as
client/server.
>
> Assume that I walk up to two machines, freshly booted,
> both showing a graphic login screen. I want to control
> both machines from ALPHA. Now what?
>
> John
>
>



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:10:35 EDT