[aklug] Using X11

From: barsalou <barjunk@attglobal.net>
Date: Thu Apr 09 2009 - 10:53:17 AKDT

Quoting "Shane R. Spencer" <shane@bogomip.com>:

> Hey luggers, Mark made a cool statement that fired me up.
>
> The most common graphical display system for UI is X11 for Linux and BSD
> like operating systems, that way they can take advantage of toolkits
> like GTK and QT that use X11 to do their magic. X11 in itself is an
> impressive system with the added bonus of network transparency between
> the application and the display environment. You may already be hip to
> this, however this addresses your statement on seamless window management.
>
> A good example of this is the ability to use IP packets instead of UNIX
> sockets to read from and write to the display server. You can do this
> by declaring a DISPLAY environment variable which contains the IP
> address of the remote or local host and the display number. By default
> this is the 'unix' socket which libx11 knows how to find and the running
> display set up by the display manager (startx, gdm, kdm, implicit
> command) which is most commonly seen as "DISPLAY=3Dunix:0.0" or simply
> "DISPLAY=3D:0.0".
>
> A warning! When using GDM or KDM for the display manager they will
> invoke X by default with the '-nolisten tcp' option which tells the
> running X session not to allow inbound tcp requests from X protocol
> capable clients (anything that uses X) for read and write privileges.
>
> In the GDM configuration files you can remove this, google it if you
> look at your process list and see /usr/bin/X followed by '-nolisten tcp'
> and need to disable that option to play around with this.
>
> Open up a terminal on the X display you want to receive remote
> applications on after disabling -nolisten tcp. type 'xhost +' which is
> a huge gigantic gaping hole of a security problem, but acceptable for
> testing things out. Use 'man xhost' to get more information on how to
> allow only certain clients to access your display.
>
> Next on the box you want to run an application on, and display
> elsewhere, run the following after replacing remoteip with the IP of the
> host running the X display server.
>
> DISPLAY=3Dremoteip:0.0 xterm
>
> and a small little terminal should appear and give you the prompt you're
> used to looking at elsewhere. If you execute any X application it will
> do its best to run on the remote display as well, since you have already
> defined the DISPLAY environment variable.
>
> In my situation I have laptop @ 10.0.0.5 and I want to display the
> program 'thunderbird' on my desktop which is 10.0.0.6.
>
> On my desktop I need to make sure the X session is capable of handling
> TCP connections. Next I allow 10.0.0.5 by running 'xhost 10.0.0.5'.
>
> On my laptop I run the following, from any terminal (console,
> gnome-terminal, whatever).
>
> DISPLAY=3D10.0.0.6:0.0 thunderbird
>
> A few seconds later after my crappy laptop processor has had a chance to
> catch up, it shows up on my desktop.
>
> The same can be done using the X11 forwarding flags with SSH. If I
> wanted to display thunderbird from my laptop to my desktop without
> touching my laptop I would simply run the following from my desktop.
>
> ssh -X spencersr@10.0.0.5
>
> then at the prompt on the laptop I would run 'thunderbird'. If you look
> at the DISPLAY environment variable on the laptop, it should say ":10.0"
> or something similar. This is simple port forwarding. SSH does a lot
> of work behind the scenes to set up access for X11 to forward correctly
> and then accepts packets on the remote host, tunneling them to the local
> display socket.
>
> Cool stuff.. just thought I would point out the futility of offering a
> seamless mode for X oriented virtual hosts since it has existed, in
> essence, since the early early years of Unix.
>

Shane,

Thanks for this message. I use this feature regularly for all sorts =20
of different scenarios.

I believe Damien did something like this at the ITExpo one year.

For example, when I was with ASD, I loaded cygwin on my Windows laptop =20
and configured it as an X11 client, then remotely loaded the evolution =20
mail client from a remote linux box I had setup up.

All kinds of fun can be had.

Mike B.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu Apr 9 10:53:28 2009

This archive was generated by hypermail 2.1.8 : Thu Apr 09 2009 - 10:53:28 AKDT