My setup is:
- Debian testing (stretch), up to date
- LightDM with autologin enabled
- Awesome window manager
- bash, in ROXTerm or XTerm
I don't seem to be able to set own environment variables and get it sourced at X session startup. Here's what I tried:
- using
~/.bash_profileworked on my previous OS, but I learned from this answer that it isn't sourced on X startup in Debian and it's derivatives - I did
mv .bash_profile .profileas suggested, but it didn't work too because, as I learned later from here,~/.profileisn't sourced when display manager launches X session - the answer from above question suggests use of
~/.xsessionrc. This also didn't work because, as I learned from here, it is sourced only by/etc/X11/Xsessionwhich LightDM doesn't execute - Arch Linux wiki claims that LightDM sources
~/.xprofilefiles, but that didn't work too.
Trying advice from that last site, I made my ~/.xinitrc like this:
export QT_STYLE_OVERRIDE=GTK+
[ -f ~/.xprofile ] && source ~/.xprofile
~/.screenlayout/default.sh
awesome
And my ~/.xprofile like this:
[[ -f ~/.bashrc ]] && . ~/.bashrc
source /etc/bash_completion.d/virtualenvwrapper
export GDK_NATIVE_WINDOWS=1
export WORKON_HOME=$HOME/env/
Sadly, after logging in and starting X session, I see that none of these variables are set:
red@localhost:~$ echo $QT_STYLE_OVERRIDE
red@localhost:~$ echo $GDK_NATIVE_WINDOWS
red@localhost:~$ echo $WORKON_HOME
How do I set them up properly?
~/.profile. GDM, for example. Sadly, you're quite right that not all of them do. That said, the first thing you should try is adding something liketouch /tmp/xprofileto your~/.xprofileandtouch /tmp/xinitrcto your~/.xinitrcetc, so you can figure out which files are actually read.awesomeisn't run from~/.xinitrcanymore, but configured with/usr/share/xsessions/awesome.desktopfile that comes with package. This doesn't bring me any closer though. I also tried~/.pam_environmentwhich is supposed to work with LightDM, but no luck either.