[wellylug] Running an X session over SSH

Richard Hector rhector at paradise.net.nz
Thu Jan 29 17:28:31 NZDT 2004


On Wed, Jan 28, 2004 at 10:16:38PM +1300, Sam Cannell wrote:
> 
> If you get an error message saying you've been denied access to the X
> server, try running the following inside an xterm on the local machine:
> 
> xhost +localhost

Ouch. That shouldn't be necessary; the ssh client is being run by you,
and that's what's connecting to the local X server, so you should
already have permission. What you've suggested will allow anybody else
logged in to your box to access your X server too.

> With a bit of fiddling, you may find you can start a local X session
> with only an xterm running, ssh to the remote host and execute your
> ~/.xsession or ~/.xinitrc to run a full X session from the remote
> server.

Why bother with an xterm? I just put "exec ssh otherbox icewm" in my
.xsession file. You need to be able to do that without a password of
course; at the moment I've got an ssh key with no pass phrase, but I'm
intending to add a passphrase, then use ssh-askpass in my .xsession to
get my passphrase and start ssh-agent before running icewm.

This is on a P133 that is a bit tedious to run much X stuff on; it now
sshes to the server in the cupboard (which only has a mono card ...) to
run X apps.

Richard




More information about the wellylug mailing list