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.
Standard solution for displaying messages either on shell or with window managers gui
shell;kde;window manager;gui
For the commandline the standard solution is dialog (1) which allows you to create interactive ncurses based dialogs, i.e: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.