You are not logged in.
I'm trying to use notify-send along with a simple volume update script to show me the current volume as I change it (with the script). Currently I use notify-send, but running the script twice creates two windows (and 10 times creates 10 windows) consecutively in a column. I'd like to be able to replace a current window, but this bug report seems to indicate I can't with notify-send.
https://bugs.launchpad.net/ubuntu/+sour … bug/257135
Any alternatives? Or would I need to use the python-notify bindings etc. and code my own notification...
Last edited by ngoonee (2011-03-07 00:28:15)
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
I'd like that feature in notify-send too, since I use it with irssi, and every time I join Bitlbee, there's 300 notifications on both sides like "John is online." "Marry is online." so I can't see anything until they go away.
Looking forward for a solution.
Offline
From http://ubuntuforums.org/showpost.php?p= … ostcount=3.
dbus-send --type=method_call --dest='org.freedesktop.Notifications' \
/org/freedesktop/Notifications org.freedesktop.Notifications.Notify \
string:'[APPLICATION]' \
uint32:1 \ #replace old notifications
string:'[ICON]' or '' \
string:'Title' \
string:'body' \
array:string:'' \ #actions
dict:string:string:'','' \ #hints
int32:[TIMEOUT] # Optional timeout
Offline
You could check how the statnot developer accomplished this. I asked for that feature and he added it as a configuration item:
~/.config/statnot/config.py [partial]
# Put incoming notifications in a queue, so each one is shown.
# If false, the most recent notification is shown directly.
QUEUE_NOTIFICATIONS=False
Otherwise, it'd take several minutes to see the latest message to me on IRC if I'm talking to someone, or if I change the volume a bunch at one time!
Hopefully that's what you were looking for...
Scott
Offline
From http://ubuntuforums.org/showpost.php?p= … ostcount=3.
dbus-send --type=method_call --dest='org.freedesktop.Notifications' \ /org/freedesktop/Notifications org.freedesktop.Notifications.Notify \ string:'[APPLICATION]' \ uint32:1 \ #replace old notifications string:'[ICON]' or '' \ string:'Title' \ string:'body' \ array:string:'' \ #actions dict:string:string:'','' \ #hints int32:[TIMEOUT] # Optional timeout
That worked just fine . Thanks Stebalien. Solved.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Do you use this in a script to run dbus-send?
Offline
Do you use this in a script to run dbus-send?
Yep, did you try it?
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
archman-cro wrote:Do you use this in a script to run dbus-send?
Yep, did you try it?
I don't have an idea of how to try it. I use notify-send with some irssi script, so where should I put this? Does it need to be ran every time notify-send is supposed to run?
Offline
ngoonee wrote:archman-cro wrote:Do you use this in a script to run dbus-send?
Yep, did you try it?
I don't have an idea of how to try it. I use notify-send with some irssi script, so where should I put this? Does it need to be ran every time notify-send is supposed to run?
What HAVE you tried? In case I'm being too subtle - please go and do some basic homework first. You're asking me about simple things like "what is a script?", basically.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
I have tried running:
dbus-send --type=method_call --dest='org.freedesktop.Notifications' /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string:'[APPLICATION]' uint32:1 string:'[ICON]' string:'Title' string:'body' array:string:'' dict:string:string:'','' int32:[TIMEOUT]
to see if this is a working command, since I've realized that Stebalien changed some strings from the linked source. (although I don't see an '[APPLICATION]' string in the libnotify source.) The command like this doesn't work for me, since I still get messages on both sides. Although the dest and object path seem correct, since I've found org.freedesktop.Notifications... in the source.
Last edited by archman-cro (2011-03-07 14:06:59)
Offline
Stebalien wrote:From http://ubuntuforums.org/showpost.php?p= … ostcount=3.
dbus-send --type=method_call --dest='org.freedesktop.Notifications' \ /org/freedesktop/Notifications org.freedesktop.Notifications.Notify \ string:'[APPLICATION]' \ uint32:1 \ #replace old notifications string:'[ICON]' or '' \ string:'Title' \ string:'body' \ array:string:'' \ #actions dict:string:string:'','' \ #hints int32:[TIMEOUT] # Optional timeout
That worked just fine . Thanks Stebalien. Solved.
Would you mind pasting the exact command you used?
I tried this:
dbus-send --type=method_call --dest='org.freedesktop.Notifications' \
/org/freedesktop/Notifications org.freedesktop.Notifications.Notify \
string:'asdf' \
uint32:1 \
string:'' \
string:'Title' \
string:'body' \
array:string:'' \
dict:string:string:'','' \
int32:4000
but nothing happens - no notification, no errors, nothing.
Offline
@cantabile
Do you have any notification daemon running?
zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)
Offline
@cantabile
Do you have any notification daemon running?
Yeah, /usr/lib/notification-daemon-1.0/notification-daemon (owned by extra/notification-daemon 0.4.0-4).
notify-send 'foo' 'bar'
works.
Offline
@archman-cro, you didn't think to substitute [APPLICATION] and the like with other text? Especially given you had the ubuntuforums post to refer to?
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Yes, but if it's really a big problem to explain, it's ok. "I can understand it." My line
dbus-send --type=method_call --dest='org.freedesktop.Notifications' /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string:'notify-send' uint32:1 string:'JEBEMTIMATER' string:'MUTAVU' array:string:'' dict:string:string:'',''
didn't work.
Also check cantabile's question, if you got a second. Thank you.
Offline
You forgot the icon string. It must be present even if it is blank.
dbus-send --type=method_call --dest='org.freedesktop.Notifications' /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string:'notify-send' uint32:1 string:'' string:'JEBEMTIMATER' string:'MUTAVU' array:string:'' dict:string:string:'',''
Offline
@Stebalien: Doesn't work. 'notify-send hello' works.
Offline
string:'JEBEMTIMATER'
^^ lol! Sorry, I don't have anything to actually contribute, but this I just had to comment on!
Offline
string:'JEBEMTIMATER'
^^ lol! Sorry, I don't have anything to actually contribute, but this I just had to comment on!
Offline
Works fine here
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Running those commands but nothing happened here, too.
i am using notify-osd and libnotify 0.5.2
Last edited by jarryson (2011-03-09 09:14:43)
Offline
notify-osd-customizable 0.9.29-8
libnotify 0.5.2-1
I found out that the alternative to this might be xosd, a c library with which we can code our own notifications... But if someone here has this working, he could post some details about it.
Offline
Yes, but if it's really a big problem to explain, it's ok. "I can understand it." My line
dbus-send --type=method_call --dest='org.freedesktop.Notifications' /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string:'notify-send' uint32:1 string:'JEBEMTIMATER' string:'MUTAVU' array:string:'' dict:string:string:'',''
didn't work.
Also check cantabile's question, if you got a second. Thank you.
Haha, legendo!
Offline
Tried with kde, nothing happens.
notify-send works.
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
It seems that signature of DBus metho Notify has changed. If you run dbus-send with switch --print-reply on, you will see the following error:
Error org.freedesktop.DBus.Error.InvalidArgs: Type of message, '(susssasi)', does not match expected type '(susssasa{sv}i)'
The dict:string:string has been replace by a dict:string:variant. Sadly, it seems that complexe structure is not yet supported by dbus-send (http://lists.freedesktop.org/archives/d … 08385.html)
Offline