Earnestly / sx

Start an xorg server
MIT License
234 stars 16 forks source link

Cannot set environment variables in sxrc #20

Closed sweenu closed 1 year ago

sweenu commented 3 years ago

Here is my ~/.config/sx/sxrc:

#!/bin/sh
[ -f ~/.xprofile ] && . ~/.xprofile
xinput set-prop "Elan Touchpad" "libinput Tapping Enabled" 1
xinput set-prop "Elan Touchpad" "libinput Natural Scrolling Enabled" 1
setxkbmap -layout custom-us-keychron -option caps:escape
xset r rate 200 30
exec i3

I also tried with the export statements directly in the sxrc but they are still not set in the i3 process. Could you help me see what I'm doing wrong?

Very nice simple program, thanks for making it :)

Earnestly commented 3 years ago

Unfortunately I can't replicate this with a simple test case:

#!/bin/sh --
export FOO=bar # Or . ./envs where envs is a file containing export FOO=bar
exec xterm

In that xterm window printenv FOO printed bar as expected.

sx itself does nothing to exclude or include environments by itself so perhaps the environments are being changed elsewhere?

sweenu commented 3 years ago

So the problem seems to be specific to i3 because I tried your example with both xterm and dwm and it works fine. Only i3 poses problem. Thanks for helping out, you can close this issue, it's clearly not related to sx. I'm going to try to find what's the pb with i3.