[aklug] Re: Adventures in wine

From: Shane R. Spencer <shane@bogomip.com>
Date: Thu Apr 09 2009 - 10:33:00 AKDT

markt9 wrote:
>
> The virtual box "transparent mode" is awesome running XP. I found some
> operating systems that did not seem to have the necessary drivers to
> support it, or at least not easily for me, (win7, fedora, debian) but I
> only need XP every once in a while, and it is very usable even without
> transparent mode enabled.
>
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=unix:0.0" or simply
"DISPLAY=: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=remoteip: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=10.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.

Have fun,

Shane

-- Attached file included as plaintext by Ecartis --
-- File: signature.asc
-- Desc: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkneP18ACgkQXK/vGhypreIYZACfVu96x91ivsHtG/MyKwX/jGvn
NAUAnR43cnDV75nT8if8k3adzo+je0oP
=ziYH
-----END PGP SIGNATURE-----

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

This archive was generated by hypermail 2.1.8 : Thu Apr 09 2009 - 10:33:24 AKDT