Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: jur on September 24, 2011, 10:24:40 PM

Title: Bug with popup?
Post by: jur on September 24, 2011, 10:24:40 PM
I can't call up popup like I used to, via an acpid script. I can call up anything else I tried such as term or aplay, but just popup does not work when called from an acpid event script. popup works fine in any other situation I tried such as calling from a terminal.


snippet from my acpid script: (aplay works, popup does not; it worked in the past)
Code: [Select]

    *)
aplay /home/tc/.sounds/blip.wav &
        popup $1 &
      ;;
esac
Title: Re: Bug with popup?
Post by: gerald_clark on September 24, 2011, 11:54:42 PM
Acpid should be running as a root daemon, not in a user's X context.
Popup likely cannot open  the display.
To enable popup for programs not run by the X session, you need xhost from one of the Xorg
packages. The X session needs to run 'xhost +localhost'.
The program running acpid needs to export DISPLAY=':0.0'.

Root processes cannot reasonably expect to have access to the DISPLAY.
Title: Re: Bug with popup?
Post by: jur on September 25, 2011, 08:14:45 AM
Ah so you are suggesting that because it worked before, I must now be starting acpid before X starts. This makes sense. OK I'll check this.
Title: Re: Bug with popup?
Post by: jur on September 25, 2011, 08:58:16 AM
Thanks Gerald, that was it.