Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #174364 > unrolled thread
| Started by | "S. P. Molnar" <s.molnar@sbcglobal.net> |
|---|---|
| First post | 2016-11-08 20:10 +0100 |
| Last post | 2016-11-08 21:10 +0100 |
| Articles | 9 — 4 participants |
Back to article view | Back to linux.debian.user
Strange Problem with 'alias' "S. P. Molnar" <s.molnar@sbcglobal.net> - 2016-11-08 20:10 +0100
Re: Strange Problem with 'alias' "S. P. Molnar" <s.molnar@sbcglobal.net> - 2016-11-08 20:20 +0100
Re: Strange Problem with 'alias' Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-08 20:50 +0100
Re: Strange Problem with 'alias' Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-08 21:10 +0100
Re: Strange Problem with 'alias' Michael Milliman <michael.e.milliman@gmail.com> - 2016-11-08 21:10 +0100
Re: Strange Problem with 'alias' Greg Wooledge <wooledg@eeg.ccf.org> - 2016-11-08 21:20 +0100
Re: Strange Problem with 'alias' Michael Milliman <michael.e.milliman@gmail.com> - 2016-11-08 21:40 +0100
Re: Strange Problem with 'alias' "S. P. Molnar" <s.molnar@sbcglobal.net> - 2016-11-08 22:00 +0100
Re: Strange Problem with 'alias' Henning <henning@itcfollmann.com> - 2016-11-08 21:10 +0100
| From | "S. P. Molnar" <s.molnar@sbcglobal.net> |
|---|---|
| Date | 2016-11-08 20:10 +0100 |
| Subject | Strange Problem with 'alias' |
| Message-ID | <sBjWq-53v-49@gated-at.bofh.it> |
I am running Debian v-8.5.0 with the bash shell and a number of alias's defined. For example alias l='ls -l --color' When I boot the system none of the definitions of alias in .bashrc are active. That is until I open a terminal and input source .bashrc. So far, so good alias works - in that terminal! If I open a tab in the same terminal the alias's are gone!!! I keep the system up to date. Is this fatal? NO Very annoying? YES I don't have the faintest idea as to what is going on. A solyutio to this problem, short of a new installation of the OS, will be very appreciated. Thanks in advance. -- Stephen P. Molnar, Ph.D. Life is a fuzzy set www.Molecular-Modeling.net Stochastic and multivariate (614)312-7528 (c) Skype: smolnar1
[toc] | [next] | [standalone]
| From | "S. P. Molnar" <s.molnar@sbcglobal.net> |
|---|---|
| Date | 2016-11-08 20:20 +0100 |
| Message-ID | <sBk66-57F-13@gated-at.bofh.it> |
| In reply to | #174364 |
On 11/08/2016 02:01 PM, S. P. Molnar wrote: > I am running Debian v-8.5.0 with the bash shell and a number of > alias's defined. > > For example alias l='ls -l --color' > > When I boot the system none of the definitions of alias in .bashrc are > active. That is until I open a terminal and input source .bashrc. So > far, so good alias works - in that terminal! If I open a tab in the > same terminal the alias's are gone!!! > > I keep the system up to date. > > Is this fatal? NO Very annoying? YES > > I don't have the faintest idea as to what is going on. > > A solyutio to this problem, short of a new installation of the OS, > will be very appreciated. Thanks in advance. > An addendum to the above. It would appear to be xfce5-terminal at fault. If I use UXTerm or XTermthe alias definitions are active. Reinstalling xfce4-terminal generated the messages: (synaptic:14233): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed (Reading database ... 243321 files and directories currently installed.) Preparing to unpack .../xfce4-terminal_0.6.3-1+b1_amd64.deb ... Unpacking xfce4-terminal (0.6.3-1+b1) over (0.6.3-1+b1) ... Processing triggers for gnome-menus (3.13.3-6) ... Processing triggers for desktop-file-utils (0.22-1) ... Processing triggers for mime-support (3.58) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up jre1.8.0-112 (1.8.0112-1) ... Error: unpack200 - command could not be found. Please refer to the Troubleshooting section of theInstallation Instructions on the download page. /var/lib/dpkg/info/jre1.8.0-112.postinst: line 641: /usr/sbin/alternatives: No such file or directory dpkg: error processing package jre1.8.0-112 (--configure): subprocess installed post-installation script returned error exit status 127 Setting up xfce4-terminal (0.6.3-1+b1) ... Errors were encountered while processing: jre1.8.0-112 E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up jre1.8.0-112 (1.8.0112-1) ... Error: unpack200 - command could not be found. Please refer to the Troubleshooting section of theInstallation Instructions on the download page. /var/lib/dpkg/info/jre1.8.0-112.postinst: line 641: /usr/sbin/alternatives: No such file or directory dpkg: error processing package jre1.8.0-112 (--configure): subprocess installed post-installation script returned error exit status 127 Errors were encountered while processing: jre1.8.0-112 Synaptic gives me the following message: E: jre1.8.0-112: subprocess installed post-installation script returned error exit status 127 Solution(s) please? Again, thanks in advance. -- Stephen P. Molnar, Ph.D. Life is a fuzzy set www.Molecular-Modeling.net Stochastic and multivariate (614)312-7528 (c) Skype: smolnar1
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2016-11-08 20:50 +0100 |
| Message-ID | <sBkz7-5hG-15@gated-at.bofh.it> |
| In reply to | #174366 |
On Tue, Nov 08, 2016 at 02:16:21PM -0500, S. P. Molnar wrote:
> >When I boot the system none of the definitions of alias in .bashrc are
> >active. That is until I open a terminal and input source .bashrc.
> An addendum to the above. It would appear to be xfce5-terminal at
> fault. If I use UXTerm or XTermthe alias definitions are active.
It sounds like xfce5-terminal is running a login shell, and your
~/.bash_profile (or whichever file your login shell is reading) is
not configured to source ~/.bashrc as it should be.
1) Confirm that xfce5-terminal is running a login shell by typing
this command in an xfce5-terminal window: ps -fp $$
If it's a login shell, you should see "-bash" as the CMD.
If it's a regular shell, you should see "bash" as the CMD.
2) Figure out which dot file your login shell is reading. It could be
~/.bash_profile or ~/.bash_login or ~/.profile; bash will look for
the files in that order and use the first one it finds.
3) Edit the login shell profile to source ~/.bashrc if it exists. Make
sure the profile contains code similar to this:
if [ -r ~/.bashrc ]; then
. ~/.bashrc
fi
There are some variants that will also work.
As an alternative, you could also configure xfce5-terminal to stop running
a login shell, but you still want to fix your login shell profile anyway,
because it'll be used when you run a login shell for any other reason
(e.g. ssh, or console login).
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2016-11-08 21:10 +0100 |
| Message-ID | <sBkSt-5IO-3@gated-at.bofh.it> |
| In reply to | #174364 |
On Tue, Nov 08, 2016 at 02:37:34PM -0500, Henning wrote: > Put your aliases into .bash_ptofile No, don't do that. Make your login shell profile source or dot in ~/.bashrc instead.
[toc] | [prev] | [next] | [standalone]
| From | Michael Milliman <michael.e.milliman@gmail.com> |
|---|---|
| Date | 2016-11-08 21:10 +0100 |
| Message-ID | <sBkSt-5IO-15@gated-at.bofh.it> |
| In reply to | #174375 |
On Tue, 2016-11-08 at 15:04 -0500, Greg Wooledge wrote: > On Tue, Nov 08, 2016 at 02:37:34PM -0500, Henning wrote: > > Put your aliases into .bash_ptofile > > No, don't do that. Make your login shell profile source or dot in > ~/.bashrc instead. > Ok, now I have to ask the queston, maybe a tangent and maybe not important to OP, but why is it better to source in .bashrc from .profile rather than putting the commands in .bash_profile?? -- 73s de WB5VQX
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2016-11-08 21:20 +0100 |
| Message-ID | <sBl29-5Nj-13@gated-at.bofh.it> |
| In reply to | #174376 |
On Tue, Nov 08, 2016 at 02:08:02PM -0600, Michael Milliman wrote: > On Tue, 2016-11-08 at 15:04 -0500, Greg Wooledge wrote: > > On Tue, Nov 08, 2016 at 02:37:34PM -0500, Henning wrote: > > > Put your aliases into .bash_ptofile > > > > No, don't do that. Make your login shell profile source or dot in > > ~/.bashrc instead. > > > Ok, now I have to ask the queston, maybe a tangent and maybe not > important to OP, but why is it better to source in .bashrc from .profile > rather than putting the commands in .bash_profile?? When you run a non-login shell, it reads ~/.bashrc only. So the aliases have to be there, or they won't be read at all. Putting a second copy of your aliases in ~/.bash_profile means you have to keep both copies in sync. It's silly and error-prone and wasteful of disk space.
[toc] | [prev] | [next] | [standalone]
| From | Michael Milliman <michael.e.milliman@gmail.com> |
|---|---|
| Date | 2016-11-08 21:40 +0100 |
| Message-ID | <sBllw-5TP-15@gated-at.bofh.it> |
| In reply to | #174381 |
On Tue, 2016-11-08 at 15:10 -0500, Greg Wooledge wrote: > On Tue, Nov 08, 2016 at 02:08:02PM -0600, Michael Milliman wrote: > > On Tue, 2016-11-08 at 15:04 -0500, Greg Wooledge wrote: > > > On Tue, Nov 08, 2016 at 02:37:34PM -0500, Henning wrote: > > > > Put your aliases into .bash_ptofile > > > > > > No, don't do that. Make your login shell profile source or dot in > > > ~/.bashrc instead. > > > > > Ok, now I have to ask the queston, maybe a tangent and maybe not > > important to OP, but why is it better to source in .bashrc from .profile > > rather than putting the commands in .bash_profile?? > > When you run a non-login shell, it reads ~/.bashrc only. So the aliases > have to be there, or they won't be read at all. > > Putting a second copy of your aliases in ~/.bash_profile means you have > to keep both copies in sync. It's silly and error-prone and wasteful > of disk space. > Thanks, I see that now!! Incidentally, that is how I have my system set up sourcing ~/.bashrc. I just didn't immediately see the difference. You are right, putting anything in two places like that is just asking for trouble later on down the line. -- 73s de WB5VQX
[toc] | [prev] | [next] | [standalone]
| From | "S. P. Molnar" <s.molnar@sbcglobal.net> |
|---|---|
| Date | 2016-11-08 22:00 +0100 |
| Message-ID | <sBlES-61Z-29@gated-at.bofh.it> |
| In reply to | #174375 |
On 11/08/2016 03:04 PM, Greg Wooledge wrote: > On Tue, Nov 08, 2016 at 02:37:34PM -0500, Henning wrote: >> Put your aliases into .bash_ptofile > No, don't do that. Make your login shell profile source or dot in > ~/.bashrc instead. > > Please take pity on a poor and not too bright old organic chemist who asked the original question and explain what you mean? Thanks in advance, -- Stephen P. Molnar, Ph.D. Life is a fuzzy set www.Molecular-Modeling.net Stochastic and multivariate (614)312-7528 (c) Skype: smolnar1
[toc] | [prev] | [next] | [standalone]
| From | Henning <henning@itcfollmann.com> |
|---|---|
| Date | 2016-11-08 21:10 +0100 |
| Message-ID | <sBkSt-5IO-5@gated-at.bofh.it> |
| In reply to | #174364 |
> On Nov 8, 2016, at 2:01 PM, S. P. Molnar <s.molnar@sbcglobal.net> wrote: > > I am running Debian v-8.5.0 with the bash shell and a number of alias's defined. > > For example alias l='ls -l --color' > > When I boot the system none of the definitions of alias in .bashrc are active. That is until I open a terminal and input source .bashrc. So far, so good alias works - in that terminal! If I open a tab in the same terminal the alias's are gone!!! > > I keep the system up to date. > > Is this fatal? NO Very annoying? YES > > I don't have the faintest idea as to what is going on. > > A solyutio to this problem, short of a new installation of the OS, will be very appreciated. Thanks in advance. > > There is a difference between login shell and interactive shell. Put your aliases into .bash_ptofile >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web