public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Initiating a remote X session
@ 2004-01-21 15:31 Steve Howie
  2004-01-21 15:41 ` Alexander Gottwald
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Steve Howie @ 2004-01-21 15:31 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: bszk, bo

Howdy,

We've just had a look at cygwin-xfree and are very impressed. However, 
we'd like to bundle it for our users so that we have a some pre-defined 
'sessions' available e.g. connect to a Unix host, run SAS then have the 
output sent to an cygwin-xfree server. Unix commands are not the forte 
of most of our users.

This is fine with a static IP address  - we would launch a program which 
does something like:

rexec <host> -l <username> "setenv DISPLAY <ipaddress>; /opt/SAS82/sas "

from the Cygwin shell. All bets are off, however, since most of our IP 
addresses are served out by DHCP.

We currently use X-Win32 which has a nifty feature for getting around 
this - you can specify $MYIP:0 which picks up the current IP address of 
the X-server and passes it to the session definition which is sent to 
the host which will run the application.

So ideally we would like something similar to this in cygwin-xfree :

rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"

I did a quick dig through the archives and noticed something similar to 
this question - but it was from a while ago - we'd ideally like to have 
the user get a popup prompting them for a username/password for the 
host, then pass this information via a command such as the one above, 
and also pick up the X-servers IP address whether static or dynamic. Is 
something like this available already?

Any info would be appreciated!

Thanks,

Scotty
---
Steve Howie
Academic Services, CCS
University of Guelph
Guelph Ontario
CANADA


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initiating a remote X session
  2004-01-21 15:31 Initiating a remote X session Steve Howie
@ 2004-01-21 15:41 ` Alexander Gottwald
  2004-01-21 16:24   ` Steve Howie
  2004-01-21 16:25   ` Andrew Braverman
  2004-01-21 16:46 ` Chris Green
  2004-01-22  9:30 ` Hans Dekker
  2 siblings, 2 replies; 8+ messages in thread
From: Alexander Gottwald @ 2004-01-21 15:41 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: bszk, bo

On Wed, 21 Jan 2004, Steve Howie wrote:

> Howdy,
> 
> We've just had a look at cygwin-xfree and are very impressed. However, 
> we'd like to bundle it for our users so that we have a some pre-defined 
> 'sessions' available e.g. connect to a Unix host, run SAS then have the 
> output sent to an cygwin-xfree server. Unix commands are not the forte 
> of most of our users.
> 
> This is fine with a static IP address  - we would launch a program which 
> does something like:
> 
> rexec <host> -l <username> "setenv DISPLAY <ipaddress>; /opt/SAS82/sas "

> So ideally we would like something similar to this in cygwin-xfree :
> 
> rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"

First try:
MYIP=`hostname -i`  rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"

but hostname -i does not work on cygwin. But maybe the name of the host is 
sufficient
MYIP=`hostname`  rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"

Or even better, Use ssh:

DISPLAY=localhost:0 ssh -X <host> -l <username> "/opt/SAS82/sas"

ssh will take care of setting the remote DISPLAY and all transferred 
data is sent via the ssh tunnel.

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initiating a remote X session
  2004-01-21 15:41 ` Alexander Gottwald
@ 2004-01-21 16:24   ` Steve Howie
  2004-01-21 17:10     ` Alexander Gottwald
  2004-01-21 17:42     ` Benjamin Riefenstahl
  2004-01-21 16:25   ` Andrew Braverman
  1 sibling, 2 replies; 8+ messages in thread
From: Steve Howie @ 2004-01-21 16:24 UTC (permalink / raw)
  To: cygwin-xfree

Alexander Gottwald wrote:

>[ .. ]
>  
>

>First try:
>MYIP=`hostname -i`  rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"
>
>but hostname -i does not work on cygwin. But maybe the name of the host is 
>sufficient
>MYIP=`hostname`  rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"
>  
>

But ipconfig does ...

    $  ipconfig | grep "IP Address" | awk '{print $15}'

will get the IP address, but no idea if this would work for older 
Windoze such as W95 (yes some people still use it :))


>Or even better, Use ssh:
>
>DISPLAY=localhost:0 ssh -X <host> -l <username> "/opt/SAS82/sas"
>
>ssh will take care of setting the remote DISPLAY and all transferred 
>data is sent via the ssh tunnel.
>  
>

Great! This works fine, but we still get the ugly ssh-style password 
prompt - just a thought, but is there anything available under cygwin to 
front end this with a username/password pop-up window? That'd be ideal :)

Thanks again for your help, Alexander

Scotty


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Initiating a remote X session
  2004-01-21 15:41 ` Alexander Gottwald
  2004-01-21 16:24   ` Steve Howie
@ 2004-01-21 16:25   ` Andrew Braverman
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Braverman @ 2004-01-21 16:25 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: bszk, bo

I would also suggest ssh tunnels for what you are trying to do.  That is
what I do myself.  If you
really do not want to do that, a replacement for
MYIP=`hostname -i`  rexec <host> -l <username> "setenv DISPLAY $MYIP:0;
/opt/SAS82/sas"

might be

MYIP=`ipconfig | grep "IP Address" | awk '{print $NF}'`  rexec <host> -l
<username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"

This assumes that there is only one network interface on the machine and the
machine has all the requisite programs installed.  I know that the Windows
9x versions had a program called winipcfg, which could not be used this way.
I am not sure if they had ipconfig in those versions and if not, when it
started.

Andy

> -----Original Message-----
> From: cygwin-xfree-owner@cygwin.com
> [mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Alexander Gottwald
> Sent: Wednesday, January 21, 2004 10:41 AM
> To: cygwin-xfree@cygwin.com
> Cc: bszk@wright.aps.uoguelph.ca; bo@uoguelph.ca
> Subject: Re: Initiating a remote X session
>
>
> On Wed, 21 Jan 2004, Steve Howie wrote:
>
> > Howdy,
> >
> > We've just had a look at cygwin-xfree and are very
> impressed. However,
> > we'd like to bundle it for our users so that we have a some
> pre-defined
> > 'sessions' available e.g. connect to a Unix host, run SAS
> then have the
> > output sent to an cygwin-xfree server. Unix commands are
> not the forte
> > of most of our users.
> >
> > This is fine with a static IP address  - we would launch a
> program which
> > does something like:
> >
> > rexec <host> -l <username> "setenv DISPLAY <ipaddress>;
> /opt/SAS82/sas "
>
> > So ideally we would like something similar to this in cygwin-xfree :
> >
> > rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"
>
> First try:
> MYIP=`hostname -i`  rexec <host> -l <username> "setenv
> DISPLAY $MYIP:0; /opt/SAS82/sas"
>
> but hostname -i does not work on cygwin. But maybe the name
> of the host is
> sufficient
> MYIP=`hostname`  rexec <host> -l <username> "setenv DISPLAY
> $MYIP:0; /opt/SAS82/sas"
>
> Or even better, Use ssh:
>
> DISPLAY=localhost:0 ssh -X <host> -l <username> "/opt/SAS82/sas"
>
> ssh will take care of setting the remote DISPLAY and all transferred
> data is sent via the ssh tunnel.
>
> bye
> 	ago
> --
>  Alexander.Gottwald@s1999.tu-chemnitz.de
>  http://www.gotti.org           ICQ: 126018723
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initiating a remote X session
  2004-01-21 15:31 Initiating a remote X session Steve Howie
  2004-01-21 15:41 ` Alexander Gottwald
@ 2004-01-21 16:46 ` Chris Green
  2004-01-22  9:30 ` Hans Dekker
  2 siblings, 0 replies; 8+ messages in thread
From: Chris Green @ 2004-01-21 16:46 UTC (permalink / raw)
  To: cygwin-xfree

On Wed, Jan 21, 2004 at 10:28:58AM -0500, Steve Howie wrote:
> 
> We currently use X-Win32 which has a nifty feature for getting around 
> this - you can specify $MYIP:0 which picks up the current IP address of 
> the X-server and passes it to the session definition which is sent to 
> the host which will run the application.
> 
Another 'emigrant' from X-Win32, welcome!  :-)

I have recently changed because X-Win32 was becoming a bit expensive
for a home (sort of SoHo) user.  Cygwin seems to be just as good, and
the clipboard handling is better now.

-- 
Chris Green (chris@areti.co.uk)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initiating a remote X session
  2004-01-21 16:24   ` Steve Howie
@ 2004-01-21 17:10     ` Alexander Gottwald
  2004-01-21 17:42     ` Benjamin Riefenstahl
  1 sibling, 0 replies; 8+ messages in thread
From: Alexander Gottwald @ 2004-01-21 17:10 UTC (permalink / raw)
  To: cygwin-xfree

On Wed, 21 Jan 2004, Steve Howie wrote:

> >Or even better, Use ssh:
> >
> >DISPLAY=localhost:0 ssh -X <host> -l <username> "/opt/SAS82/sas"
> >
> >ssh will take care of setting the remote DISPLAY and all transferred 
> >data is sent via the ssh tunnel.
> >  
> >
> 
> Great! This works fine, but we still get the ugly ssh-style password 
> prompt - just a thought, but is there anything available under cygwin to 
> front end this with a username/password pop-up window? That'd be ideal :)

Maybe x11-ssh-askpass may help here
http://www.jmknoble.net/software/x11-ssh-askpass/

The same for windows
http://www.ganaware.jp/S/win-ssh-askpass/

So the statup script is

#!/bin/bash
export DISPLAY=localhost:0.0
export SSH_ASKPASS="/usr/bin/win-ssh-askpass.exe"
ssh -f -X <host> -l username "/opt/SAS82/sas"

This should bring up a window for the password.

Unfortunatly the testing with cygwin openssh did not work properly.
I'll take a look if this is disabled with the cygwin build-

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initiating a remote X session
  2004-01-21 16:24   ` Steve Howie
  2004-01-21 17:10     ` Alexander Gottwald
@ 2004-01-21 17:42     ` Benjamin Riefenstahl
  1 sibling, 0 replies; 8+ messages in thread
From: Benjamin Riefenstahl @ 2004-01-21 17:42 UTC (permalink / raw)
  To: cygwin-xfree

Hi Steve,

Steve Howie <showie@uoguelph.ca> writes:
> Great! This works fine, but we still get the ugly ssh-style password
> prompt - just a thought, but is there anything available under
> cygwin to front end this with a username/password pop-up window?
> That'd be ideal :)

If you don't really care that much about user-level security for this,
use a public key with an empty passphrase.

The Cygwin keychain package may also be interesting for you in this
context.

benny


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Initiating a remote X session
  2004-01-21 15:31 Initiating a remote X session Steve Howie
  2004-01-21 15:41 ` Alexander Gottwald
  2004-01-21 16:46 ` Chris Green
@ 2004-01-22  9:30 ` Hans Dekker
  2 siblings, 0 replies; 8+ messages in thread
From: Hans Dekker @ 2004-01-22  9:30 UTC (permalink / raw)
  To: cygwin-xfree

Hi Steve,

Being triggered when you mentioned you are using SAS, here is another 
solution that may help you. You can change the scripts with secure 
shells as you like.
We are using sas too. I have installed cygwin to be able to remotely use 
it, which works fine apart from some nitty gritty AltGr keyboard 
problems I have and you probably don't when using US keyboards.

I used the following set up to give access to users on the Unix 
containing Sas:

The startxwin.bat is modified to:

start XWin -multiwindow
xterm -T "SAS startup window" -e \\<Your server>\<Central 
directory>\initsas.sh %1%

The server and central directory are accesible to anyone using Sas.

Now, the contents of initsas.sh are:

xhost +<sas server> > /dev/null
echo Starting SAS environment...
export IPADDR=`ipconfig | grep ddress | grep "10\." | cut -f 2 -d ":" | 
cut -f 2 -d " "`
rsh <sas server> -l "${USERNAME}" "export DISPLAY=\"${IPADDR}:0.0\";cd 
/opt/sas8;sas ${1}"

Please note that:
1. The usernames for WinXP domains are the same as those used on Unix.
2. The WinXP client is given access to the Unix/Sas host by putting the 
IP-number/client name in the hosts.equiv.
3. Different versions of Windows give you different formats of ipconfig 
output.
4. Our Ip-addresses start with 10.
5. As a parameter to the startxwin.bat we use '-explorer', to be used as 
a sas startup parameter.
See your sas documentation for more options.

Hope it helps you,

H.

Steve Howie escribió:
> Howdy,
> 
> We've just had a look at cygwin-xfree and are very impressed. However, 
> we'd like to bundle it for our users so that we have a some pre-defined 
> 'sessions' available e.g. connect to a Unix host, run SAS then have the 
> output sent to an cygwin-xfree server. Unix commands are not the forte 
> of most of our users.
> 
> This is fine with a static IP address  - we would launch a program which 
> does something like:
> 
> rexec <host> -l <username> "setenv DISPLAY <ipaddress>; /opt/SAS82/sas "
> 
> from the Cygwin shell. All bets are off, however, since most of our IP 
> addresses are served out by DHCP.
> 
> We currently use X-Win32 which has a nifty feature for getting around 
> this - you can specify $MYIP:0 which picks up the current IP address of 
> the X-server and passes it to the session definition which is sent to 
> the host which will run the application.
> 
> So ideally we would like something similar to this in cygwin-xfree :
> 
> rexec <host> -l <username> "setenv DISPLAY $MYIP:0; /opt/SAS82/sas"
> 
> I did a quick dig through the archives and noticed something similar to 
> this question - but it was from a while ago - we'd ideally like to have 
> the user get a popup prompting them for a username/password for the 
> host, then pass this information via a command such as the one above, 
> and also pick up the X-servers IP address whether static or dynamic. Is 
> something like this available already?
> 
> Any info would be appreciated!
> 
> Thanks,
> 
> Scotty
> ---
> Steve Howie
> Academic Services, CCS
> University of Guelph
> Guelph Ontario
> CANADA
> 
> .
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-01-22  9:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-21 15:31 Initiating a remote X session Steve Howie
2004-01-21 15:41 ` Alexander Gottwald
2004-01-21 16:24   ` Steve Howie
2004-01-21 17:10     ` Alexander Gottwald
2004-01-21 17:42     ` Benjamin Riefenstahl
2004-01-21 16:25   ` Andrew Braverman
2004-01-21 16:46 ` Chris Green
2004-01-22  9:30 ` Hans Dekker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).