Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.