View Full Version : Making a dialog box pop-up showing arbitrary text
randysparks
June 7th, 2008, 01:45 PM
Please be gentle with me because I'm not a programmer (beyond simple shell scripts). :(
Is there any shell command that causes a GTK+ dialog box pop-up showing some text and an OK button? There doesn't have to be anything happen when OK is clicked. It's literally an alert dialog.
smartbei
June 7th, 2008, 01:50 PM
Check Zenity out: http://linux.byexamples.com/archives/265/a-complete-zenity-dialog-examples-2/
randysparks
June 7th, 2008, 02:57 PM
Check Zenity out: http://linux.byexamples.com/archives/265/a-complete-zenity-dialog-examples-2/
Just what I was looking for! Thanks.
Do you know if there's any other way of making a Zenity dialog box take input from a file, other than using the --text-info style of dialog box?
Yuzem
June 7th, 2008, 06:55 PM
Some examples:
cat 'somefile' | zenity --text-info
cat 'somefile' | zenity --list --column ""
zenity --info --text "$(cat 'somefile')"
randysparks
June 8th, 2008, 09:23 AM
Some examples:
cat 'somefile' | zenity --text-info
cat 'somefile' | zenity --list --column ""
zenity --info --text "$(cat 'somefile')"
Thanks but it should be pointed out that some of the dialog box types don't take piped input in this way. Perhaps the most useful, --info, won't.
But the third example is just what I'm looking for.
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.