KDE Desktop [plug] X forwarding SOLVED

Craig Ringer craig at postnewspapers.com.au
Wed Oct 13 16:41:05 WST 2004


Marc Wiriadisastra wrote:

> Are you able to get a kde or gnome desktop across ssh.

I'm a little confused by that statement. If your intent was "Is it 
possible to get a KDE or GNOME session across ssh" then the answer is yes.

ssh -X $REMOTE_HOST_NAME startkde

should do it nicely for KDE. That will _only_ work if you do not have a 
window manager running, and is best done from a new X session with just 
an xterm. It may be possible to do something like this (must play with 
that idea):

startx /usr/bin/ssh -X $REMOTE_HOST_NAME startkde

from the console (it certainly should work if you use ssh keys and the 
ssh agent; not sure how password input would work otherwise though).

A another way, at the cost of efficiency, may be:

ssh -X $REMOTE_HOST_NAME startx -- /usr/X11R6/bin/Xnest

(requires Xnest).

> When I type startx after I ssh as a normal user it says I don't have 
> authorisation which is a pam issue

Not necessarily - it's quite likely to be an X authentication issue, 
which is quite different and managed using xauth cookies. In general, if 
you use 'ssh -X' it'll all "just work" but if you're trying to set 
DISPLAY etc then (a) you're bypassing the security offered by ssh, and 
(b) you must manage authentication manually.

> and I'll have to figure how to sort 
> that out.  As root though when I type #startx it loads up but on the 
> monitor of the actual server not through to my computer screen which is 
> separate.

That's right; you need to use the command usually run by startx 
(something like startkde or gnome-session) to start the user session 
instead, or use startx with xnest as described above.

--
Craig Ringer




More information about the plug mailing list