You are not logged in.

#1 2021-12-17 18:23:50

TheMohawkNinja
Member
Registered: 2017-07-11
Posts: 47

Calling xsecurelock via a bindsym in i3 doesn't apply env variables

Hello,

I have installed xsecurelock via it's GitHub repo and use my ~/.zshrc file to export a couple of environment variables to configure xsecurelock. While the environment variables apply perfectly fine when I just call xsecurelock in a shell, if I instead call it through i3 using

bindsym $mod+l exec xsecurelock

, it only uses the default settings.

I tried adding "sudo" before the export lines to see if it was some permissions issue (not that it should be, since I assume i3 should be running under my user and not root), however that didn't work.

Any ideas?

Offline

#2 2021-12-17 21:05:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,154

Re: Calling xsecurelock via a bindsym in i3 doesn't apply env variables

I tried adding "sudo" before the export lines

Remove the idea "doesn't work so I'll try sudo" from your head - it's not a big deal here but will more often than not cause serious problems.

Your zshrc isn't sourced by the i3 session - not by i3 directly, nor (we'll assume) by whatever launches the session (certainly no DM and for startx it depends on how that's invoked)

https://wiki.archlinux.org/title/Environment_variables - if you can't work it out yourslef, we'll have to know how the session/i3 is started.

Edit: a common way to launch a process w/ custom environment variables is https://man.archlinux.org/man/core/coreutils/env.1.en

Last edited by seth (2021-12-17 21:06:42)

Offline

Board footer

Powered by FluxBB