f



Info window

How can I write simple c-code to
do a pop-up window with some information
text in a Sun X environment?

/Eva
0
Eva
11/19/2003 12:18:08 PM
comp.unix.programmer 10848 articles. 0 followers. kokososo56 (350) is leader. Post Follow

5 Replies
466 Views

Similar Articles

[PageSpeed] 34

Eva Karlsson CH (AL/EAB) wrote:

> How can I write simple c-code to
> do a pop-up window with some information
> text in a Sun X environment?
> 
> /Eva

Except for very trivial cases it's not possible to do "a little X".  So 
tread carefully.

How difficult it is depends on what you mean by "pop-up window with 
some info...".  How much information?  Does the window have to have 
controls (e.g. buttons) on it?  Does it have to scroll large amounts of 
text?  What makes it go away?

Could you do what you want by calling an existing X application to 
display the info?  For example by calling up an xterm.

The best place to pursue X development is in the groups comp.windows.x.*

-- ced

-- 
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.

0
Chuck
11/19/2003 3:15:00 PM
2003/11/19, 13:18(+01), Eva Karlsson CH (AL/EAB):
> How can I write simple c-code to
> do a pop-up window with some information
> text in a Sun X environment?

system("xmessage 'some text'");

is quite an easy way.

-- 
St�phane                      ["Stephane.Chazelas" at "free.fr"]
0
Stephane
11/19/2003 6:03:53 PM
Stephane CHAZELAS wrote:
> 2003/11/19, 13:18(+01), Eva Karlsson CH (AL/EAB):
> 
>>How can I write simple c-code to
>>do a pop-up window with some information
>>text in a Sun X environment?
> 
> 
> system("xmessage 'some text'");
> 
> is quite an easy way.
> 

Solaris doesn't come with XFree86 not it's xmessage client AFAIK.

-- ced

-- 
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.

0
Chuck
11/20/2003 2:28:15 PM
Chuck Dillon wrote:
> Solaris doesn't come with XFree86 nor it's xmessage client AFAIK.

I tend to use xterm -e, e.g.:

	xterm -e sh -c "cat /etc/motd; read junk"

Though there may be a cleaner way.

MB

0
Mohun
11/20/2003 2:46:56 PM
2003/11/20, 08:28(-06), Chuck Dillon:
[...]
>> system("xmessage 'some text'");
>> 
>> is quite an easy way.
[...]
>
> Solaris doesn't come with XFree86 not it's xmessage client AFAIK.

I don't have access to a Solaris system, but xmessage is
an X utility from the X consortium, even if it's an
"unsupported" one, not specifically a XFree86 one.
http://ftp.x.org/pub/unsupported/programs/xmessage/ 

-- 
St�phane                      ["Stephane.Chazelas" at "free.fr"]
0
Stephane
11/20/2003 3:06:02 PM
Reply: