I am using Debian Stretch with Xfce. My
~/bin directory has a lot of scripts. This of course is in my
$PATH, and I run scripts from there sometimes when I log in to Xfce via Session and Startup > Application Autostart. In my
~/.bashrc file I have my custom aliases and functions. I use the functions in the
~/.bashrc file for shorter bits of code that I would rather not create a whole script for in
~/bin. However, sometimes I would like to run a function from my
~/.bashrc file as a GUI login item.
I created a test function in
~/.bashrc. I then set that function to run from
~/.profile. The function runs successfully when I do the following:
bash -l from a terminal
- Log in on tty session
However it does not run when I log in to my graphical Xfce environment from LightDM. The function does not run either when added in Session and Startup > Application Autostart in Xfce. To test further I added a command directly in
~/.profile. It does run when I log in to Xfce.
I am unable to run a
~/.bashrc function when logging into a graphical environment. Is this bug? Should a setting be enabled to run functions at GUI login? Or, is my system just designed this way? Thanks