[opensuse] etc bash.bashrc.local doesn't work?
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead. What I am trying to do is stop xterm setting its title to the same thing as the bash prompt, but I am not quite sure how it does it, or why I cannot override it with xterm -T xxxx -n xxxx -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Richmond <dnomhcir@gmx.com> writes:
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead.
I see why, bashrc calls bashrc.local :(
What I am trying to do is stop xterm setting its title to the same thing as the bash prompt, but I am not quite sure how it does it, or why I cannot override it with xterm -T xxxx -n xxxx
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-01-12 00:18, Richmond wrote:
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead.
But you are creating a kind of loop... create it empty, then add whatever you want to add. Not all. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2017-01-12 00:18, Richmond wrote:
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead.
But you are creating a kind of loop... create it empty, then add whatever you want to add. Not all.
The problem is I want to change what's there, I think. And it might get overwritten. I have to look at it in detail. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-01-12 13:13, Richmond wrote:
Carlos E. R. wrote:
On 2017-01-12 00:18, Richmond wrote:
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead.
But you are creating a kind of loop... create it empty, then add whatever you want to add. Not all.
The problem is I want to change what's there, I think. And it might get overwritten. I have to look at it in detail.
No, .local files are never overwritten. You create that file, you control what is there. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2017-01-12 13:13, Richmond wrote:
Carlos E. R. wrote:
On 2017-01-12 00:18, Richmond wrote:
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead.
But you are creating a kind of loop... create it empty, then add whatever you want to add. Not all.
The problem is I want to change what's there, I think. And it might get overwritten. I have to look at it in detail.
No, .local files are never overwritten.
You create that file, you control what is there.
No I mean bashrc will be overwritten if I change it. Adding a .local doesn't allow me to change bashrc, only to add to it. Unless I can add code which undoes what has already been done. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-01-12 13:23, Richmond wrote:
Carlos E. R. wrote:
The problem is I want to change what's there, I think. And it might get overwritten. I have to look at it in detail.
No, .local files are never overwritten.
You create that file, you control what is there.
No I mean bashrc will be overwritten if I change it. Adding a .local doesn't allow me to change bashrc, only to add to it. Unless I can add code which undoes what has already been done.
No, neither. Not exactly. When a new bash.rpm is installed, one of these two things can happen: - the old config files remain intact, and the new file in the rpm gets named something.rpmnew. - the old config file gets renamed something.rpmorig (I think), and the new config in the rpm gets applied. In both cases you get both files and a chance to choose what to do. The script "rcrpmconfigcheck" gives you the list of pending config files to study. You can use "meld" to edit both files in comparison. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
12.01.2017 15:35, Carlos E. R. пишет:
When a new bash.rpm is installed, one of these two things can happen:
- the old config files remain intact, and the new file in the rpm gets named something.rpmnew.
- the old config file gets renamed something.rpmorig (I think), and the new config in the rpm gets applied.
https://www.redhat.com/archives/rpm-list/2003-May/msg00426.html
Richmond [12.01.2017 13:23]:
Carlos E. R. wrote:
On 2017-01-12 13:13, Richmond wrote:
Carlos E. R. wrote:
On 2017-01-12 00:18, Richmond wrote:
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead.
But you are creating a kind of loop... create it empty, then add whatever you want to add. Not all.
The problem is I want to change what's there, I think. And it might get overwritten. I have to look at it in detail.
No, .local files are never overwritten.
You create that file, you control what is there.
No I mean bashrc will be overwritten if I change it. Adding a .local doesn't allow me to change bashrc, only to add to it. Unless I can add code which undoes what has already been done.
So you mean, bash.bashrc sets (for example) "FOO=bar", and you want "FOO=baz" instead? This should work with bash.bashrc.local. If you want an empty Variable FOO, you may either have a line "FOO=" or "unset FOO" in bash.bashrc.local. Since bash.bashrc.local is included quite at the end of bash.bashrc, all variables have already been set so that you can overwrite them. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Werner Flamme wrote:
Richmond [12.01.2017 13:23]:
Carlos E. R. wrote:
On 2017-01-12 13:13, Richmond wrote:
Carlos E. R. wrote:
On 2017-01-12 00:18, Richmond wrote:
If I copy /etc/bash.bashrc to /etc/bash.bashrc.local I can no longer log into the system. Why is that? It says at the top of the file not to edit bashrc but to use bashrc.local instead.
But you are creating a kind of loop... create it empty, then add whatever you want to add. Not all.
The problem is I want to change what's there, I think. And it might get overwritten. I have to look at it in detail.
No, .local files are never overwritten.
You create that file, you control what is there.
No I mean bashrc will be overwritten if I change it. Adding a .local doesn't allow me to change bashrc, only to add to it. Unless I can add code which undoes what has already been done.
So you mean, bash.bashrc sets (for example) "FOO=bar", and you want "FOO=baz" instead? This should work with bash.bashrc.local.
If you want an empty Variable FOO, you may either have a line "FOO=" or "unset FOO" in bash.bashrc.local.
Since bash.bashrc.local is included quite at the end of bash.bashrc, all variables have already been set so that you can overwrite them.
Not quite that simple. What I have done is below, i.e. commented out some code. I don't know what these variables are _tsl etc. I think I could probably set $TS1 to "" in bashrc.local, I haven't tried it. What I want is to have the prompt set to me@host but the title of the xterm window left alone, as I have already set it to something in .xsession. diff /.snapshots/2/snapshot/etc/bash.bashrc /etc/bash.bashrc 129,137c129,137 < if test "$TERM" = xterm ; then < _tsl=$(echo -en '\e]2;') < _isl=$(echo -en '\e]1;') < _fsl=$(echo -en '\007') < else < _tsl=$(path tput tsl 2>/dev/null || path tput -T $TERM+sl tsl 2>/dev/null) < _isl='' < _fsl=$(path tput fsl 2>/dev/null || path tput -T $TERM+sl fsl 2>/dev/null) < fi ---
#if test "$TERM" = xterm ; then # _tsl=$(echo -en '\e]2;') # _isl=$(echo -en '\e]1;') # _fsl=$(echo -en '\007') # else # _tsl=$(path tput tsl 2>/dev/null || path tput -T
$TERM+sl tsl 2>/dev/null)
# _isl='' # _fsl=$(path tput fsl 2>/dev/null || path tput -T
$TERM+sl fsl 2>/dev/null)
# fi
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Carlos E. R.
-
Richmond
-
Werner Flamme