[plug] Forcing X server to allow user to start programs remotely after login

James Devenish devenish at guild.uwa.edu.au
Sun Nov 7 10:08:11 WST 2004


In message <418D7163.5040506 at tigris.org>
on Sun, Nov 07, 2004 at 08:50:43AM +0800, Timothy White wrote:
> Basically I want to be able to ssh into the terminal from any
> computer and run programs on my Xsession on the terminal server.

FYI: this is still ambiguous because 'server' has a very specific
meaning in X 11 contexts, and that meaning might or might not be the
same as what you are intending to say. I will continue to use the terms
xdisplayhost and remotehost (since I used them in my last post).

When you say "SSH into the terminal and from any computer and run
programmes on my X session on the terminal server", this sounds like it
should work without a problem at all. I might describe this as "logging
into xdisplayhost from remotehost, and running a programme on
xdisplayhost to be displayed on xdisplayhost". In this case, because
your SSH shell is logged in to the machine that has the ~/.Xauthority
file, there should be no authorisation problem. The only difficulty
might be the $DISPLAY variable (e.g. you may need to set it to :0 in
the shell after logging in).

> Login in to Xserver locally or with XDMCP so that the Xserver is running 
> on the server and all applications are on the server.
> Then from another computer ssh into the server that is running the 
> Xsession and start a new program that will display in my Xsession.

This sounds like a "no-brainer" situation. Since you would be running
from the local host in a MIT-MAGIC-COOKIE scenario, there is basically
no relevance for `xhost`. It should "just work" without any further X
configuration. If it isn't working for you, what sort of error are you
getting? All I can think is that your DISPLAY variable is not set up in
your SSH session. The only other problem is perhaps if your Xauthority
file is not getting updated when you log into the xdisplayhost.





More information about the plug mailing list