If I SSH into a remote machine and then su to another user how can I run programmes, as that user, under X without it complaining that it can't open the display?
I want to run an application as the 'mythtv' user which is created when installing MythTV.
On 07/02/2008, Barry Samuels bjsamuels@beenthere-donethat.org.uk wrote:
If I SSH into a remote machine and then su to another user how can I run programmes, as that user, under X without it complaining that it can't open the display?
I want to run an application as the 'mythtv' user which is created when installing MythTV.
http://www.starnet.com/xwin32kb/How_to_run_X_Clients_as_root_from_a_StarNetS...
HTH,
Peter.
On 07-Feb-08 18:42:26, Barry Samuels wrote:
If I SSH into a remote machine and then su to another user how can I run programmes, as that user, under X without it complaining that it can't open the display?
I want to run an application as the 'mythtv' user which is created when installing MythTV.
-- Barry Samuels
Your problem may be that after you su, you do not have the DISPLAY environment variable in the new user's environment.
So in that case, if the machine you've logged in from is called say "whatsit" (and is known as such in the remote machine's /etc/hosts file), then after you have su'd enter the command
export DISPLAY=whatsit:0.0
However, I have encountered some strange behaviour with X connections after logging in via ssh which I've never properly understood (as opposed to logging in via telnet), so maybe this is not the solution.
But I hope it is!
Best wishes, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 07-Feb-08 Time: 19:28:03 ------------------------------ XFMail ------------------------------
On 07 Feb 18:42, Barry Samuels wrote:
If I SSH into a remote machine and then su to another user how can I run programmes, as that user, under X without it complaining that it can't open the display?
I want to run an application as the 'mythtv' user which is created when installing MythTV.
If you can directly su to the other user then use su -m which will retain your environment, that should work.
On 07 Feb 18:42, Barry Samuels wrote: If I SSH into a remote machine and then su to another user how can I run programmes, as that user, under X without it complaining that it can't open the display?
I want to run an application as the 'mythtv' user which is created when installing MythTV.
Thanks for the various suggestions but I can't get any of them to work.
Perhaps I should mention that the mythtv user does not have a home directory. Would that make a difference?
Barry Samuels bjsamuels@beenthere-donethat.org.uk wrote:
Perhaps I should mention that the mythtv user does not have a home directory. Would that make a difference?
Probably will upset xauth-based solutions (all of them?):-
By default, xauth will use the file specified by the XAUTHORITY environment variable or .Xauthority in the user’s home directory.
Source: man xauth
Hope that helps,