public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] X11 from another machine
@ 2007-05-21 16:30 Andrew Lowe
  2007-05-21 16:45 ` Hans-Werner Hilse
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Andrew Lowe @ 2007-05-21 16:30 UTC (permalink / raw
  To: gentoo-user

Hi all,
	I'm in the process of setting up a linux box as my desktop machine. 
I've got X up and running, am about to do the kde install, but have a 
question regarding "remote" X windows.

	I have the situation where I have to connect to a remote, it's still in 
my office but X will be running across the network, Sun server so that I 
can run a CAD system. In the past I've done this from Windows using 
telnet and an X emulator, exporting the DISPLAY variable etc, but now I 
want to be able to do this from the linux box. I've tried what I've done 
under Windows in the past but the Sun machine can't find my X server, 
even though I'm in a graphical X window when I type the commands to 
initiate the remote X session.

	My question is, is there anything "special" that I have to do so that 
the linux X server is listening to "the outside world" so that the Sun 
box can create the connection and get X displaying on my linux box? It 
wouldn't surprise me if I've got something wrong, it's midnight and I've 
already had way too much chocolate, but I thought I would post this 
question before I go to bed in the hope that someone might have an insight.

	Any thoughts on this greatly appreciated,
	
		Andrew Lowe
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] X11 from another machine
  2007-05-21 16:30 [gentoo-user] X11 from another machine Andrew Lowe
@ 2007-05-21 16:45 ` Hans-Werner Hilse
  2007-05-21 17:22   ` [gentoo-user] " Grant Edwards
  2007-05-21 16:57 ` [gentoo-user] X11 from another machine Alan McKinnon
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Hans-Werner Hilse @ 2007-05-21 16:45 UTC (permalink / raw
  To: gentoo-user

Hi,

On Tue, 22 May 2007 00:30:46 +0800 Andrew Lowe <agl@wht.com.au> wrote:

> 	I have the situation where I have to connect to a remote,
> it's still in my office but X will be running across the network, Sun
> server so that I can run a CAD system. In the past I've done this
> from Windows using telnet and an X emulator, exporting the DISPLAY
> variable etc, but now I want to be able to do this from the linux
> box. I've tried what I've done under Windows in the past but the Sun
> machine can't find my X server, even though I'm in a graphical X
> window when I type the commands to initiate the remote X session.
>
> 	My question is, is there anything "special" that I have to do
> so that the linux X server is listening to "the outside world" so
> that the Sun box can create the connection and get X displaying on my
> linux box?

Yes. Usually, the X server is supposed to only listen on localhost
(127.0.0.1), if at all on TCP ports, that is (it might be listening
only on a UNIX socket).

That's only one part, though. The other is X Authorization. It depends
a bit on the way you use to start X, but it should be active. You
probably need to transport your auth cookie to the target. See XAUTH(1)
for all the details.

However, the usual way to use remote X-based programs is just to let
SSH do that. It can provide a tunnel for X. This is especially easy if
the remote SSH server daemon has set its "X11Forwarding" configuration
setting set to "yes" (otherwise, it is really a bit harder and not
suggested). Then, you just would connect using "ssh -X user@host" and
that's it, SSH will care for creating a socket on the remote machine
and set the DISPLAY variable accordingly.


-hwh
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] X11 from another machine
  2007-05-21 16:30 [gentoo-user] X11 from another machine Andrew Lowe
  2007-05-21 16:45 ` Hans-Werner Hilse
@ 2007-05-21 16:57 ` Alan McKinnon
  2007-05-21 17:01 ` Alex Schuster
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 12+ messages in thread
From: Alan McKinnon @ 2007-05-21 16:57 UTC (permalink / raw
  To: gentoo-user

On Monday 21 May 2007, Andrew Lowe wrote:
> Hi all,
> 	I'm in the process of setting up a linux box as my desktop machine.
> I've got X up and running, am about to do the kde install, but have a
> question regarding "remote" X windows.
>
> 	I have the situation where I have to connect to a remote, it's still
> in my office but X will be running across the network, Sun server so
> that I can run a CAD system. In the past I've done this from Windows
> using telnet and an X emulator, exporting the DISPLAY variable etc,
> but now I want to be able to do this from the linux box. I've tried
> what I've done under Windows in the past but the Sun machine can't
> find my X server, even though I'm in a graphical X window when I type
> the commands to initiate the remote X session.
>
> 	My question is, is there anything "special" that I have to do so
> that the linux X server is listening to "the outside world" so that
> the Sun box can create the connection and get X displaying on my
> linux box? It wouldn't surprise me if I've got something wrong, it's
> midnight and I've already had way too much chocolate, but I thought I
> would post this question before I go to bed in the hope that someone
> might have an insight.

ssh -X <username>@<host>
from the Linux to the Sun machine. Then run the X-client in that session 
and it'll display on the local Xserver. If you want something a tad 
more secure, replace -X with -Y.

Refer man ssh

When doing it the old way by just telnet/ssh style logins then set 
DISPLAY and use xhost, you will probably run into your Xserver refusing 
non-local connections.... the display manager is responsible for this, 
and you will have to dig into it's configuration and find the line it 
uses to start X proper, then remove this argument:

-nolisten tcp

alan

-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] X11 from another machine
  2007-05-21 16:30 [gentoo-user] X11 from another machine Andrew Lowe
  2007-05-21 16:45 ` Hans-Werner Hilse
  2007-05-21 16:57 ` [gentoo-user] X11 from another machine Alan McKinnon
@ 2007-05-21 17:01 ` Alex Schuster
  2007-05-21 17:58   ` Neil Bothwick
  2007-05-21 18:15 ` [gentoo-user] " james
  2007-05-21 21:54 ` [gentoo-user] " Guillermo A. Amaral
  4 siblings, 1 reply; 12+ messages in thread
From: Alex Schuster @ 2007-05-21 17:01 UTC (permalink / raw
  To: gentoo-user

Andrew Lowe writes:

> 	I have the situation where I have to connect to a remote, it's still
> in my office but X will be running across the network, Sun server so
> that I can run a CAD system. In the past I've done this from Windows
> using telnet and an X emulator, exporting the DISPLAY variable etc, but
> now I want to be able to do this from the linux box. I've tried what
> I've done under Windows in the past but the Sun machine can't find my X
> server, even though I'm in a graphical X window when I type the
> commands to initiate the remote X session.

If the Sun has ssh running, use ssh -X or -Y to connect.

If not, or if this would be too much overhead and slows things down, 
telnet is okay. You probably have your local X server runing with 
the "-nolisten tcp" option which prevents access over port 6000 to your 
server, probably due to security reasons. Check with "ps ax | grep 
[/]usr/bin/X". Or try "telnet localhost 6000", if you get a "connection 
refused", you have to enable tcp listening.

To do so with KDM as display manager, comment the line 
	#ServerArgsLocal=-nolisten tcp
in your /usr/kde/3.5/share/config/kdm/kdmrc and restart ("/etc/init.d/xdm 
restart") after logging out of KDE.

	Alex
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [gentoo-user]  Re: X11 from another machine
  2007-05-21 16:45 ` Hans-Werner Hilse
@ 2007-05-21 17:22   ` Grant Edwards
  2007-05-21 17:37     ` Hans-Werner Hilse
  2007-05-29 15:00     ` [gentoo-user] Re: X11 from another machine [SOLVED] Andrew Lowe
  0 siblings, 2 replies; 12+ messages in thread
From: Grant Edwards @ 2007-05-21 17:22 UTC (permalink / raw
  To: gentoo-user

On 2007-05-21, Hans-Werner Hilse <hilse@web.de> wrote:

> However, the usual way to use remote X-based programs is just to let
> SSH do that. It can provide a tunnel for X. This is especially easy if
> the remote SSH server daemon has set its "X11Forwarding" configuration
> setting set to "yes" (otherwise, it is really a bit harder and not
> suggested). Then, you just would connect using "ssh -X user@host" and
> that's it, SSH will care for creating a socket on the remote machine
> and set the DISPLAY variable accordingly.

NB: I've found that using -Y instead of -X can speed up some
    applications by a factor of 50 or more.

-- 
Grant Edwards                   grante             Yow! Is it NOUVELLE
                                  at               CUISINE when 3 olives are
                               visi.com            struggling with a scallop
                                                   in a plate of SAUCE MORNAY?

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user]  Re: X11 from another machine
  2007-05-21 17:22   ` [gentoo-user] " Grant Edwards
@ 2007-05-21 17:37     ` Hans-Werner Hilse
  2007-05-21 18:25       ` Grant Edwards
  2007-05-29 15:00     ` [gentoo-user] Re: X11 from another machine [SOLVED] Andrew Lowe
  1 sibling, 1 reply; 12+ messages in thread
From: Hans-Werner Hilse @ 2007-05-21 17:37 UTC (permalink / raw
  To: gentoo-user

Hi,

On Mon, 21 May 2007 17:22:39 +0000 (UTC) Grant Edwards
<grante@visi.com> wrote:

> > However, the usual way to use remote X-based programs is just to let
> > SSH do that. It can provide a tunnel for X. This is especially easy
> > if the remote SSH server daemon has set its "X11Forwarding"
> > configuration setting set to "yes" (otherwise, it is really a bit
> > harder and not suggested). Then, you just would connect using "ssh
> > -X user@host" and that's it, SSH will care for creating a socket on
> > the remote machine and set the DISPLAY variable accordingly.
> 
> NB: I've found that using -Y instead of -X can speed up some
>     applications by a factor of 50 or more.

well, I don't doubt you did experience it, but it sounds quite unlikely
(or like a bug). To be a bit picky: How did you measure that factor?
But you're right: In fact, some applications will probably work better
in "trusted" mode (see "ForwardX11" in ssh_config(5)). However, usually
applications are not supposed to behave in a way where -Y (i.e.
trusting all and everything) has improvements...

More to the OP: In any way, be sure to learn about the security
problems that are related to forwarding X connections.

-hwh
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] X11 from another machine
  2007-05-21 17:01 ` Alex Schuster
@ 2007-05-21 17:58   ` Neil Bothwick
  0 siblings, 0 replies; 12+ messages in thread
From: Neil Bothwick @ 2007-05-21 17:58 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 412 bytes --]

On Mon, 21 May 2007 19:01:15 +0200, Alex Schuster wrote:

> If the Sun has ssh running, use ssh -X or -Y to connect.
> 
> If not, or if this would be too much overhead and slows things down, 

You could use ssh -c blowfish -X/Y. Blowfish is faster and uses less CPU
time while still being secure enough for most applications.


-- 
Neil Bothwick

(A)bort, (R)etry, (P)retend this never happened...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [gentoo-user]  Re: X11 from another machine
  2007-05-21 16:30 [gentoo-user] X11 from another machine Andrew Lowe
                   ` (2 preceding siblings ...)
  2007-05-21 17:01 ` Alex Schuster
@ 2007-05-21 18:15 ` james
  2007-05-21 21:54 ` [gentoo-user] " Guillermo A. Amaral
  4 siblings, 0 replies; 12+ messages in thread
From: james @ 2007-05-21 18:15 UTC (permalink / raw
  To: gentoo-user

Andrew Lowe <agl <at> wht.com.au> writes:


> 	I'm in the process of setting up a linux box as my desktop machine. 
> I've got X up and running, am about to do the kde install, but have a 
> question regarding "remote" X windows.


Hello Andrew,

For a complete guide look at this:


http://gentoo-wiki.com/HOWTO_X-forwarding


hth,

James

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [gentoo-user]  Re: X11 from another machine
  2007-05-21 17:37     ` Hans-Werner Hilse
@ 2007-05-21 18:25       ` Grant Edwards
  0 siblings, 0 replies; 12+ messages in thread
From: Grant Edwards @ 2007-05-21 18:25 UTC (permalink / raw
  To: gentoo-user

On 2007-05-21, Hans-Werner Hilse <hilse@web.de> wrote:
> Hi,
>
> On Mon, 21 May 2007 17:22:39 +0000 (UTC) Grant Edwards
><grante@visi.com> wrote:
>
>> > However, the usual way to use remote X-based programs is just to let
>> > SSH do that. It can provide a tunnel for X. This is especially easy
>> > if the remote SSH server daemon has set its "X11Forwarding"
>> > configuration setting set to "yes" (otherwise, it is really a bit
>> > harder and not suggested). Then, you just would connect using "ssh
>> > -X user@host" and that's it, SSH will care for creating a socket on
>> > the remote machine and set the DISPLAY variable accordingly.
>> 
>> NB: I've found that using -Y instead of -X can speed up some
>>     applications by a factor of 50 or more.
>
> well, I don't doubt you did experience it, but it sounds quite
> unlikely (or like a bug). To be a bit picky: How did you
> measure that factor?

With a stopwatch.  I timed how long the initial window took to
draw, how long it took to redraw after an expose event, how
long a dialog box took to appear, etc.  Using -X, the times
were 1-2 minutes.  Using -Y, they were was 1-3 seconds.

This was through a 1Mbps link with about 40ms of latency.

> But you're right: In fact, some applications will probably work better
> in "trusted" mode (see "ForwardX11" in ssh_config(5)). However, usually
> applications are not supposed to behave in a way where -Y (i.e.
> trusting all and everything) has improvements...

It made a big difference on all apps I tested, and a _huge_
difference on GTK apps.  The improvement on GTK apps was
probably 10X the improvement for Motif or Athena apps.

-- 
Grant Edwards                   grante             Yow! I just heard the
                                  at               SEVENTIES were over!!  And
                               visi.com            I was just getting in touch
                                                   with my LEISURE SUIT!!

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user] X11 from another machine
  2007-05-21 16:30 [gentoo-user] X11 from another machine Andrew Lowe
                   ` (3 preceding siblings ...)
  2007-05-21 18:15 ` [gentoo-user] " james
@ 2007-05-21 21:54 ` Guillermo A. Amaral
  4 siblings, 0 replies; 12+ messages in thread
From: Guillermo A. Amaral @ 2007-05-21 21:54 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

On Monday 21 May 2007 09:30, Andrew Lowe wrote:
> Hi all,
> 	I'm in the process of setting up a linux box as my desktop machine.
> I've got X up and running, am about to do the kde install, but have a
> question regarding "remote" X windows.
>
> SNIP
>
> 	Any thoughts on this greatly appreciated,
>
> 		Andrew Lowe

Well if you are planning on using KDM as your login prompt and want to get the 
remote login prompt not just run a remote application.

1. Open up your kdmrc file located in '/usr/kde/<YOUR KDE VERSION 
HERE>/share/config/kdm/'. If you have only one kde installation you can 
emacs, nano or vi /usr/kde/*/share/config/kdm/kdmrc

2. Look for this section: [Xdmcp] ( it's somewhere in the end of the config 
file )

3. Set 'Enable' to 'True':  Enable=true

That's it, you should be able to see the box in any remote login screen on the 
network.

-- 
Guillermo A. Amaral, CSE
# Free & Open Source Advocate
& nick: guillermoamaral
@ blog: http://blog.guillermoamaral.com/
@ site: http://www.guillermoamaral.com/
$ irc: guillermoamaral@freenode
% gpg: http://downloads.guillermoamaral.com/public.asc

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user]  Re: X11 from another machine [SOLVED]
  2007-05-21 17:22   ` [gentoo-user] " Grant Edwards
  2007-05-21 17:37     ` Hans-Werner Hilse
@ 2007-05-29 15:00     ` Andrew Lowe
  2007-05-29 17:47       ` Alan McKinnon
  1 sibling, 1 reply; 12+ messages in thread
From: Andrew Lowe @ 2007-05-29 15:00 UTC (permalink / raw
  To: gentoo-user

Grant Edwards wrote:
>> However, the usual way to use remote X-based programs is just to let
>> SSH do that. It can provide a tunnel for X. This is especially easy if
>> the remote SSH server daemon has set its "X11Forwarding" configuration
>> setting set to "yes" (otherwise, it is really a bit harder and not
>> suggested). Then, you just would connect using "ssh -X user@host" and
>> that's it, SSH will care for creating a socket on the remote machine
>> and set the DISPLAY variable accordingly.
> 
> NB: I've found that using -Y instead of -X can speed up some
>     applications by a factor of 50 or more.
> 

	Thank you all for your responses, although, due to me not initially 
providing all of the needed info, some peoples responses were not valid. 
My problem was I had to forward from an 8 year old SUN server, with no 
keyboard or monitor to my linux box. It's running Sunos5.? and DOES NOT 
have SSH - grrrr!!! Only telnet!!!!!

	Between the replies I got and and more Googling, I had to:

telnet into the SUN box.

On the SUN box export the DISPLAY system variable with it pointing to my 
machine.

Tell the linux box default xorg window manager and then kdm, when I 
subsequently installed it, to not ignore tcp ie comment out the 
"-nolisten tcp" config variable.

Couldn't get xauth to work so I used xhost to tell my machine to accept 
the connection from the Sun server.

Fired up the CAD system from the telnet login and hey presto, 
MicroStation on my linux box.

	Sounds simple but the amount of stuffing around I had to do before it 
eventually worked....probably best left unsaid. Anyway, thanks to all 
for the help and here's hoping I get access to SSH the next time I have 
to do anything like this.

	Regards,
		Andrew
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-user]  Re: X11 from another machine [SOLVED]
  2007-05-29 15:00     ` [gentoo-user] Re: X11 from another machine [SOLVED] Andrew Lowe
@ 2007-05-29 17:47       ` Alan McKinnon
  0 siblings, 0 replies; 12+ messages in thread
From: Alan McKinnon @ 2007-05-29 17:47 UTC (permalink / raw
  To: gentoo-user

On Tuesday 29 May 2007, Andrew Lowe wrote:
>         Sounds simple but the amount of stuffing around I had to do
> before it eventually worked....probably best left unsaid. Anyway,
> thanks to all for the help and here's hoping I get access to SSH the
> next time I have to do anything like this.

It's not all time wasted :-) In fact, I would say you've learned a ton 
of stuff that will stand you in very good stead for the future. You now 
know how to export X11 over the network, which is one of the basic 
things X was designed to do. However, very very very few Linux users 
seem to know how to do it :-)

You know the secret to getting a DM to allow it all in the first place, 
and you also know what to do when ssh capabilities are on the server.

So all round it sounds like a useful exercise you went through. In fact 
it sounds *exactly* like the stuffing around I had to do when I learned 
the same lessons :-)

alan

-- 
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?

Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
--
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-05-30  8:17 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 16:30 [gentoo-user] X11 from another machine Andrew Lowe
2007-05-21 16:45 ` Hans-Werner Hilse
2007-05-21 17:22   ` [gentoo-user] " Grant Edwards
2007-05-21 17:37     ` Hans-Werner Hilse
2007-05-21 18:25       ` Grant Edwards
2007-05-29 15:00     ` [gentoo-user] Re: X11 from another machine [SOLVED] Andrew Lowe
2007-05-29 17:47       ` Alan McKinnon
2007-05-21 16:57 ` [gentoo-user] X11 from another machine Alan McKinnon
2007-05-21 17:01 ` Alex Schuster
2007-05-21 17:58   ` Neil Bothwick
2007-05-21 18:15 ` [gentoo-user] " james
2007-05-21 21:54 ` [gentoo-user] " Guillermo A. Amaral

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox