This program reads a message (which is specified as a parameter or is read from a file or standard input) and displays this message in a window. Beneath the message a row of numbers, as specified by the command line argument -buttons, is displayed. The program exits when a buttons is clicked, which button is pressed can be derived from the return value of KMessage, optionally the name of the button is printed to standard output.

KMessage is an xmessage clone for KDE. It is useful within shell scripts or cron jobs that need to inform the user in a KDE desktop environment. (I use it to display a fortune message every hour.)

Author: Jeroen Wijnhout
Download: kmessage-0.2.tar.bz2

KMessage handles various command line arguments (including all the KDE and Qt command line arguments). The general syntax is:

kmessage [ -center ] [ -nearmouse ] [ -print ] [-msgicon icon ] [ -buttons buttons ] [ -default default ][ -file file ] [ -timeout timeout ] message

To get all the available Qt and KDE command line options (such as setting the caption of the window) just type:

kmessage --help-all

Screen shots

echo 'hi!' | kmessage -file - -title "Just a message" -buttons 'great!','so what?'

kmessage -file COPYING -title "GPL" -buttons G,N,U,General,Public,License