ArcoLinux 19.09 iso has been released

[SOLVED] Terminal and .bash_profile

Post Reply
xamerin
Crewman
Posts: 3
Joined: Mon Dec 31, 2018 6:13 am
Australia
[SOLVED] Terminal and .bash_profile

Post by xamerin » Mon Dec 31, 2018 9:17 am

Hi, I recently installed ArcoLinux and noticed that TerminalEmulator, Termite and urxvt don't source .bash_profile.

I was trying to add environment variables and extend the PATH environment variable (which I noticed was set in .bashrc) in my .bash_profile.

This affects logins through SSH and appears to be different behaviour to other Linux distros I've been using such as Manjaro.

Is there any reason why the default keybindings for starting the various terminals don't start bash as a login shell?

I've temporarily worked around this problem by setting PATH and other environment variables in .profile. However, I'd like to know why the .bash_profile behaviour is different in ArcoLinux.

User avatar
erikdubois
Captain
Posts: 2369
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:
Belgium
Re: [OPEN] Terminal and .bash_profile

Post by erikdubois » Tue Jan 01, 2019 7:58 am

Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

xamerin
Crewman
Posts: 3
Joined: Mon Dec 31, 2018 6:13 am
Australia
Re: [OPEN] Terminal and .bash_profile

Post by xamerin » Tue Jan 01, 2019 8:38 am

So I can confirm .bash_profile is executed when connecting to ArcoLinux through SSH. That is the expected behaviour for a login shell.

It looks like when a terminal starts bash in ArcoLinux, it does not invoke bash as a login shell, and therefore .bash_profile is not executed. Can you confirm this and advise why this appears to be different to other Linux distros?

I guess I'm just used to terminals always invoking bash as a login shell and sourcing .bash_profile, and I'd like to understand how this is different in ArcoLinux.

I can't find in the configuration files for the terminals where it specifies how bash is invoked, as a login shell or not login shell.

xamerin
Crewman
Posts: 3
Joined: Mon Dec 31, 2018 6:13 am
Australia
Re: [RESOLVED] Terminal and .bash_profile

Post by xamerin » Tue Jan 01, 2019 1:45 pm

On further investigation comparing with the behaviour of Manjaro I can confirm it is consistent with ArcoLinux. Disregard previous question, I'll continue using .profile for PATH and other environment variables.


Post Reply

Return to “Terminals”