Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deiban 9 base distros might not source .profile
#1
I have noticed that in some Debian-based distros, such as Mint LMDE 3 and MX Linux 18, the .profile is not sourced in the GUI login. If you have a ~/bin directory, it will not automatically put ~/bin in your path. If you login through ssh or a TTY, .profile is sourced.

To get around this in LMDE, in the terminal, click Edit and go to Preferences. Under the "Command" tab, check the box that says "Run command as a login shell."

In MX Linux 18, right-click anywhere in the terminal and choose Preferences from the menu. In the General tab, check the box that says "Run command as a login shell.

Both of these distros are based on Debian 9. LMDE 3 and MX Linux 18 are the only distros based on Debian 9 that I've used so I can't speak for other Debian-based distros or other Debian releases. Just something to be aware of if you write scripts.
Reply
#2
This sounds very familiar.  Back in December 2018, I remember a thread on this same subject.
Idea  Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.

Reply
#3
(03-16-2019, 08:59 PM)rickromig Wrote: I have noticed that in some Debian-based distros, such as Mint LMDE 3 and MX Linux 18, the .profile is not sourced in the GUI login. If you have a ~/bin directory, it will not automatically put ~/bin in your path. If you login through ssh or a TTY, .profile is sourced.

To get around this in LMDE, in the terminal, click Edit and go to Preferences. Under the "Command" tab, check the box that says "Run command as a login shell."

In MX Linux 18, right-click anywhere in the terminal and choose Preferences from the menu. In the General tab, check the box that says "Run command as a login shell.

Both of these distros are based on Debian 9. LMDE 3 and MX Linux 18 are the only distros based on Debian 9 that I've used so I can't speak for other Debian-based distros or other Debian releases. Just something to be aware of if you write scripts.

Yep I have came across the same issue with MX18 too.

I added this line to the end of my ".Bashrc" file...
Code:
# set PATH so it includes user's private bin if it exists
test -d "$HOME/bin" && PATH="$HOME/:$HOME/.local/bin:$HOME/bin:$PATH"

An for good measure for the times that the ".Profile" decides to get used I add this to the end of my ".Profile"
Code:
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"
This has fixed my issue for my ~/bin path.

Joe Collins came up with most of this and I just edited it for MX...

Later!
**********************************************************
Taglines of the Day:
Today is the tomorrow you worried about yesterday.  Huh 

Everybody remember where we parked. - Kirk

To Boldly Go Where No BBS Has Gone Before. USS Stargazer BBS, Sheridan In.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)