Prevent notify-send from grabbing focus in xmonad

I just started using xmonad, and I've got most of the wrinkles ironed out, but this one still bugs me. I use pidgin + libnotify, and whenever a notification pops up, it grabs focus, meaning I can't type anything for a minute (unless I move my mouse and close it). This is particularly annoying when I'm having a chat back-and-forth, and I get notifications from that window/another chat window.
(I know I can turn off the notifications when the window is currently open, but it doesn't solve the larger problem of notifications grabbing focus when I'm typing in a separate screen).

That was not a conscious choice; I just switched from xfce, so that makes sense.
I uninstalled xfce4-notifyd, installed notification-daemon, and reinstalled pidgin-libnotify (for good measure). The notifications still work, so I'm assuming notification-daemon is working properly, but the focus still gets grabbed.
Do you use pidgin as well, or just notification-daemon? I still get the same issue when I do notify-send, which makes me believe it's not pidgin's problem, but maybe not.
This website seems to imply that it's an xmonad configuration issue, but I'm not that familiar with Haskell/xmonad's configurations. Is it possible to alter this behavior *only* for notify-send events, but not anything else that might display an urgent window?

Similar Messages

  • Prevent BeX Analyzer from stealing focus while executing several queries

    Hi all,
    we have a vba program that runs several 3.5 queries in Excel (SAPBEXrefresh)
    Does anyone knows a solution to prevent BeX Analyzer from stealing the focus each time a new query starts or completes.

    I too am trying to find solution to this very same problem.
    I created a Excel VBA program to batch process BEx reports, which works great, but the users are finding that they can't work on anything else while the process runs, as BEx always returns the focus to the Excel window as each BEx report run is completed!
    In our googling, we ran across the following thread, which I've found so far to have the most detailed discussion of this problem:
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw/sapbex-takes-focus-1188178?cv=expanded
    Unfortunately, no final resolution was provided there, and the thread is over 2 years old, and it looks like the poster who was closing in on the solution hasn't logged in to that particular forum in 2 years as well.
    But why don't you take a look at the link anyway, as it may give you some ideas. I will also continue to use that poster's ideas to try to work out a solution, and if I come across one, I will certainly share it with you.

  • [SOLVED] notify-send from a daemon

    Hi,
    I have configured halevt (a HAL device manager) to run notify-send so I get a notification every time I insert or remove a drive. The thing is, since halevt runs as a daemon at boot, every time it runs notify-send I get this error:
    libnotify-Message: Unable to get session bus: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
    What I don't really understand is why if I restart de daemon from my Xorg session (with sudo) it works fine. Any ideas?
    Thanks
    UPDATE
    I resolved the issue with a different approach.
    The solution, for those interested, is in post #8.
    Last edited by johanbcn (2010-07-12 22:27:14)

    Berseker wrote:I've seen only now your post.. great job, this is very useful and pretty for those that doesn't use a complete DE.
    It would be great to translate your file in different languages (I'll try to translate this in italian if I find some spare time)
    Thank you
    If you are interested I have an updated version of the config file that more or less accomplishes what I wanted at the beginning.
    First, there is the daemon config (only mounts the filesystems): /etc/halevt/halevt.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE halevt:Configuration [
    <!ENTITY HAS-LABEL "hal.volume.label & !hal.volume.label = ">
    <!ENTITY DEVICE "hal.block.device & hal.volume.is_disc = false">
    <!ENTITY CDROM "hal.block.device & hal.volume.is_disc & hal.volume.disc.is_blank = false & hal.volume.disc.has_data & hal.volume.disc.is_videodvd = false">
    <!ENTITY CDROM.SIGNAL "hal.block.device & hal.storage.drive_type = cdrom">
    <!ENTITY DVD "hal.block.device & hal.volume.is_disc & hal.volume.disc.is_blank = false & hal.volume.disc.has_data & hal.volume.disc.is_videodvd = true">
    ]>
    <halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">
    <!-- Mount CDRom devices -->
    <halevt:Device match="&CDROM; & hal.volume.is_mounted = false;">
    <halevt:OnInit exec="halevt-mount -u $hal.udi$ -p cdrom$hal.block.minor$"/>
    <halevt:Insertion exec="halevt-mount -u $hal.udi$ -p cdrom$hal.block.minor$"/>
    </halevt:Device>
    <!-- Mount non-CDRom labeled devices -->
    <halevt:Device match="&DEVICE; & &HAS-LABEL; & hal.volume.is_mounted = false;">
    <halevt:OnInit exec="halevt-mount -u $hal.udi$ -p $hal.volume.label$"/>
    <halevt:Insertion exec="halevt-mount -u $hal.udi$ -p $hal.volume.label$"/>
    </halevt:Device>
    <!-- Mount non-CDRom non-labeled devices -->
    <halevt:Device match="&DEVICE; & hal.volume.is_mounted = false; & hal.volume.label = ">
    <halevt:OnInit exec="halevt-mount -u $hal.udi$ -p disk$hal.block.minor$"/>
    <halevt:Insertion exec="halevt-mount -u $hal.udi$ -p disk$hal.block.minor$"/>
    </halevt:Device>
    <!-- Handle CDRom eject button signal -->
    <halevt:Device match="&CDROM.SIGNAL;">
    <halevt:Condition name="EjectPressed" exec="halevt-umount $hal.block.device$; eject $hal.block.device$"/>
    </halevt:Device>
    </halevt:Configuration>
    (Notice that I have removed the -o sync parameter from the mount commands. Writing operations in automounted devices were ridiculously slower)
    And then, there is the user config file (only manages the notify-send commands): $HOME/.halevt/halevt.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE halevt:Configuration [
    <!ENTITY HAS-LABEL "hal.volume.label & !hal.volume.label = ">
    <!ENTITY DEVICE "hal.block.device & hal.volume.is_disc = false">
    <!ENTITY CDROM "hal.block.device & hal.volume.is_disc & hal.volume.disc.is_blank = false & hal.volume.disc.has_data & hal.volume.disc.is_videodvd = false">
    <!ENTITY CDROM.SIGNAL "hal.block.device & hal.storage.drive_type = cdrom">
    <!ENTITY DVD "hal.block.device & hal.volume.is_disc & hal.volume.disc.is_blank = false & hal.volume.disc.has_data & hal.volume.disc.is_videodvd = true">
    ]>
    <halevt:Configuration version="0.1" xmlns:halevt="http://www.environnement.ens.fr/perso/dumas/halevt.html">
    <!-- Notify CDRom labeled mounts/umounts -->
    <halevt:Device match="hal.block.device & hal.volume.is_disc = true & !hal.volume.label = ">
    <halevt:Property name="hal.volume.is_mounted">
    <halevt:Action value="true" exec="notify-send --icon=gtk-cdrom --expire-time=3000 'Device mounted' '$hal.volume.label$ has been mounted in $hal.volume.mount_point$.'"/>
    <halevt:Action value="false" exec="notify-send --icon=gtk-cdrom --expire-time=3000 'Device unmounted' '$hal.volume.label$ has been unmounted.'"/>
    </halevt:Property>
    </halevt:Device>
    <!-- Notify non-CDRom labeled mounts/umounts -->
    <halevt:Device match="hal.block.device & hal.volume.is_disc = false & !hal.volume.label = ">
    <halevt:Property name="hal.volume.is_mounted">
    <halevt:Action value="true" exec="notify-send --icon=gtk-harddisk --expire-time=3000 'Device mounted' '$hal.volume.label$ has been mounted in $hal.volume.mount_point$.'"/>
    <halevt:Action value="false" exec="notify-send --icon=gtk-harddisk --expire-time=3000 'Device unmounted' '$hal.volume.label$ has been unmounted.'"/>
    </halevt:Property>
    </halevt:Device>
    <!-- Notify non-CDRom non-labeled mounts/umounts -->
    <halevt:Device match="hal.block.device & hal.volume.label = ">
    <halevt:Property name="hal.volume.is_mounted">
    <halevt:Action value="true" exec="notify-send --icon=gtk-harddisk --expire-time=3000 'Device mounted' '$hal.block.device$ has been mounted in $hal.volume.mount_point$.'"/>
    <halevt:Action value="false" exec="notify-send --icon=gtk-harddisk --expire-time=3000 'Device unmounted' '$hal.block.device$ has been unmounted.'"/>
    </halevt:Property>
    </halevt:Device>
    </halevt:Configuration>
    This way, you have the daemon automounting at boot, without needing an X session, and a second instance of the daemon that only executes the notify-send messages once you enter xorg
    Last edited by johanbcn (2010-07-12 22:37:43)

  • How to prevent apps from stealing focus?

    Often when I am running an application in the background, it will steal focus from my active window with a modal dialog box that will pop up in the foreground. Invariably, since I can be a fast typer sometimes, I won't be able to stop myself in time and will often cause the modal dialog box to take some unwanted action. This can have a HIGHLY unpleasant effect! Especially if I've just found myself aborting unintentionally a long job because of the focus stealing!
    I'd like to prevent any application from stealing focus from the active window. Is there any way to set OS X or the finder to prevent this? If not, are there any haxies that I can install that will have this effect?
    (For reference, Microsoft Vista Aero doesn't allow an application to open a window or dialogue above the active window, unless it's a UAC confirmation dialog, which still only opens on a different display layer.)

    YES AAAAAAAAAH THIS IS A REAL AGRESSION TO THE NERVES ! ! !
    I need to meet the dude who decided "hey wouldn't it be a great idea if we had the applications bothering you all the time as soon as they need your attention, instead of just letting you get to them whenever you feel like it ? now where's my promotion ? ^^"
    WHERE IS THIS MORON AAAAAAAAAHHHHHHHHHHHHHHHH
    does anyone know of a 3rd party software that would keep each app where it is whatever happens to it ?
    dammit

  • Prevent apps from stealing focus

    Is there a general overall setting for preventing applications from stealing focus?

    i'm having problems with itunes 6.0.5(20). I set up a playlist to burn, hit the burn button, it asks for a cd, i feed it the cd, it says "checking media...". Then, that's all it needs from me, so I go back to my word processing and while I'm typing in that suddenly the iTunes window pops back to the foreground - not asking for input or anything, it just pops to the foreground once the write process starts on the cd. I've had it steal focus from Firefox, Finder, Word, pretty much everything at one time or another.
    EDIT: I've found if I minimize iTunes it won't pop up and steal focus, but if I just switch it to the background instead of minimizing it, it will pop to the foreground

  • Preventing jframe from losing focus until action performed

    i have my main app running from a single jframe. at some points i need the user to select an option from a list determined at runtime (this pops up in a new jframe).
    the JOptionPane.showMessageDialog prevents a user from doing anything but clicking the OK button (and beeps if you try to click outside of that jframe). how do i keep the focus of my popped up jframe so i force my users to give an input? id like to have that system beep too...
    thanks!

    Use JDialog instead of JFrame and make it modal.

  • Running notify-send via cron

    I've written a script, that monitors battery state and shuts down netbook when power is low to prevent hot power off. I've tested the script before running it in cron - everything works as it must: notification pops up, system shuts down. But when I'm trying to run it from cron - everything ok expect notify-send command.
    Config scripts:
    # crontab -e
    # root crontab
    # DO NOT EDIT THIS FILE MANUALLY! USE crontab -e INSTEAD
    # man 1 crontab for acceptable formats:
    # <minute> <hour> <day> <month> <dow> <tags and command>
    # <@freq> <tags and command>
    DISPLAY=:0.0
    SHELL=/bin/bash
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    # SYSTEM DAILY/WEEKLY/... FOLDERS
    @hourly ID=sys-hourly /usr/sbin/run-cron /etc/cron.hourly
    @daily ID=sys-daily /usr/sbin/run-cron /etc/cron.daily
    @weekly ID=sys-weekly /usr/sbin/run-cron /etc/cron.weekly
    @monthly ID=sys-monthly /usr/sbin/run-cron /etc/cron.monthly
    * * * * * /etc/cron.hourly/powersave
    $ cat /etc/cron.hourly/powersave
    PasteBin
    $ cat /etc/X11/xorg.conf | head -n 6
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "LG_Touchpad" "CorePointer"
    InputDevice "LG_Keyboard" "CoreKeyboard"
    EndSection
    $ echo $DISPLAY
    I thought that running one more external script will solve the problem, but it didn't work.
    Tried also this command in cron:
    * * * * * DISPLAY=:0.0 /etc/cron.hourly/powersave
    But also without result.
    Anyone found a solution to this problem?

    You may also need to have the DBUS_SESSION_BUS_ADDRESS environment variable set.  I have a script that does something like this:
    PIDS=$(pgrep urxvtd)
    for p in $PIDS; do
    dbus=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$p/environ | sed 's/DBUS_SESSION_BUS_ADDRESS=//')
    user=$(grep -z USER /proc/$p/environ | sed 's/USER=//')
    dply=$(grep -z DISPLAY /proc/$p/environ | sed 's/DISPLAY=//')
    sudo -u $user sh -c "DBUS_SESSION_BUS_ADDRESS=\"$dbus\" DISPLAY=\"$dply\" /usr/bin/notify-send -i \"$ICON\" \"$TITLE\" \"$BODY\""
    done
    I chose urxvtd, b/c it's guaranteed to be running... but you can choose another progam.
    Last edited by pnutzh4x0r (2011-07-02 02:32:16)

  • How can I disable sending from one Mail account?

    Hello. I have a gmail account that I use to subscribe to various newsletters and accounts. So it's essentially a read-only account for me. But I too frequently accidently send mail from that account. Is there a way to prevent mail from being sent from that account?

    I want to do the same thing as the OP.  I have tried making outgoing server none. And checking "always use this server so it prompts me to edit the message so that I manually select a different address to send from inthe drop down list. And selecting a different account for composing.  Actually, all my outgoing emails keep coming from the one account I am attempting to disable.  Got any other ideas?

  • I am trying to download a video file which I have on my computor to facebook but Firefox continuously shows theis message"Firefox automatically prevented this page from reloading.

    Steps.
    Open Facebook page.
    On the wall select video.
    Select upload a video from your drive.and click on it.
    Drop down window opens.
    Select a video file on your computer.
    Please upload only if:
    The video is under 1,024 MB and 20 minutes.
    The video was made by you or your friends.
    Click on browse
    Firefox"File Upload window opens"Pictures Library"Exposing available videos on my file.Double click on the video selected.
    Browser window opens and shows:"Brian on the move again..MPG.
    Click on "Share"Uploading Video-Mozilla Firefox"window opens and shows: http://www.facebook.com/video/upload_popup.php?video_id=2654584286114&qn=1321170149&xhpc_composerid=uqj39y_10&xhpc_context=profile&profile_id=185862931498895
    Bellow that :Firefox prevented this page from automatically reloading."Please wait while your video uploads."But is blocked .
    Check the "Allow"button Allows it to run for about 5 seconds before blocking again. This is uploaded in the 5 second intervals 1.) 4.13 MB of 39.87 MB (13.16 KB/sec) -- 46 minutes remaining. 2.) 5.33 MB of 39.87 MB (13.22 KB/sec) -- 44 minutes remaining 3.) 6.09 MB of 39.87 MB (13.11 KB/sec) -- 43 minutes remaining. 4.) 6.67 MB of 39.87 MB (13.18 KB/sec) -- 43 minutes remaining. 5.) 6.) 7.43 MB of 39.87 MB (13.11 KB/sec) -- 42 minutes remaining etc etc and so on and so on,each time the "Allow"button is checked the message :Waiting for vupload.facebook.com -Connecting-Connected-Sending request-Transferring data appears and after checking the "Allow" button 10 or 12 times we arrive at"11.93 MB of 39.87 MB (13.22 KB/sec) -- 36 minutes remaining.The upload shows 36 minutes remaining but the video itself is no longer than 1 min 54 sec and 39.8 MB in size.

    See:
    *Firefox/Tools > Options > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Tools > Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    See also:
    *https://support.mozilla.com/kb/Options+window+-+Advanced+panel#General_tab
    *http://kb.mozillazine.org/accessibility.blockautorefresh
    *http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • Prevent multiple users from editing/approving the same form SPD 2013,SP 2013

    Hello all, I have a workflow with a to do task, the task is assigned to a group so any of the users in that group can go in and do a quality check on form data and approve it.  How do I prevent multiple users from working on the
    same form? do I just require check out? or is there a way to notify the rest of the group that a user has already started the quality check.

    The "Require Checkout" option is your best bet.  You can also enable the auto checkout on edit option to allow minimal effort on the side of the user.  Other users will then get the error message stating the item is checked out, if they try to
    edit it.
    If you'd like, you could add a workflow to the task list that triggers when something is changed.  That workflow can check if the item is checked out and if so, email the other users assigned to the task.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • Emails that I send from my iMac do not appear in the icloud sent box.

    Emails that I send from my iMac do not appear in the icloud sent box.  Is it possible to have the sent folders in synch between my imac and the icloud?  Thanks for any help.

    You can check the form history settings.
    *Tools > Options > Privacy > History: "Remember search and form history"
    *https://support.mozilla.org/kb/Form+autocomplete
    The website may be using autocomplete=off in that field to prevent Firefox from saving and filling that data.
    You can remove autocomplete=off with a bookmarklet to make Firefox save form data.
    *http://kb.mozillazine.org/User_name_and_password_not_remembered

  • Prevent Ctrl-W from closing Full Acrobat Search window

    When I do a Full Acorbat Search on a folder tree, it can take quite some time for all the hits to be found, and quite some time to work through the hits.  Usually, multiple PDF files are opened as I work through the hits.  As I close the PDFs with ctrl-W, it is very easy to accidentally close the Full Acrobat Search window, which means waiting forever to re-do the search and find my way to my current spot in the list of hits.  I find it highly inappropriate for ctrl-W to close the Full Acrobat Search window in the same way that it closes PDF files.  It is especially risky in Windows 7, where the window frames are translucent and the window with the focus is highlighted in a way that makes it very difficult to distinguish from the windows without the focus.
    Is there a way to prevent ctrl-W from closing the Full Acrobat Search window?  I am using Acrobat Professional 8.

    Thanks, Dave.
    I'm finding other inconsistent behaviour that is exacerbating the problem. If I close the last PDF file with ctrl-W, the search window stays open.  If I close the last PDF file from the task bar, boom, the search window gets clobbered too, which entails another lengthy re-search.

  • Getting error when ASN update is send from R/3 to SNC

    Hello,
    We are facing below error when we ASN update is send from R/3 to SNC. We are using SNC5.1. Due to this it is not updating it in SNC as ASN confirmed. We are implementing customer collaboration.
    Below is error:
    ASN item 4046020504 / 900002 ( 669301 R00550 / 00001 ): Notified quantity 20196.000000 is greater than due qty 19635.00000000000000 (tolerance: 0.000000) 187(/SCMB/DM_DLV)
    Is this that when the actual delivery qty is more than requested qty R/3,  to have correct update we need to maintain over delivery/Under del tolerance in SNC.
    If yes then where I can maintain in SNC.
    THX

    Hi Vaibhav,
    SAP SNC uses the supplier tolerances from the following source:
    If the purchase order that the customer has sent from his or her back-end system to SAP SNC contains delivery tolerances for an item, SAP SNC uses these delivery tolerances. If the purchase order item does not contain delivery tolerances, SAP SNC uses the delivery tolerances from the purchase order header
    If the purchase order does not contain delivery tolerances, SAP SNC uses the delivery tolerances for the purchase order item from the following source:
    If the purchase order item contains a contract, SAP SNC uses the tolerances from the contract.
    If the contract does not exist in SAP SNC or if the purchase order item does not contain a contract, SAP SNC uses the delivery tolerances from the purchasing info record.
    If the purchasing info record does not exist in the SAP SNC system, SAP SNC uses the delivery tolerances from the location product master of the customer location.
    Regards,
    Sandeep

  • Hotmail users don't see pictures send from program "mail" on Mac

    I'm using "mail" (i.e. Mac's standard mail program) under Mac OS 10.6.8 and whenever I want to put image files (like JPEG or PNG  documents [*]) in attachment it includes it right in the text body of the mail itself… resulting in red crosses if the recipient uses hotmail.
    [*] even PDF documents are plainly SHOWN instead of having it as an attachment! Grrrr…
    • Anyone who can tell me how to avoid including documents in the text body of the mail (and thus to keep it as a separate attachment)?
    • Anyone who can tell me how to help hotmail users on PC to view images coming from a Mac sender?
    THANKS

    I was having the same problem; but I've found a workaround that might help. Here's what to do:
    Set up your iCloud account on your iPhone/iPad with whichever email address you want as your main one; either .me or .mac.
    Set up a Gmail account if you don't already have one. It doesn't matter if you don't ever intend you use it for sending email.
    Go to your 'Mail, Contacts, Calendars' settings on your iPhone/iPad, and add the Gmail account if you don't already have one set up.
    Go into your Gmail settings and under 'Account' list all the email addresses you want  want to send from as your secondary option. In my case, I had already set up iCloud with .mac so I've listed the .me one in my Gmail settings. Put a comma and space between each email address. I've got three email addresses listed here. (See screen grab). Oddly, I didn't seem to have the comma key available on my iPad, so I listed my email addresses in 'Notes' and cut/pasted them in.
    Now when you send an email, you should have all those addresses available to send from.
    Hope this helps.
    Tom.

  • HT201304 iOS parental controls do not prevent the child from changing the device passcode.

    So the parent cannot get into the device at all unless the child provides the passcode. Sure, the device can be taken away until the child provides the passcode, but why don't parental controls just prevent the passcode from being changed?  Either that, or the parental control passcode should allow the parent to get into the device, over-riding the passcode lock.

    We are not Apple iOS programmers.  Just device users like yourself.
    feedback.apple.com is where you should send suggestions.

Maybe you are looking for

  • I accidently deleted the playlist selected for updating thing...

    i was adding new songs to my ipod and i guess there were too many songs there so it asked me if i wanted it to choose some songs randomly... so i chose "ok" but actually i didnt really want it to choose songs on its own so i deleted the list that was

  • Hp live photo

    Hi if i delete my app from my iphone how can i get my usertag back on when i download the app again please i deleted app and then found I could then get back to my place for hp live photo when i set it up i didnt do it through facebook as i wanted to

  • How to delete pages in a pdf file with mac OSX Mavericks?

    Indeed i don't have Pages options in my tools window... Is that normal for the mac version? Please it's urgent...

  • Why do I get an error when trying to send email?

    When I try to email a photo directly from iPhoto, I get an error message that tells me that server is unable to identify email name and password. WHY? I verified and email address and password are correct> Also, I have listed to email addresses on my

  • How do I change the computer's "Name"?

    Hi - I recently upgraded from a Mac Mini to an iMac G5, and as I was setting up the G5 it prompted me thru a firewire data exchange from my old Mac Mini. Now, in systems preferences and software setup, everything in the iMac keeps referring to "My Ma