Repository navigation
Import X env variables (DISPLAY and XAUTHORITY) inside user service #1106
|
Hello, title is quite explicit, I came from https://bugs.gentoo.org/show_bug.cgi?id=967200#c7 after finding that these two environment variables are needed by the dunst user service at least on X11. The issue of course being that |
Replies: 2 comments 3 replies
|
hmm, the env gets filtered on purpose. in user mode the built in allowlist is just USER, LOGNAME, HOME, SHELL, XDG_* and a few editor/pager vars, so DISPLAY and XAUTHORITY are dropped before the service script even runs: Lines 70 to 74 in 14e11b7 the escape hatch is |
|
I still think the general need for user services to get access to these two variables is quite an important and unsolved problem. |
hmm, the env gets filtered on purpose. in user mode the built in allowlist is just USER, LOGNAME, HOME, SHELL, XDG_* and a few editor/pager vars, so DISPLAY and XAUTHORITY are dropped before the service script even runs:
openrc/src/shared/misc.c
Lines 70 to 74 in 14e11b7
the escape hatch is
rc_env_allow(L97 in the same file), which in user mode is read from~/.config/rc/rc.conf. putrc_env_allow="DISPLAY XAUTHORITY"there, then start dunst from inside the x session, egrc-service -U dunst startat the e…