LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Custom pm-utils suspend/resume hook stopped working (http://www.linuxquestions.org/questions/linux-software-2/custom-pm-utils-suspend-resume-hook-stopped-working-799763/)

TDMBG 04-03-2010 07:30 AM

Custom pm-utils suspend/resume hook stopped working
 
Hello,
some time ago I created my own hook in /etc/pm/sleep.d/ in order to fill a few gaps in my e17
configuration:

Code:

#!/bin/bash
case "$1" in
    hibernate|suspend)
        sudo -u username xscreensaver-command -display :0.0 -lock
        ;;
    thaw|resume)
        sudo -u username /opt/e17/bin/enlightenment_remote  -restart
        ;;
    *)
        ;;
esac
exit 0

and it used to work as a charm for some time. However, at certain point it started returning this error in /var/log/pm-suspend.log:

Code:

/etc/pm/sleep.d/00customhook resume suspend: Failed to open connection to "session" message bus: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
and it stopped functioning. The only system changes I've made in the meantime are cleaning up some leftovers from gnome and kde, but I fail to see how would that affect X initialization or dbus's functions. Any help will be appreciated, thanks in advance.

EDIT: I did some experimenting with the hooks and found out that any command that has anything to do with X returns the same error if put in the hooks. Normal execution in terminal/tty works fine.


All times are GMT -5. The time now is 07:29 AM.