/etc/profile.local not being read?

Hi all,

I’ve added some minor configuration stuff to /etc/profile.local if I login on the (text) console or ssh to my machine the local customizations are acted upon.

But if I login to xfce, and open a terminal** they are not is there a way to either make the xfce terminal use /etc/profile.local or somewhere I should put them so that the xfce will use them.

**I suspect this is because xfce is not running a ‘login’ shell.

Contents of my /etc/profile.local :

#local profile.
PS1='\h{\W}\$ '
EDITOR=/usr/bin/joe

export PATH EDITOR MANPATH PS1

Cheers.

Phill.

Yes, that’s likely to be correct. You can test this with the command:

xterm -ls

where the “-ls” tells it to use a login shell.

Perhaps put your commands in “$HOME/.bashrc” or, if this must apply to several users, put them in “/etc/bash.bashrc.local”.

2 Likes

From /etc/bash.bashrc:

# PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes
# will be lost during system upgrades. Instead use /etc/bash.bashrc.local
# for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the
# zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local
# settings, favourite global aliases, VISUAL and EDITOR variables, etc …

bash) test -s /etc/bash.bashrc.local && . /etc/bash.bashrc.local ;;

More from /etc/profile:

# PLEASE DO NOT CHANGE /etc/profile. There are chances that your changes
# will be lost during system upgrades. Instead use /etc/profile.local for
# your local settings, favourite global aliases, VISUAL and EDITOR
# variables, etc …

test -s /etc/profile.local && . /etc/profile.local

Hi all,

Thanks for the replies, putting the contents of /etc/profile.local into /etc/bash.bashrc.local worked.

Cheers.

Phill.

2 Likes