HOW TO GET XELGA TO WORK REMOTELY
====================================
The basic idea is as follows: since X11 forwarding doesn't work
correctly for some reason, just send the X11 data over a normal TCP
connection and don't worry about any kind of authentication.
Of course, this approach opens up your computer to someone randomly
connecting to the your X11 port on the remote side, and they could
potentially screw with your X connection. Lets all play nice and not do
that, and chances are nobody else will do it either. Besides, they have
to be on campus or logged in to screw with it.
Despite the insecurity of it all, if you want it to work remotely, this
is how to do it. Personally, I think the risk is worth it.
This guide assumes that you're not a moron who skips over directions,
and that you already have the mentor stuff running correctly and you
know how to make it do things.
Windows:
---------------------
You must have your X server listening on a TCP port. XMing and cygwin
do this by default, so it shouldn't be an issue, and this will work by
default. The default port for X is 6000.
Linux/UNIX:
---------------------
Ironically, its harder to make Linux/UNIX work correctly.
You MUST have X server listening on a TCP port. Most distributions
disable this by default, because it is inherently insecure. When you
are not using Xelga, you should disable listening on tcp ports. If
you're really paranoid, just setup a firewall to disable connections to
that port from anything that isn't localhost.
To tell if your X server is listening on a TCP port, run the following
command: "netstat -an|grep :6000". If it shows something, then its
working. If not, then you need to screw with the following steps, taken
from:
http://www.xskat.de/xskat-lan-irc.html
The X server has to be started without the option "-nolisten tcp".
Sadly this has to be done quite differently depending on OS and display
manager.
For SUSE and KDE set DISPLAYMANAGER_XSERVER_TCP_PORT_6000_OPEN to "yes"
as root using the /etc/sysconfig editor in yast2 under "Desktop ->
Display manager" and execute SuSEconfig afterwards. You may have to
comment the line "ServerArgsLocal=-nolisten tcp" in
/etc/opt/kde3/share/config/kdm/kdmrc with a "#" at the beginning of
this line. Also, there should be no option "-nolisten tcp" in
/etc/X11/xdm/Xservers.
For Ubuntu and Gnome change the line "DisallowTCP=true" to
"DisallowTCP=false" in /etc/gdm/gdm.conf or use gdmconfig to deactivate
the setting "Always disallow TCP connections" for the X server. For
other distributions, look in the /etc/X11/ folder and see if you can
find something.
Logout and restart the graphical user interface then. If executing the
command "netstat -an|grep :6000" gives some output, the X server is
listening on port 6000.
Everyone:
=====================
Ok, once you get X working with TCP ports, then you need to select a
random number between 90 and 1024. Call this XXXX. Keep that in mind.
Now, add 6000 to that number. That number is the remote port you need
to set. Call it YYYY.
DO NOT ENABLE X11 FORWARDING IN SSH! IT WILL BREAK THINGS! Seriously,
no idea why. It has something to do with authentication, and xelga
screws it up somehow.
In Linux, you must run this command:
xhost + /// this
disables security checking, you only need it for tcp connections
anyways
ssh -x -C -R YYYY:localhost:6000
username@bronco.wmich.edu
In putty, you should go to the 'Tunnel' tab, and set the forward type
to 'remote'. Set the port to YYYY, and set the other field to
'localhost:6000'. Add this, and you should see something like R6000
show in the other field above it. Set the hostname to the correct host
and login.
After Login, you must type this command FIRST.
setenv DISPLAY "localhost:XXXX"
Now, run something like 'xclock'. If that shows up on your desktop,
then everything should work fine, including xelga. If it doesn't work,
then you screwed something up. Try running 'xhost +' on your local and
remote machines. Good luck.
Dustin