On Sunday 27 March 2005 15:11, Mark Knecht wrote: > Hi, > This seems to be getting closer. At least both sides keep trying. > OK, I seemed to get the closest to successy by doing this. (Dragonfly > is a local machine on my network.) > > [EMAIL PROTECTED] mark]$ xhost +Dragonfly > Dragonfly being added to access control list > [EMAIL PROTECTED] mark]$ export DISPLAY=:2 > [EMAIL PROTECTED] mark]$ ssh -X dragonfly /usr/bin/gnome-session > [EMAIL PROTECTED]'s password: > Warning: No xauth data; using fake authentication data for X11 forwarding. > Xlib: connection to "localhost:10.0" refused by server > Xlib: Invalid MIT-MAGIC-COOKIE-1 key > > (gnome-session:9576): Gtk-WARNING **: cannot open display: > [EMAIL PROTECTED] mark]$
Don't forget to start the X server (Xfree, Xorg, or Xnest) on :2 before
running that. You shouldn't need to use xhost, ssh takes care of that for
you. Also, you might need to use -Y on the ssh line.
> Is this possibly because I don't have specific ports open?
No, since the connection is tunneled through SSH
>
> Not sure about the Xnest suggestion as this is a network of both
> Gentoo and FC2 machines and my FC2 machines do not seem to have Xnest.
It doesn't matter if the other systems have it. Since it's just an X server,
it only runs on the local system. Clients don't care what kind of server they
connect to.
Here's a little shell script I wrote to do this just now. It should work at
least on Gentoo clients. Note that I had a problem when sshing to localhost
that it would unset DISPLAY, but it worked when sshing to my server. YMMV
-----------------------------------------------------------------------------
#!/bin/bash
# rXs - remote X session
# Written by Jonathan S. Myers
# This software is in the Public Domain. All Rights Relinquished.
# Anyone may use it without restriction, including replacing my name with your
# own. However, I'd appreciate it if you did leave my name on it.
#set the defaults
server=Xnest
session=/usr/bin/gnome-session
if [ $# -lt 1 ] || [ $# -gt 3 ] ; then
echo "Usage: $0 <hostname> [<session-program> [<Xserver>]]"
exit;
fi
#set the remote hostname
hostname=$1
#set the session program
if [ $# -ge 2 ] ; then
session=$2
fi
#set the server name
if [ $# -eq 3 ] ; then
server=$3
fi
#figure out the next available display number
dpy=0
for i in /tmp/.X11-unix/X* ; do
thisdpy=$(basename $i | cut -c 2-)
if [ $dpy -lt $thisdpy ] ; then
dpy=$thisdpy;
fi
echo $thisdpy:$dpy
done
dpyname=":$(($dpy + 1))"
#start the server
$server $dpyname &
#start the session program
export DISPLAY=$dpyname
ssh -X $hostname $session
pgpiYLEXzMWI7.pgp
Description: PGP signature
