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_profile
worked 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 .profile
as suggested, but it didn't work too because, as I learned later from here,~/.profile
isn'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/Xsession
which LightDM doesn't execute - Arch Linux wiki claims that LightDM sources
~/.xprofile
files, 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/xprofile
to your~/.xprofile
andtouch /tmp/xinitrc
to your~/.xinitrc
etc, so you can figure out which files are actually read. – terdon Apr 16 '16 at 15:12awesome
isn't run from~/.xinitrc
anymore, but configured with/usr/share/xsessions/awesome.desktop
file that comes with package. This doesn't bring me any closer though. I also tried~/.pam_environment
which is supposed to work with LightDM, but no luck either. – Red Apr 16 '16 at 17:23