Tunneling a remote X session through SSH on Win32
(v0.1)
Tutorial
written
by : slain
(from
forums.xbox-scene.com)
Foreword:
Just in
case anyone
is wondering
why running
an X session
from your
XBOX to
another
PC would
be useful,
let me
give you
a few
suggestions.
* XBOX
has no
keyboard/mouse
(I've
not gotten
around
to building
my USB
adaptor
yet, so
this is
why I
use this
method)
* Remote
administration
* Remote
access
for friends/family
etc.
What
you will
need:
* Any
Linux
distribution
on your
XBOX (tested
with Ed's
Debian
Live CD
0.0.9/0.0.10)
* X-Windows
installed
on your
XBOX (and
preferably
KDE3)
* Any
X11 Server
(I rate
and recommend
X-Win32
5.4 by
StarNet)
* Any
SSH client
(I'd stronyly
suggest
you use
PuTTY
as it's
the best
out there,
and it's
open source)
Step
1: Connecting
to the
XBOX via
SSH
Fire up
your SSH
client
(PuTTY
if you
follow
good advice
and connect
to your
XBOX,
which
by default
has the
IP address
of 192.168.0.2.
Remember
to check
the SSH
checkbox,
you should
see the
contents
of the
'Port'
textbox
change
to '22'.
Enter
your login
as root,
and then
your password.
If the
password
is still
'xbox',
then change
it now!
You do
NOT want
your XBOX
going
online
with the
default
password.
To change
the password,
type this:
xbox:~#
passwd
It'll
prompt
you to
enter
your new
password,
and again
for confirmation.
Notice
it doesn't
ask you
for the
original
password,
because
you're
the root
user.
Nice to
be trusted,
isn't
it?
Step
2: Enabling
X11 forwarding
through
SSH on
XBOX
By default,
X11 fowarding
through
SSH is
disabled.
Let's
change
that now.
To open
the SSH
server
config
file,
type this:
xbox:~#
nano /etc/ssh/sshd_config
Scroll
right
down,
and near
the bottom
you'll
see an
line called
'X11 Forwarding
no'. Change
the 'no'
to 'yes'
and you
can exit,
remembering
to press
'y' when
it prompts
you to
save the
changes.
You can
close
your SSH
client
now, as
we're
moving
onto the
Windows
side of
things;
we're
going
to install
your X11
server.
Step
3: Installing
and configuring
your Win32
X11 server
Hopefully
you've
taken
my advice
and gone
for X-Win32
5.4, in
which
case I
can guide
you though
the settings.
To be
honest,
there's
not really
much that
you need
to change
here...
but what
you DO
change
has a
large
effect
on how
you want
your X
session
to behave.
Go to
Start
->
Programs
->
X-Win32
5.4 ->
X-Config
Now,
the only
settings
you need
to decide
on are
on the
'Window'
tab. You
can forget
anything
about
sessions,
as they're
not needed
for this
sort of
implementation.
If you
look under
where
it says
'Window
Mode'
you will
see 3
options.
These
options
effect
greatly
how your
windows
will be
viewed
on your
PC. Let
me take
you though
them:
* Single
- This
will display
one "container"
window
that all
applications
that come
through
the tunnel
will be
stored
in. This
is my
personal
favorite,
as I don't
tend to
run just
the one
application
at a time.
With this
mode,
I like
to run
the whole
KDE desktop
from within
it. More
on how
to actually
execute
programs
later.
By default,
this mode
is set
to 'Full
Screen'.
I run
my Win32
desktop
at 1280x1024,
so to
keep things
comfortable
I run
my X-Win32
window
at 1152x864.
Have a
play around
with the
settings,
see which
you prefer.
* Multiple
- This
mode will
run each
program
that comes
through
the tunnel
in its
OWN window.
For example
if you
ran XMMS,
Mozilla
and Konquerer,
you would
have entries
on your
Windows
98/2000/XP
taskbar
for all
three.
Because
of the
sheer
amount
of programs
I usually
have open
at once,
I find
this method
to be
messy.
For people
that will
only run
a couple
of programs
at a time
over the
tunnel,
it might
be more
conveniant
to use
this mode.
* Both
- Very
messy.
Try it
and see
if you
like it,
but I'm
pretty
sure most
people
will fall
into either
the 'Single'
or 'Multiple'
boats.
Once
you've
picked
the option
that sounds
most appealing
to you,
click
'OK' to
save the
settings.
Now open
the main
X-Win32
program
and leave
it running.
We're
nearly
ready
to create
the tunnel.
Step
4: Enabling
X11 forwarding
through
SSH on
PC
Fire
up your
SSH client
again,
and as
before
enter
the XBOX's
IP and
so on.
If you're
using
PuTTY,
look the
white
list on
the left
and look
for 'Tunnels'
under
'SSH',
and click
it. You
should
see the
'Enable
X11 Forwarding'
tickbox,
so make
sure it's
ticked.
Leave
'X display
location'
at it's
default,
which
should
be 'localhost:0'.
Now might
be a good
time to
save the
session
in PuTTY
now, so
you don't
have to
keep typing
the IP
and enabling
X11 forwarding.
Pick a
name like
XBOX (as
if I needed
to tell
you).
Log in!
Step
5: Creating
the tunnel
and using
X11 on
your PC
Right,
so X-Win32
is open?
You're
logged
into your
XBOX via
SSH? Good.
Now we
can create
our first
tunnel.
If you
selected
'Single'
when we
configured
X-Win32,
and you
have KDE
installed,
try this:
xbox:~#
kde3 &
KDE should
now load
in your
X-Win32
window.
If you
selected
'Multiple'
in X-Win32,
try this:
xbox:~#
xclock
&
And then
this:
xbox:~#
xeyes
&
I think
we're
done now.
Have fun!
Thanks:
* xbox-scene.com
and forums
* Team
Xecuter
* Digital-Forums
and Modshack
equally
* EFnet
#xbox,#digital-forums
* The
Academy
Tutorial
written
by : slain
(from
forums.xbox-scene.com)