Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Looking for alternative to 'xmessage'

498 views
Skip to first unread message

Kenny McCormack

unread,
Oct 21, 2017, 4:21:15 AM10/21/17
to
In a shell script, I have a need to put up a 'pause' - wait for the user to
click something, before proceeding. I can do:

$ xmessage "Click this window to continue..."

which works, but has two problems:

1) Both the window and the text are tiny. There are no options in xmessage
to change this. I would like the window to be big and easily
readable/visible on the desktop.

2) Being based on old Athena widgets, it is ugly.

I'm looking for an easy alternative. On Linux, there is zenity, which
would work, but, alas, zenity isn't available on the platform in question.
I've downloaded the zenity source and tried to compile it, but the
./configure step failed with an error message about something called
'pkg_configure'. I've never heard of pkg_configure before. In any case,
it didn't look like an easy compile, so I abandoned it. If there is an
easy way to get zenity to compile (w/o pkg_configure), please advise.

Note that I have the C compiler and can compile (simple) X programs. So,
if there are any other alternatives to xmessage, please let me know as
well.

Also, see next thread - about 'xquit'.

--
A racist, a Nazi, and a Klansman walk into a bar...

Bartender says, "What will it be, Mr. Trump?"

Julian Bradfield

unread,
Oct 21, 2017, 10:10:01 AM10/21/17
to
On 2017-10-21, Kenny McCormack <gaz...@shell.xmission.com> wrote:
> $ xmessage "Click this window to continue..."
>
> which works, but has two problems:
>
> 1) Both the window and the text are tiny. There are no options in xmessage
> to change this. I would like the window to be big and easily
> readable/visible on the desktop.

xmessage -xrm 'xmessages*font: lucidasanstypewriter-24' foo

works for me.

> 2) Being based on old Athena widgets, it is ugly.

can't fix that :)

If you want it to look pretty, best thing is to find a toolkit that
matches your notion of pretty, and write it in that.

Lew Pitcher

unread,
Oct 21, 2017, 10:14:05 AM10/21/17
to
Kenny McCormack wrote:

> In a shell script, I have a need to put up a 'pause' - wait for the user
> to
> click something, before proceeding. I can do:
>
> $ xmessage "Click this window to continue..."
>
> which works, but has two problems:
>
> 1) Both the window and the text are tiny. There are no options in
> xmessage
> to change this. I would like the window to be big and easily
> readable/visible on the desktop.
>
> 2) Being based on old Athena widgets, it is ugly.

I cant solve the "it is ugly" for you, but the window/font size issue is
fixable.

You simply use the -fn option to adjust the fontname so that it uses a
bigger font.

Example:
xmessage -fn 5x7 "This is small print..."
vs
xmessage -fn 10x20 "This is big print..."
vs
xmessage -fn '-*-*-*-*-*-*-34-*-*-*-*-*-*-*' "This is huge, fancy print"


For more info on font names, read "FONT NAMES" section of the X(7) manpage
("man 7 X"). To see (and select) font name, you can run xfontsel(1).



[snip]

HTH
--
Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

Kenny McCormack

unread,
Oct 21, 2017, 10:59:55 AM10/21/17
to
In article <slrnouml7...@home.stevens-bradfield.com>,
Julian Bradfield <j...@inf.ed.ac.uk> wrote:
>On 2017-10-21, Kenny McCormack <gaz...@shell.xmission.com> wrote:
>> $ xmessage "Click this window to continue..."
>>
>> which works, but has two problems:
>>
>> 1) Both the window and the text are tiny. There are no options in xmessage
>> to change this. I would like the window to be big and easily
>> readable/visible on the desktop.
>
>xmessage -xrm 'xmessages*font: lucidasanstypewriter-24' foo
>
>works for me.

Didn't work for me. I.e., no change in the window appearance.

However, this, suggested by the next poster, did work:

$ xmessage -fn '-*-*-*-*-*-*-34-*-*-*-*-*-*-*' "This is huge, fancy print"

This is nice, but it'd be even better if it was bigger still. What would
be the magic incantation for that?

>> 2) Being based on old Athena widgets, it is ugly.
>
>can't fix that :)
>
>If you want it to look pretty, best thing is to find a toolkit that
>matches your notion of pretty, and write it in that.

That's why I turn to the wisdom of the ancients. To suggest alternatives.

As I mentioned in the OP, zenity comes close to what I want - it has a
nice, soft, modern look to it - but it is not available on the platform on
which I need it (and, as mentioned in the OP, I was not able to
compile/build it from source).

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/ThePublicGood

Julian Bradfield

unread,
Oct 21, 2017, 11:20:01 AM10/21/17
to
On 2017-10-21, Lew Pitcher <lew.p...@digitalfreehold.ca> wrote:
> xmessage -fn 5x7 "This is small print..."

How embarrassing, I'd forgotten that -fn was a standard toolkit
argument!

As well as xfontsel, you can use xlsfonts to list all fonts on the
system.

Julian Bradfield

unread,
Oct 21, 2017, 11:25:00 AM10/21/17
to
On 2017-10-21, Kenny McCormack <gaz...@shell.xmission.com> wrote:
> I'm looking for an easy alternative. On Linux, there is zenity, which
> would work, but, alas, zenity isn't available on the platform in question.
> I've downloaded the zenity source and tried to compile it, but the
> ./configure step failed with an error message about something called
> 'pkg_configure'. I've never heard of pkg_configure before. In any case,
> it didn't look like an easy compile, so I abandoned it. If there is an
> easy way to get zenity to compile (w/o pkg_configure), please advise.

All modern software puts you in dependency hell if you try to compile
from source.

What is the platform? gtk+2 works reasonably on most platforms with a
modest number of dependencies.

Eli the Bearded

unread,
Oct 22, 2017, 12:35:49 AM10/22/17
to
In comp.windows.x, Kenny McCormack <gaz...@shell.xmission.com> wrote:
> In a shell script, I have a need to put up a 'pause' - wait for the user to
> click something, before proceeding. I can do:
>
> $ xmessage "Click this window to continue..."

A) xterm -e whiptail --msgbox "X11? Okay" 10 40 \
--ok-button "hit enter"

B) Use Tcl to build your own fancier one.

C) Create an image with the message, use an image viewer to display
it. I like feh, but that might be a trick to compile off Linux.
gifsicle's `gifview` is easy to build.

Elijah
------
option C doesn't allow for much more than pause

Kenny McCormack

unread,
Oct 22, 2017, 2:21:37 AM10/22/17
to
In article <eli$17102...@qz.little-neck.ny.us>,
Eli the Bearded <*@eli.users.panix.com> wrote:
>In comp.windows.x, Kenny McCormack <gaz...@shell.xmission.com> wrote:
>> In a shell script, I have a need to put up a 'pause' - wait for the user to
>> click something, before proceeding. I can do:
>>
>> $ xmessage "Click this window to continue..."
>
>A) xterm -e whiptail --msgbox "X11? Okay" 10 40 \
> --ok-button "hit enter"

OK, I get it, but I'll pass on this one...

>B) Use Tcl to build your own fancier one.

This is a good idea. I've actually done Tk stuff like this already, so I
know the drill. I knew there had to be a simple one out there.

>C) Create an image with the message, use an image viewer to display
> it. I like feh, but that might be a trick to compile off Linux.
> gifsicle's `gifview` is easy to build.

Yes, I've used 'feh' as well. Another good suggestion.
Although, as noted, one is likely to run into the same problem of it not
being available or easy to compile on the non-Linux platform.

Anyway, as indicated in the other thread, I've solved this by adapting my
'xquit' program from long ago.

--
Shikata ga nai...
0 new messages