Skip to content

Macro issue #107

Answered by X3n0m0rph59
gimmemabrewski asked this question in Q&A
Feb 18, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi @gimmemabrewski! Thanks for posting this question!

I believe you need to provide the correct environment variables to your shell script. Additionally it would be better to not run it as the user the eruption daemon runs as (root), but as your user instead.

Please replace USER, USER_ID and DISPLAY with the correct values for your system:

File macro.sh:

#!/bin/bash
USER=`whoami`
USER_ID=`id -u`
DISPLAY=":1"

DBUS_SESSION_BUS_ADDRESS=unix:path=/run/$USER/$USER_ID/bus

export DISPLAY=$DISPLAY
export DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS

/usr/bin/notify-send "Message from Eruption"

The file macro.sh needs to be executable. (chmod +x macro.sh)

You may want to replace the line /…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@gimmemabrewski
Comment options

@gimmemabrewski
Comment options

@X3n0m0rph59
Comment options

@gimmemabrewski
Comment options

Answer selected by X3n0m0rph59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants