Read User Input using X - Xwindows

This is a discussion on Read User Input using X - Xwindows ; Is there any form of xmessage (or something similar) in X windows that reads input? I know that you can read return status for xmessage but can you read input like a username or something similar. Thanks...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Read User Input using X

  1. Read User Input using X

    Is there any form of xmessage (or something similar) in X windows that
    reads input? I know that you can read return status for xmessage but
    can you read input like a username or something similar.
    Thanks


  2. Re: Read User Input using X

    ztuffaha@gmail.com wrote:

    > Is there any form of xmessage (or something similar) in X windows that
    > reads input? I know that you can read return status for xmessage but
    > can you read input like a username or something similar.
    > Thanks


    I don't know about this "X windows" thing, but in The X Window System (yes,
    the distinction is important) there is no built-in user interface. All
    those things are handled by higher level libraries built on top of the
    system.

    There are lots of pre-built X GUI libraries, such as Qt.


  3. Re: Read User Input using X

    ztuffaha@gmail.com writes:

    > Is there any form of xmessage (or something similar) in X windows that
    > reads input? I know that you can read return status for xmessage but
    > can you read input like a username or something similar.


    Since xmessage is a program used for getting input from a user to a
    shell script through a dialog box it seems like you want a program for
    that with more capabilities than xmessage. One such is zenity, which
    is included in the Gnome environment.

    zenity --title="User name" --text="User name" --entry

    would give a dialog with a text entry and "User name" as window title
    and text in dialog. Zenity sends the entered text to standard output.

    --
    - Mårten

    mail: msv@kth.se *** ICQ: 4356928 *** mobile: +46 (0)707390385

  4. Re: Read User Input using X

    Tony O'Bryan wrote:
    > ztuffaha@gmail.com wrote:
    >
    > > Is there any form of xmessage (or something similar) in X windows that
    > > reads input? I know that you can read return status for xmessage but
    > > can you read input like a username or something similar.
    > > Thanks

    >
    > I don't know about this "X windows" thing, but in The X Window System (yes,
    > the distinction is important) there is no built-in user interface. All
    > those things are handled by higher level libraries built on top of the
    > system.
    >
    > There are lots of pre-built X GUI libraries, such as Qt.


    Could you please tell me the difference between X windows and X window
    system? I am kind of a newbie at this. I know that I am running Cygwin
    X server and client and I am still looking for a simple way to read
    user input through that. Any direction is appreciated.
    Thanks
    Zed


  5. Re: Read User Input using X

    ztuffaha@gmail.com wrote:

    > Could you please tell me the difference between X windows and X window
    > system?


    "X Windows" is a common (and wrong) name used by newbies (and some
    not-so-newbies, unfortunately) when referring to the X Window System. I'm
    pasting the relevant section of the X11 manual:

    -- start--

    The X.Org Foundation requests that the following names be used when
    referring to this software:

    X
    X Window System
    X Version 11
    X Window System, Version 11
    X11

    -- end --

    > I am kind of a newbie at this. I know that I am running Cygwin
    > X server and client and I am still looking for a simple way to read
    > user input through that.


    That depends on what you're doing. Are you writing a stand-alone X
    application? If so, then you should get a higher level toolkit (such as
    GTK+ and Qt). There is no simple built-in way to get a line of user input
    from the basic X11 library. You need a higher level library like the ones
    I mentioned above.


  6. Re: Read User Input using X

    Tony O'Bryan wrote:

    > Are you writing a stand-alone X
    > application? If so, then you should get a higher level toolkit (such as
    > GTK+ and Qt).


    I should have finished this thought before posting: if you really want to
    stay at the XLib level, I'll post an overview of how to read input text.
    It's rather involved, so I'm not going to dive into it unless that's really
    what you want.


+ Reply to Thread