Notifications Using Notify-OSD and Dbus

I am writing a quick script to show a Notify-OSD bubble whenever I switch songs in MPD. The easiest way I can think of doing this is to make an MPD controller in Python that uses pynotify to show the bubble. This works, but the problem comes whenever I try to change songs quickly. Notify-osd shows the first bubble for several seconds, then the next for severals seconds, and so on. This is obviously not the desired functionality: I want the notifications to update immediately on song change.
Luckily, pynotify has an "update" ability which does exactly what I want. Unfortunately, it requires a Python object handle to the notification. This handle dies after the python program exits, so this method won't work unless I have my python controller sit in the background and watch for keypresses, which I don't want to do.
I know notify-osd can use dbus, and I have been able to send a message to it through Dbus, but I can't find sufficient documentation to be able to use notify-osd's "update" feature. Without it, I get the message pileup described above.
Does anyone know of notify-osd documentation specifically regarding Dbus, or have a better way to do this in general?

Never mind, I have been able to hack together a solution. For those interested, I use python's Pyro module to start a server that serves up a pynotify object. Meanwhile, I have another script that runs on a keypress. This script connects to the Pyro server, accesses the object, and updates the info. Not pretty, but it is fast and does what I want it to.

Similar Messages

  • How to use notify-osd with qt apps in openbox

    Hi, i'm using openbox and Notify-osd. With qhte GTK apps it works fine and i have no problems. But, all the QT apps don't work with notify-osd. Is there a way to get it work?
    I've tried editing the  this /usr/share/dbus-1/services/org.freedesktop.Notifications.service file, and it says:
    [D-BUS Service]
    Name=org.freedesktop.Notifications
    Exec=/usr/lib/notify-osd/notify-osd
    But, it still not working with the QT or the KDE apps. like amarok or choqok.

    na12 wrote:How can I change theme of qt applications in openbox? Qtconfig works only for gnome but not for openbox.It is ugly to have dark gtk apps and light qt apps.
    This is what worked for me:
    Put style=GTK+ at the end of your.config/Trolltech.conf. Got idea from here.

  • Sending a notification using MDB, javamail and a scheduler

    Hi,
    I have this following scenario.
    I need to send an email notification to user B from user A.
    So, user A fills the required details and adds the notification object to jms/queue
    In MessageDriveBean onMessage(), i am getting the notification object from the queue
    and i am able to send an email using JavaMail.
    Everything is working fine.
    Now , if under any conditions, sending notification fails, I need to implement
    a scheduler which should try to send the notification within the specified time interval
    and if not again adds the notification object to queue.
    Can you please help me to implement a scheduler?
    Thanks in advance!!!

    Have a look at this simple schedular below, test by changing the method onMessage() to a main method
    and simulate.
    Hope this help
    Ivo Sumelong
    * @author isumelong
    public class MessageFromQueueMDBHandler {
         * @param args the command line arguments
        public  void onMessage() {
             MessageFromQueueMDBHandler m=new MessageFromQueueMDBHandler();
             m.hanldeMessageFromQuue();
      public synchronized  void  hanldeMessageFromQuue()
    // Thread.sleep() is not good since its a static method this
    // why wait will be best since it controls only the thread
    // that received the messgae from the queue
    //schedular information read from database
    // numberOfTrials,waitingTimeBeforeResending;
    // advantage: schedular behaviour could be changed at run time
    int numberOfTrials=4;// from database
          try {
                for(int i=0;i<System.currentTimeMillis();i++)
                    if(sendMail())
                    break;
                    if(i==numberOfTrials)
                       // send an message to queue
                       sendMessageToQueue();
                    notifyAll();
                         break;
                  long waitingTimeBeforeResending=1000;// from database
                this.wait(waitingTimeBeforeResending);
            } catch (InterruptedException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      private boolean sendMail()
      // java mail API accesses
          return true;
       private boolean sendMessageToQueue()
      // java JMS API accesses
          return true;
    }

  • Notify-osd replace notification

    As many of you know it seems actually not possible to replace the current notification of notify-osd's "notify-send".
    An user posted a solution on askubuntu but it is for ubuntu only because you only can download the patched libnotify-bin from his PPA.
    Does anyone know how to solve the problem with notification replacement on Archlinux?

    >edit  /usr/share/gnome-session/sessions/gnome.session
    gnome.session doens't have a RequiredProviders or DefaultProvider-notifications line like gnome-fallback.session, there are only entries for RequiredComponents, IsRunnableHelper and FallbackSession at the bottom of the file, none of which mention notifications.
    >install notify-osd(you didn't HAVE to remove notification-daemon btw, I had problems with starting gnome with it removed)
    I did install notify-osd-customizable from AUR and while installing it pacman said this would remove notification-daemon, which it did.
    Oddly enough I still get the normal notifications after rebooting, even with notification-daemon uninstalled.
    I think that I'll make my own topic if I haven't found a solution by tomorrow, as the original question in this topic is solved.

  • Notify-osd +Gnome 2.32.1 with Compiz doesn't work.

    I just installed notify-osd and I cannot get it to work.
    I installed the package and rebooted like the Wiki suggested but nothing pops up when I do the following:
    Mount a drive like a USB flash drive
    Play a song in Exaile
    Get an IM in pidgin.  I have the pidgin-libnotify-notify-osd installed as well as the plugins for notification in pidgin.
    I have manually started notify-osd with /user/lib/notify-osd/notify-osd and I can see it running but still nothing.
    I'm kind of stuck.  Googlefu has not helped.
    However, when I use notify-send "Hello World" that does work.  I looked into dbus-1 from a fedora tutorial and it is properly executing notify-osd.
    What am I missing guys?
    Update!!!!  I got exaile and pidgin to work by installing python-notify and turning on the right plugins.  Still can't figure out how to get it to notify me of mounted drives.
    Last edited by TFB (2011-01-15 00:34:13)

    for other notification to work like mounts, network connections, volume keys, bat status you need gnome-power-manager-notify-osd and gnome-settings-daemon-notify-osd
    regards

  • [SOLVED] Compton drawing ugly Notify-OSD shadow

    I have Openbox installed in my machine. For compositing I installed compton-git from AUR and everything is working fine. The problem is that I cannot prevent compton from drawing a shadow to the notification window (notify-osd). Here's a screenshot:
    http://i.imgur.com/3oHHJis.png
    and this is my ~/.compton.conf file:
    # Shadow
    shadow = true;
    no-dnd-shadow = true;
    no-dock-shadow = false;
    clear-shadow = true;
    shadow-radius = 7;
    shadow-offset-x = -7;
    shadow-offset-y = -7;
    # shadow-opacity = 0.7;
    # shadow-red = 0.0;
    # shadow-green = 0.0;
    # shadow-blue = 0.0;
    shadow-exclude = [ "n:e:Notification", "name = 'Notification'", "class_g = 'Conky'" ];
    # shadow-exclude = "n:e:Notification";
    shadow-ignore-shaped = false;
    # Opacity
    menu-opacity = 0.9;
    inactive-opacity = 0.9;
    frame-opacity = 1.0;
    inactive-opacity-override = false;
    alpha-step = 0.06;
    # inactive-dim = 0.2;
    # inactive-dim-fixed = true;
    # blur-background = true;
    # blur-background-frame = true;
    blur-background-fixed = false;
    # Fading
    fading = true;
    # fade-delta = 30;
    fade-in-step = 0.1;
    fade-out-step = 0.1;
    # no-fading-openclose = true;
    # Other
    mark-wmwin-focused = true;
    mark-ovredir-focused = true;
    use-ewmh-active-win = false;
    detect-rounded-corners = true;
    detect-client-opacity = true;
    refresh-rate = 0;
    vsync = "none";
    dbe = false;
    paint-on-overlay = false;
    sw-opti = false;
    unredir-if-possible = false;
    focus-exclude = [ ];
    detect-transient = true;
    detect-client-leader = true;
    invert-color-include = [ ];
    # Window type settings
    wintypes:
    tooltip = { fade = true; shadow = false; opacity = 0.75; focus = true; };
    How can I fix this? I tried with the shadow-exclude value, but it didn't work.
    Regards.
    Edit: I was playing around with the configuration file and found that the option 'clear-shadow = false' makes the trick, but now the shadow rendered behind notify-osd is too dark, check here. Is there any way to add an exception rule to the notification window?
    Edit 2: The problem gets solved by adding the following exclusion rule to the 'shadow-exclude' variable:
    "class_g ?= 'Notify-osd'"
    Including quotes.
    Last edited by AurosGamma (2013-02-23 17:04:31)

    valr wrote:
    Stupid question: are you sure that the window name of the notification is "Notification" ?
    Have you checked with xwininfo ?
    If all seems correct, you could ask on IRC in the chan #compton
    That's the problem, I'm not sure about that. And I'm not sure how I should use xwininfo to get the values for notify-osd, and how should I put those values in the config file. I searched for documentation and found nothing. I'll try to ask in the IRC channel and report back.
    Best regards.

  • [Solved] Notify-osd-customizable activate "bubble-close-on-click"

    Hello again. I installed notify-osd-customizable in Xfce and it works fine. But, I can't find a way to close the notification bubble when clicking it.
    I don't like this, so I'm using xfce-notifyd right now, which have that option available for default.
    I know in Ubuntu you can do this, because I read about it and saw images about it. But, the Arch linux build of Notify-osd-customizable doesn't have this option available.
    Here are two screenshots of the notify-osd-customizable graphical configuration:
    Ubuntu version:
    http://i.stack.imgur.com/4WJZv.png
    Arch Linux version (not the original, but looks exactly like this):
    http://i.imgur.com/uZZK73S.png?1
    As you can see, Ubuntu's version does have some more options available, probably because they have a newer version of the same program. Between those options it is "Close bubble on click"
    I tried configuring this program, manually, via text file, but it didn't work. What I did was including this line at the end of the configuration file:
    bubble-close-on-click = 1
    and also tried with:
    bubble-close-on-click = 0
    But had no luck.
    I also tried enabling composition, but it didn't work either.
    Do you know what am I doing wrong? or if there's a solution to this?
    I have read the commentaries in the AUR page of notify-osd-customizable and it seems someone could make it work. https://aur.archlinux.org/packages/noti … tomizable/
    Regards
    Solution:
    I was editing the wrong configuration file. So, to make the bubbles close on click you have to edit /home/joaco/notify-osd and add this line at the end:
    bubble-close-on-click = 1
    That's all, but it only works if composite is activated.
    Anyway, I didn't stay with notify-osd, because it doesn't stack notifications.
    Last edited by joacoej (2015-05-17 04:37:53)

    jasonwryan wrote:
    joacoej wrote:
    jasonwryan wrote:Stop posting oversized images: read the Forum Etiquette and only post thumbnails https://wiki.archlinux.org/index.php/Fo … s_and_code
    Ok, which is the wright proportion then?
    It's explicitly stated in the link I posted...
    That proportion (250x250) is too little, noone will read anything smaller than 640x356, because it gets distorted. That's the smalller I can resize them, without them being unreadable and they don't occupy a lot of space, so I don't see the problem.
    jasonwryan wrote:
    PD: I think the rezising should be done automatically like in any webpage. You can't expect everyone to download an image from the internet just to resize it an upload it again.
    Like automatically in what web page? Use `convert...`
    Like disqus, facebook, etc, you can upload an image with a big resolution and they just convert it
    Last edited by joacoej (2015-05-14 01:49:35)

  • Ncurse based apps + Notify-OSD?

    Hi. I am wanting to configure either calcurse or ncmpcpp to send notifications to my desktop (through Notify-OSD). I am very unclear on how to do this, all that comes to mind is to pipe the internal notification commands into notify-send somehow?
    In the calcurse config file there is this:
    # Command used to notify_user of an upcoming appointment :
    notification.command=printf '\a'
    and for Ncmpcpp there is this:
    #execute_on_song_change = "ncmpcpp --now-playing '{%a - %t}|{%f}' | notify-send"
    I know the ncmpcpp setting is obviously wrong since notify-send needs to have a "body/summary" entered as well.
    I believe that if one of these is solved I can figure out the other.

    JoshuaK wrote:
    I would like to know if anyone here has used Notify-OSD (notify-osd-bzr in AUR) in OpenBox. I love both, and would love it if they played nicely with each other. Any luck people? Just some apps I use in case they dont work either:
    Firefox (I've read Ubuntu's teaming with Mozilla for this)
    Pidgin, Gajim or Empathy (pidgin-libnotify-notify-osd, and Empathy should work, but Gajim?)
    Skype (Doesn't even play nice with N-OSD in Ubuntu...)
    Rhythmbox / Goggle's Music Manager / Banshee (banshee has package in AUR, Rhythmbox supposedly works, would like confirmation on these three)
    Sometimes I use Xchat (haven't tested, any data on this?)
    Thanks! I sound like a newb here, sorry for that (you'll see and hear that I have used Arch off and on since September
    Gajim has been patched to work with -> http://aur.archlinux.org/packages.php?ID=24596

  • OpenBox + Notify-OSD = What...

    I would like to know if anyone here has used Notify-OSD (notify-osd-bzr in AUR) in OpenBox. I love both, and would love it if they played nicely with each other. Any luck people? Just some apps I use in case they dont work either:
    Firefox (I've read Ubuntu's teaming with Mozilla for this)
    Pidgin, Gajim or Empathy (pidgin-libnotify-notify-osd, and Empathy should work, but Gajim?)
    Skype (Doesn't even play nice with N-OSD in Ubuntu...)
    Rhythmbox / Goggle's Music Manager / Banshee (banshee has package in AUR, Rhythmbox supposedly works, would like confirmation on these three)
    Sometimes I use Xchat (haven't tested, any data on this?)
    Thanks! I sound like a newb here, sorry for that (you'll see and hear that I have used Arch off and on since September

    JoshuaK wrote:
    I would like to know if anyone here has used Notify-OSD (notify-osd-bzr in AUR) in OpenBox. I love both, and would love it if they played nicely with each other. Any luck people? Just some apps I use in case they dont work either:
    Firefox (I've read Ubuntu's teaming with Mozilla for this)
    Pidgin, Gajim or Empathy (pidgin-libnotify-notify-osd, and Empathy should work, but Gajim?)
    Skype (Doesn't even play nice with N-OSD in Ubuntu...)
    Rhythmbox / Goggle's Music Manager / Banshee (banshee has package in AUR, Rhythmbox supposedly works, would like confirmation on these three)
    Sometimes I use Xchat (haven't tested, any data on this?)
    Thanks! I sound like a newb here, sorry for that (you'll see and hear that I have used Arch off and on since September
    Gajim has been patched to work with -> http://aur.archlinux.org/packages.php?ID=24596

  • What are the possibilities sending notifications using TTY

    What are the possibilities sending notifications using TTY? And how to integrate TTY with Siebel

    Here are the possibilities of Content search webparts
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/configure-a-content-search-web-part-in-sharepoint-HA104119042.aspx
    http://office.microsoft.com/en-in/office365-sharepoint-online-enterprise-help/when-to-use-the-content-query-web-part-or-the-content-search-web-part-in-sharepoint-HA104206662.aspx
    Compare the strengths and limitations of the Web Parts
    It’s important that you understand the strengths and limitations of the two Web Parts because if you choose the wrong one, your site could run into performance problems. You can use both Web Parts to show content that is based on a query. In a simplified
    world, here’s how you can decide between the two:
    Use the CQWP when you have a limited amount of content, your query is simple, and you don’t expect your content to grow much in the future.
    Use the CSWP in all other scenarios when you want to show content that is based on a query.
    The table below gives a comparison of the two Web Parts:
    Web Part behavior
    Content Query Web Part
    Content Search Web Part
    Query configuration
    Easy
    You’ll need to know about certain search features such as
    managed properties.
    Query across large amounts of content
    Limited
    Yes
    Handle complex queries
    Limited
    Yes
    Scale to handle future content growth
    Limited
    Yes
    Display content from other site collections
    No
    Yes (see
    section below)
    Design of query results can be customized
    Yes, by using XSLT.
    Yes, by using HTML.
    Maintenance cost in a complex site architecture
    High
    Small (see
    section below)
    Narrow down the query results that are displayed in the Web Part
    No
    Yes, in combination with the
    Refinement Web Part.
    It was not there previously but then it was added to Office 365
    http://blogs.office.com/2013/10/29/search-innovations-for-site-and-portal-design-in-sharepoint-online/
    If this helped you resolve your issue, please mark it Answered

  • Notify-osd-customizable and awesome conflict

    I was trying to install the notify-osd-customizable package from aur, but I'm running in a conflict because both packages "provides" notification-daemon.
    I don't know how to deal when two packages provides the same package. I've read the pacman man and wiki, but I haven't being able to solve the problem =/
    Any help/feedback is welcome :)

    anonymous_user wrote:
    If you don't want to wait for ABS to be updated, you can just download the files and PKGBUILD:
    https://projects.archlinux.org/svntogit … es/awesome
    Thanks to point it out. If you use yaourt,
    yaourt -G awesome
    do the work (pretty handy, even if you don't use it on an everyday basis).
    ZekeSulastin wrote:
    MOPSTER wrote:Since awesome provides a notification module which is optional, it doesn't need the provides line.
    Actually, it kinda does - consider why both awesome and notify-osd-* provide the metapackage notification-daemon; if it didn't provide that, you'd have to edit the PKGBUILD to provide it if you just wanted to use awesome's built-in module.
    It's kinda damned-if-you-do, damned-if-you-don't, unless the maintainer breaks the upstream package and provides naughty as a separate package - maybe something to bug report?
    {edit}I feature-requested it - https://bugs.archlinux.org/task/29874{/edit}
    Thanks, I'm following the 'bug' now, and I -obviously- voted

  • How do I change the way Mail notifies me of new mail? My notifier appears and just stays on the screen until I acknowledge it.

    A while back I changed a setting in Mail pertaining to notification of a new email arrival. The banner stays locked on the screen until I take an action. It used to display and then disappear soon afterward. I can't remember how I adjusted the setting, or even where the settings for notifier are. Can someone help?

    Go back to preference
    >System Preferences>Notifications>Mail> change from Alerts to Banners (or None if you do not prefer to see them.)

  • I don't understand the thing you call live bookmarks never used it, and most forums I have used notify VIA E-mail not giving out my E-mail address information when a reply has been made to the thread in question.

    So how do I get notified of updates in this forum? As I said: I don't understand the thing you call LIVE BOOKMARKS I have never used them, and most forums I have used notify VIA E-mail not giving out my E-mail address, or other private information when a reply has been made to the thread in question, so how do I get notified of updates in this forum? I have seen no normal options for setting my viewing preferences used for this forum. Thank You.

    Thanks for your reply via email/msg. He wrote:
    If you are interested in the actual design data for the Xeon processor, go to the Intel site and the actual CPU part numbers are:
    Xeon 4 core - E5.1620v2
    Xeon 6 core - E5.1650v2
    Xeon 8 core - E5.1680v2
    Xeon 12 core - E5.2697v2
    I read that the CPU is easy to swap out but am sure something goes wrong at a certain point - even if solderedon they make material to absorb the solder, making your work area VERY clean.
    My Question now is this, get an 8 core, then replace with 2 3.7 QUAD CHIPS, what would happen?
    I also noticed that the 8 core Mac Pro is 3.0 when in fact they do have a 3.4 8 core chip, so 2 =16? Or if correct, wouldn't you be able to replace a QUAD CHIP WITH THAT?  I;M SURE THEY ARE UO TO SOMETHING AS 1) WE HAVE SEEN NO AUDIO FPU OR PERHAPS I SHOULD CHECK OUT PC MAKERS WINDOWS machines for Sisoft Sandra "B-E-N-C-H-M-A-R-K-S" -
    SOMETHINGS UP AND AM SURE WE'LL ALL BE PLEASED, AS the mac pro      was announced Last year, barely made the December mark, then pushed to January, then February and now April.
    Would rather wait and have it done correct than released to early only to have it benchmarked in audio and found to be slower in a few areas- - - the logical part of my brain is wondering what else I would have to swap out as I am sure it would run, and fine for a while, then, poof....
    PEACE===AM SURE APPLE WILL BLOW US AWAY - they have to figure out how to increase the power for 150 watts or make the GPU work which in regard to FPU, I thought was NVIDIA?

  • Unable to Sync emails to car's HU over bluetooth. I am using iphone 5 and have set up a gmail account on it. Also, the basis notification settings mentioned on some site have been done.Can someone answer it?

    Unable to Sync emails to car's HU over bluetooth. I am using iphone 5 and have set up a gmail account on it. Also, the basis notification settings mentioned on some site have been done.I tried doing the following still the email sync is not working.?
    Here's the step by step:
    1. Go to Settings --> Notifications --> Mail --> Select any of your email accounts
    2. Notification Center: ON
    3. Alert Style: Banners or Alerts (I've only tested it to work with Banners...)
    4. Show Preview: ON
    5. View in Lock Screen: ON

    Hi uneleashurself and thanks for your answer.
    Forgive my language but getting to talk to the Safaricom customer service is a real pain in the **bleep** - if you ever get to talk to them, that is.
    I've never got an answer to my phone calls in three years and their customer assistans in the shops usually have no clue about whatever it is you're asking them.
    I talked to a few of them in a couple of different Safaricom shops and they didn't know what I was talking about.
    Still, I believe Safaricom is not the problem as other people I know who have a BlackBerry on Safaricom haven't experienced this problem.

  • I am using iphone 5 and i didn't get notifications of whatapp,facebook,wechat

    i am using iphone 5 and i didn't get notifications of whatapp,facebook,wechat
    give me solution
    i also upgrad to ios7 but problem contui...

    I'm having the same problem as maujmasti.
    After upgrading my iphone 3gs to ios 6.1.6 my wifi connection stopped working. When the network requires a password it displays a message that the password is incorrect and when it's an open network it says that it wasn't able to connect.
    I formated my iphone in attempt to fix the problem. It worked for a while but a few days later I could not connect anymore. The weird thing is that the wifi connection started to work again for another day or two but after that it stopped for good.
    When I tap on the blue arrow beside the wifi name, all the spaces are blank (IP adress / subnet mask / router / DNS ...).
    I've tried a lot of things that I read on the forum and nothing works.
    I could try to format my phone again but the problem is that I can't do an iCloud backup, not via wifi neither via iTunes.

Maybe you are looking for

  • Please can you clarify this and give me an example ?

    I want to sign up with iTunes connect to publish my books, but there is this section of the contract which I didn't get it is not clear will you please clarify it and give me an example. "Apple shall be entitled to a commission, in accordance with th

  • How do I print a spread with multiple page sizes?

    Hello fellow designers!!!! I'm trying to make a production dummy by printing double sided. My document has an extra fold on the outer edge (see attached image). I want to print 'D11-D12' as one spread with the reverse side as 'D13-12', so that I can

  • W530, questions about adding additional RAM

    My current setup came with the factory optional 2x 8gb Samsung DDR3 1600mhz RAM. I recently purchased gskill ripjaws 8gb stick ( 1.35V model). My computer recognizes the ram is installed however mentions that the new ram is unusable.  I have the i7-3

  • Custom class to load a webservice in flex

    class allows user to load any wsdl file and user can listen all necessary events in any mxml file by heaving an object of this class.

  • Images imbedding in email

    Recently when I attached images or jpgs/gifs to an email, they become imbedded and are not attached so that the recipient can save them.  Is this a setting issue?