[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ideal place to set environment variables

On 20/03/18 16:13, Subhadip Ghosh wrote:
Hi Ben,
Under XFCE, I have ~/.config/xfce4/xinitrc something like this:
export PATH=$HOME/bin:$PATH
umask 007
. /etc/xdg/xfce4/xinitrc
Thanks for telling me this. Since I also use Xfce, it makes sense for me to go this route. Can you tell me where I can read more about this file preferably in the context of Xfce?

This is a standard xinit script (like ~/.xinitrc, see "man xinit") but to support switching between different desktops, scripts in /etc follow XDG rather than having a single ~/.xinitrc :

Your login manager invokes the correct script based on the selected desktop, and your personal one in ~/.config/xfce4/xinitrc takes precedence over /etc/xdg/xfce4/xinitrc . The last line just tells sh to source (run) the official /etc/xdg/xfce4/xinitrc , but you get to set your environment variables *first* so they affect everything in Xfce including services and desktop components. I do not know if this is documented succinctly in one place, but that is my understanding of how it works.

Kind regards,

Ben Caradoc-Davies <ben@transient.nz>
Transient Software Limited <https://transient.nz/>
New Zealand

Reply to: