Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a standard solution to display messages from within bash scripts eiter on the commandline if the shell is a login shell or in a new window in the present window manager's GUI? Specifically I am running kde which has the tool kdialog to display messages. However I would prefer a solution which is independent of KDE but uses KDE style if it is running. Also it should allow to ask for user input etc.

share|improve this question
up vote 1 down vote accepted

For the commandline the standard solution is dialog (1) which allows you to create interactive ncurses based dialogs, i.e: dialog selection dialog

I think there is no definitive answer for an graphical interface from shell scripts but I consider zenity (1) as the de-facto tool for GUI interactions from the shell. As it is GTK based I am not a 100% sure about KDE themeing but it is possible as far as i know to use the KDE theme in GTK.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.