How to pop-up boxes and notifications from scripts? (SOLVED)

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
UncleScrooge
Posts: 104
Joined: Tue 07 Apr 2020, 06:07
Location: Norway

How to pop-up boxes and notifications from scripts? (SOLVED)

#1 Post by UncleScrooge »

Hello,

BionicPup64 8.0

from one of my scripts I need to popup messages for the user to interact.
Mainly to stop one or more undergoing child processes running asynchronous.
So each widget is supposed to have just one button (i'd be fine with "OK" allthough I'd rather choose myself the button caption)

I thought tu use Zenity but it doesn't seem to do what eevn the zenity -help says.

Also: how do I show popup notifications like those from the network manager or the pup-save? I mean: my own notifications,

as usual thnx in advance for the help.
Last edited by UncleScrooge on Mon 27 Apr 2020, 15:34, edited 1 time in total.

User avatar
6502coder
Posts: 677
Joined: Mon 23 Mar 2009, 18:07
Location: Western United States

#2 Post by 6502coder »

Try Xdialog. There are lots of good tutorials if you just Google it. Here's just one example:

https://linuxgazette.net/101/sunil.html

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#3 Post by Mike Walsh »

@ UncleScrooge:-

There's several methods for doing this in Puppy, and much of it comes down to personal preference.

You yourself mentioned Zenity (now YAD). 6502coder has given you Xdialog. We also have gtkdialog - built-in to Puppy; there's pupmessage (mainly older Pups, and superseded in newer Pups by the item it was always dependent on, gxmessage).

So; to re-cap:-

- Zenity/YAD
- Xdialog
- gtk-dialog
- pupmessage
- gxmessage


Gxmessage, the way it displays, requires a click on the 'OK' button to clear it, before whatever process/script it's used in can continue. Which could answer one of your requirements, at least....

Gtk-dialog has an entire thread devoted to it, as does YAD:-

Gtk-dialog - http://www.murga-linux.com/puppy/viewtopic.php?t=38608

YAD - http://www.murga-linux.com/puppy/viewtopic.php?t=97458

Any good?


Mike. :wink:

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#4 Post by williams2 »

Also, if it hasn't been mentioned already,

Code: Select all

notify-send -t 5000 "starting Firefox ..."
notify-send "click me"

phat7
Posts: 179
Joined: Fri 05 Jun 2015, 08:54

Re: How to do pop-up boxes and notifications from scripts?

#5 Post by phat7 »

UncleScrooge wrote:Also: how do I show popup notifications like those from the network manager or the pup-save? I mean: my own notifications,
yaf-splash -bg yellow -text "My own notification"

User avatar
UncleScrooge
Posts: 104
Joined: Tue 07 Apr 2020, 06:07
Location: Norway

#6 Post by UncleScrooge »

Thanx to y'all folks

U ROCK!!

Post Reply