How to run .profile, etc

Chris Green cl at
Thu May 21 21:54:07 CEST 2020

On Thu, May 21, 2020 at 03:12:44PM -0400, Ambrose LI wrote:
> Le jeu. 21 mai 2020, à 13 h 23, Joe Riel <joer at> a écrit :
> >
> > When xfce4 starts (I use a graphical login),
> > how does one get it to run $HOME/.profile or something equivalent?
> Do you mean how to run something when xfce starts (without having to
> start a terminal), or do you mean how to get terminals started from
> xfce to run .profile? If the latter, .profile is run only if the shell
> is run as a “login shell”. I believe there is an option in Terminal’s
> preferences to make this happen.
> If you mean the former, I believe you can do it through the “sessions
> and startup” settings.
I'm pretty sure that .profile *is* run even when you're running GUI
only.  It gets run by the process that starts the GUI so all the GUI
processes inherit the environment and other things that are set up by
the .profile.

It's easy to check, just put something like:-

    echo ".profile started" >/tmp/itstarted

into .profile and take a look to see if the file /tmp/itstarted exists
after you have booted the system into the GUI.

Chris Green

More information about the Xfce mailing list