GXMESSAGE(1)
π
GXMESSAGE(1) β or like, the gxmessage manual, bestie β¨
Okay so this is the manual page for gxmessage, which lives in section 1 of the manual, and honestly? It's giving useful. Let me walk you through it π«Ά
π NAME
gxmessage β a GTK-based xmessage clone. Yes, that's it, that's the whole vibe check π
β¨ SYNOPSIS
gxmessage [OPTIONS] message ...
gxmessage [OPTIONS] -file FILENAME
πΈ DESCRIPTION
gxmessage pops open a window to show a message, and that message comes from the command line, from a file, or from stdin π¦ The window has a lil row of buttons, and each one makes the program exit with a different return code. Cute, right?
Press CTRL+F and a search bar appears to help you find words in the displayed message. Literally so handy. CTRL+G and CTRL+SHIFT+G find the Next and Previous matches respectively π
Also, the GNU Info entry for gxmessage has detailed information and examples. Go read it, iykyk π
β OPTIONS
gxmessage accepts any option xmessage would, although some β like -bw and -xrm β are silently ignored. Not me getting ghosted by my own flags π
-bg COLORβ Sets the background color of the message to COLOR. Examples:red,"#c90","#446a7e".-buttons BUTTON_LISTβ Defines the buttons to be created. BUTTON_LIST is a comma-separated list of LABEL:VALUE pairs, one for each button. The LABEL is the text that appears on the button. The VALUE (0..255) is the code the program will exit with if that button is pressed. Commas and colons can be escaped using backslashes (\).
As well as ordinary text, the LABEL can include an underscore (_) to specify a keyboard accelerator. If VALUEs are omitted, they default to 101, 102, 103, etc., in order. If no -buttons option is given, BUTTON_LIST defaults to "okay:0".
gxmessage -buttons "Foo:42,Bar:63" "Example"
echo $?
gxmessage -buttons "_Foo,_Bar" "Example"
echo $?
gxmessage "Example"
echo $?
gxmessage -buttons "Hello\, world" "Example"
-default LABELβ Opens thegxmessagewindow with input focused on the specified button. LABEL is one of the LABELs in BUTTON_LIST (see-buttons, above) π-display DISPLAYβ Opens the window on the X11 display DISPLAY (for example,:1). This forces GTK to use its X11 backend, so under Wayland it works only if an X server such as XWayland is available. Important caveat, no cap π«Ά-fg COLORβ Sets the message text color to COLOR.-file FILENAMEβ Causes the named file to be used as the message source. If a dash (-) is used in place of FILENAME, the message will be read from stdin.-fn|-font FONTβ Specifies the message font, using GTK's font specification system. For example,-font "serif italic 14". (GTK's font system is not compatible withxmessage. See the Compatibility section, below, for a workaround.)-geometry GEOMETRYβ Sets the window's size. Example:
-geometry 400x200
Either dimension may be given alone (-geometry 400 or -geometry x200); the other is then chosen to fit the message. Slay, flexible π
-helpβ Displays basic usage information then exits.-iconicβ Opens thegxmessagewindow in its iconized (minimized) state. Tiny mode activated π-printβ Writes the LABEL of the selected button to stdout.-timeout SECONDSβ Automatically closes thegxmessagewindow with an exit code of 0 if no button is pressed within SECONDS seconds. (The-entryand-entrytextoptions cause-timeoutto be ignored.) So like, they don't play nice together, noted π-title TITLEβ Sets thegxmessagewindow's title to TITLE.
π¦ GXMESSAGE SPECIFIC OPTIONS
These ones are specific to gxmessage and are not compatible with xmessage. Main character energy only β¨
-borderlessβ Opens thegxmessagewindow without the usual window frame.-encoding CHARSETβ Specifies the encoding of the message text. By default, the message text is assumed to match the encoding of the current locale.-entryβ Adds a text entry box to thegxmessagewindow. When the window closes, any text in the entry box will be copied to stdout. This option can't be used at the same time as the-printoption. Pick a lane bestie π-entrytext TEXTβ Same as-entry, but sets the default entry box contents to TEXT.-noescapeβ Prevents the window closing if the ESC key is pressed.-versionβ Displays the program's version number and Copyright details, then exits.-wrapβ Causes lines to wrap rather than exceed the width of the window.
π§ HISTORIC OPTIONS
These options were supported under GTK2 and GTK3, but no longer have any effect. This is due to changes in modern desktop environments. Rip bozo ππͺ¦
-center,-nearmouse,-nofocus,-ontop,-sticky,-name NAME
π EXIT STATUS
If a button is pressed, the program returns the value assigned to that button. The default "okay" button returns 0. π
If a timeout event occurs, the program returns 0.
If an error occurs, or if the window is closed without a button-press or timeout event, the program exits with code 1. Pressing the ESC key also causes the program to exit with code 1. Not the ESC key catching strays π
π COMPATIBILITY WITH XMESSAGE
Fall back to xmessage if gxmessage isn't available:
#!/bin/sh
if command -v gxmessage >/dev/null 2>&1; then
XMESSAGE=gxmessage
else
XMESSAGE=xmessage
fi
"$XMESSAGE" "hello, world"
If you specify fonts, check which program you're using:
font="monospace 14"
[ "$XMESSAGE" = xmessage ] && font="fixed"
$XMESSAGE ${font:+-fn "$font"} "hello, world"
Don't use double-dashed command line options:
$XMESSAGE "hello, world" -buttons good
$XMESSAGE "hello, world" --buttons bad
Don't use the gxmessage-specific options:
-entry, -entrytext, -borderless, -wrap,
-encoding, -nofocus, -noescape, -ontop,
-sticky, -version, -h, -?
π BUGS
Command line programs commonly treat the character sequence -- as an end-of-options indicator. Neither xmessage nor gxmessage support this. If there's any chance your message text could be mistaken for a command line option, a work-around is to pad that text with a space character:
gxmessage Please do not '-center ' me
If you discover other bugs in the most recent version of gxmessage, please get in touch. Fr fr, they wanna know π«Ά
π₯ SEE ALSO
xmessage(1), zenity(1), dialog(1)
The GNU Info entry for gxmessage contains detailed information and examples. (Said it before, saying it again, it's that good β¨)
π AUTHORS
Timothy Musson <trmusson@gmail.com> β icon, legend, the moment π
π COPYRIGHT NOTICE
Copyright Β© 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012, 2015, 2026 Timothy Richard Musson
Copying and distribution of this file, with or without modification, are permitted provided the copyright notice and this notice are preserved.
Okay that's the whole page bestie, go forth and gxmessage responsibly π
October 21st, 2026 β source/version vibes, straight from the GXMESSAGE(1) footer, mwah π
π¦ where this page comes from
- arch rolling: gxmessage 4.1.1-1 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms