Re: Finding my $DISPLAY programatically.
Re: Finding my $DISPLAY programatically.
- Subject: Re: Finding my $DISPLAY programatically.
- From: "Tom Scogland" <email@hidden>
- Date: Fri, 2 May 2008 11:28:21 -0400
Actually there is a password option for ssh, but it doesn't take it on the command line, it takes it from standard in. So, you could in fact use it in such a way that a ps would reveal nothing. For that matter, using ssh keys on your hosts is not exactly an insecure option.
Regardless, you will still need to determine the hostname/ip yourself, but since you mention ps, if your users would be content to have to have x11 running before you run the check, you could always use ps aux | grep -i X and just parse out the display number.
-Tom
On Fri, May 2, 2008 at 10:57 AM, Robert Tillyard <
email@hidden> wrote:
On 2 May 2008, at 15:42, Mark J. Reed wrote:
On Fri, May 2, 2008 at 10:38 AM, Robert Tillyard <email@hidden> wrote:
I use rexec to get the remote applications to run which works pretty well,
however, I'm currently having to hard code the DISPLAY to <my IP>:0.0
because the remote systems don't understand the launchd style DISPLAY.
I don't understand. How do the remote systems deal with even a
non-launchd-style *local* DISPLAY value, e.g. just plain :0 without a
hostname? Something must already be translating that somewhere.
Why not use ssh instead of rexec, with its X11 tunnelling that
automatically sets the remote DISPLAY appropriately?
--
Mark J. Reed <email@hidden>
At present I am hard coding the DISPLAY to their IP address with :0.0 tacked on, so for my computer that would be 172.16.1.1:0.0 which the remote end does understand.
Some of the remote systems are quite old and don't all have ssh and in order to use ssh I need to get the users user name and password into the command line but there is no -password option to ssh and even if there was another user could see the password by doing a ps.
I'm hoping that it is easier to find a valid DISPLAY that a remote host will recognise that it is to convert the application to use ssh. If that's not possible then I will have to restrict the Macs to have only one user at a time and if X11 crashes they'll have to reboot it but I'd like to be more friendly than that if I can.
Regards, Rob.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (
email@hidden)
This email sent to
email@hidden
--
-N
AKA:Tom Scogland
I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world.
-Albert Einstein
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden