WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Bug with popup?  (Read 2074 times)

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Bug with popup?
« 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

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Bug with popup?
« Reply #1 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.
« Last Edit: September 25, 2011, 12:09:38 AM by gerald_clark »

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Bug with popup?
« Reply #2 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.

Offline jur

  • Hero Member
  • *****
  • Posts: 863
    • cycling photo essays
Re: Bug with popup?
« Reply #3 on: September 25, 2011, 08:58:16 AM »
Thanks Gerald, that was it.