Re: [dwm] Problem with notify-send from acpi events

2009-05-04 Thread Donald Chai

On May 3, 2009, at 3:12 PM, Preben Randhol wrote:

I have setup my Asus Eee to run commands when I press the function  
keys
(like power up/down etc...) In these scripts I'm running notify-send  
to

get a small window to give a message (like touchpad off etc...). The
scripts are run from acpid.

For some strange reason when I use dwm, the notify window doesn't show
up. If I program dwm to run the script, I get the window. If I run the
script manually from xterm as either user or root I get the window. If
I start xfce4 in stead of dwm I get the window when acpid starts the
script.


Maybe you need to launch "notification-daemon" from .xsession or make  
sure you run "notify-send" as the correct user from acpid?  I assume  
that DBus messages are handled separately for each user...


Also, if you are only using libnotify to respond to keypresses, you  
may want to check out dzen2. The code sucks somewhat (I think there's  
at least one function with 1k LOC), but it doesn't suck up 3M of RAM  
at all times like notification-daemon does.





Re: [dwm] Problem with notify-send from acpi events

2009-05-03 Thread Jeremy Jay
my guess would be that DISPLAY isn't getting set. acpid is probably run
as root or before the env. variable exists and so can't read it.

Jeremy


On Mon 04 May 2009 - 12:12AM, Preben Randhol wrote:
> Hi
> 
> I have setup my Asus Eee to run commands when I press the function keys
> (like power up/down etc...) In these scripts I'm running notify-send to
> get a small window to give a message (like touchpad off etc...). The
> scripts are run from acpid.
> 
> For some strange reason when I use dwm, the notify window doesn't show
> up. If I program dwm to run the script, I get the window. If I run the
> script manually from xterm as either user or root I get the window. If
> I start xfce4 in stead of dwm I get the window when acpid starts the
> script.
> 
> I don't understand why I don't get it in dwm. Anybody have any clues as
> to what the problem could be or how to debug to find it?
> 
> Thanks in advance
> 
> Preben
> 
> System: Ubuntu 9.04, dwm 5.5(6) from hg.
>