Re: Read User Input using X
- From: "Zed" <ztuffaha@xxxxxxxxx>
- Date: 29 Aug 2006 15:13:43 -0700
Thanks for the reply Jon. But I don't think I explained myself fully.
Again please bear with me.
Basically, the Cygwin shortcut starts the application running on Unix
server.
Imagine somebody who has no knowledge of computers trying to log in
from a common windows computer to my application. He has no idea of
what is going on in the background. All he knows is that he clicks on
the icon, enters his information and starts the application.
In my script (in .xinitrc in specific which runs in the background once
the shortcut is double clicked), I am currently using the "ssh
username@server" where username is a windows environment variable. But
if it's a common computer, the username variable is different from the
user's real login.
So I want an option that will peform ssh to the server. The server will
then ask for both the username and the password (instead of the server
asking for the password)
or
display a prompt (in X windows) for the user to enter his username and
then pass that as ssh username@server.
Now my question is: can do a "ssh"to the server. The server should then
say "enter username".
My other question is: if the previous is not possible, is there a way
to pop a X window asking the user to enter his username and then read
the input?
Thanks
Zed
Unknown wrote:
On Tue, 29 Aug 2006 10:06:56 -0700, ztuffaha@xxxxxxxxx wrote:
I am new to this so please bear with me. I have created a java
application on a UNIX server. For windows users, I have created a
Cygwin shortcut which will start Xwindows and connect (using ssh) to
the UNIX server and run the application.
My problem is: when I do ssh to the UNIX machine, the server will take
the $USERNAME as the login name to access the unix machine? I would
like to create something like an xmessage that will prompt the user to
enter a username (typed by the user) and then pass it to the server. Or
let ssh ask for the username ( I was not able to do that either.. it
will automatically take the $USERNAME).
[jon@jonspc Pan]$ ssh --help
usage: ssh [-1246AaCfghkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
[-D port] [-e escape_char] [-F configfile] [-i identity_file]
[-L port:host:hostport] [-l login_name] [-m mac_spec] [-o option]
[-p port] [-R port:host:hostport] [-S ctl] [user@]hostname [command]
My ssh client has "-l login_name" or supports user@host. Does the cygwin
client not support this, I have no means to check ?
Or you could use username@domain as the argument to ssh. So for an X
application that would be ssh -X "fred@xxxxxxxxxxxxxxxxxxxxxx"
Cygwin has bash available and as you say Xmessage. You can prompt for a
username or read the windows username from the local windows environment.
I dont have a windows box to hand but from memory the username is
available in the shell on windows2000 and above.
Jon
.
- Follow-Ups:
- Re: Read User Input using X
- From: Alan Greenberger
- Re: Read User Input using X
- From: Unknown
- Re: Read User Input using X
- References:
- Read User Input using X
- From: ztuffaha@xxxxxxxxx
- Re: Read User Input using X
- From: Unknown
- Read User Input using X
- Prev by Date: Re: Read User Input using X
- Next by Date: Re: Read User Input using X
- Previous by thread: Re: Read User Input using X
- Next by thread: Re: Read User Input using X
- Index(es):
Relevant Pages
|
|