Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #176945 > unrolled thread

An Embarrassing Progblem

Started by"S. P. Molnar" <s.molnar@sbcglobal.net>
First post2017-01-23 19:40 +0100
Last post2017-01-24 13:00 +0100
Articles 9 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  An Embarrassing Progblem "S. P. Molnar" <s.molnar@sbcglobal.net> - 2017-01-23 19:40 +0100
    Re: An Embarrassing Progblem "der.hans" <deb-user@LuftHans.com> - 2017-01-23 19:50 +0100
      Re: An Embarrassing Progblem "S. P. Molnar" <s.molnar@sbcglobal.net> - 2017-01-23 20:50 +0100
        Re: An Embarrassing Progblem Greg Wooledge <wooledg@eeg.ccf.org> - 2017-01-23 21:00 +0100
        Re: An Embarrassing Progblem "der.hans" <deb-user@LuftHans.com> - 2017-01-23 21:00 +0100
          Re: An Embarrassing Progblem Kent West <westk@acu.edu> - 2017-01-23 21:20 +0100
          Re: An Embarrassing Progblem <tomas@tuxteam.de> - 2017-01-23 21:20 +0100
            Re: An Embarrassing Progblem Ben Caradoc-Davies <ben@transient.nz> - 2017-01-23 22:30 +0100
              Re: An Embarrassing Progblem "S. P. Molnar" <s.molnar@sbcglobal.net> - 2017-01-24 13:00 +0100

#176945 — An Embarrassing Progblem

From"S. P. Molnar" <s.molnar@sbcglobal.net>
Date2017-01-23 19:40 +0100
SubjectAn Embarrassing Progblem
Message-ID<t2RH5-1v8-27@gated-at.bofh.it>
I'm embarrassed to admit it. but I am completely confused.

Somehow, I don't know how I managed to reset my bash user prompt. Rather 
than the default user prompt '\u@h >', it has morphed to (p4env).

I have found plenty of Google results about correcting thei promled, 
and, indeed export PS1='\u@\h > ' restores the prompt - that is, until I 
close that terminal.  The next time I open a terminal the prompt is back 
to (p4env).

For my sanity, I can]t seem to figure out where and how to make the 
change permanent.

As I said, I'm very embarrassed about this and really need help.

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]


#176946

From"der.hans" <deb-user@LuftHans.com>
Date2017-01-23 19:50 +0100
Message-ID<t2RQJ-1wu-5@gated-at.bofh.it>
In reply to#176945

[Multipart message — attachments visible in raw view] — view raw

Am 23. Jan, 2017 schwätzte S. P. Molnar so:

moin moin Stephen,

check for PS1 in ~/.bashrc, ~/.bash_profile and ~/.profile.

grep PS1 ~/.bashrc ~/.bash_profile ~/.profile

If you don't find it that way, check to see if any of those include
another rc file.

You can set PS1 at the bottom of ~/.bashrc, but you probably want to find
out why it's getting messed up.

ciao,

der.hans

> I'm embarrassed to admit it. but I am completely confused.
>
> Somehow, I don't know how I managed to reset my bash user prompt. Rather than 
> the default user prompt '\u@h >', it has morphed to (p4env).
>
> I have found plenty of Google results about correcting thei promled, and, 
> indeed export PS1='\u@\h > ' restores the prompt - that is, until I close 
> that terminal.  The next time I open a terminal the prompt is back to 
> (p4env).
>
> For my sanity, I can]t seem to figure out where and how to make the change 
> permanent.
>
> As I said, I'm very embarrassed about this and really need help.
>
> Thanks in advance,
>
>

-- 
#  http://www.LuftHans.com/        http://www.PhxLinux.org/
#  Your email is being read by hundreds of uptight agents
#  who never saw the humor in Dr. Strangelove. -- Mark Russell

[toc] | [prev] | [next] | [standalone]


#176948

From"S. P. Molnar" <s.molnar@sbcglobal.net>
Date2017-01-23 20:50 +0100
Message-ID<t2SMO-26Q-15@gated-at.bofh.it>
In reply to#176946
On 01/23/2017 01:38 PM, der.hans wrote:
> grep PS1 ~/.bashrc ~/.bash_profile ~/.profile

Thanks for the answers.

I thought that i had the solution.  Grep showed me that ps1 was only in 
.bashrc.  After making a copy of .bashrc I removed the entire if ... fi 
section that contained PS1.

I added PS1="\u@\h >" to the end of .bashrc and sourced the file -  it 
worked, in that terminal.  However, if I open a new terminal (I'm using 
xfce4-terminal) the prompt is back to the corrupted one!

Rebooting the computer doesn't solve the problem.

I have initiated a search of the entire file system for PS1= , although 
I suspecct it take a while.

-- 
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]


#176949

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2017-01-23 21:00 +0100
Message-ID<t2SWt-2b0-3@gated-at.bofh.it>
In reply to#176948
On Mon, Jan 23, 2017 at 02:43:12PM -0500, S. P. Molnar wrote:
> I added PS1="\u@\h >" to the end of .bashrc and sourced the file -  it 
> worked, in that terminal.  However, if I open a new terminal (I'm using 
> xfce4-terminal) the prompt is back to the corrupted one!

Normally when you open a terminal, it *should* run a non-login shell.
If your account's shell is bash, then the non-login shell will read
~/.bashrc.

However, some people configure their window managers to run a login
shell when they open a terminal.  In that case, if your account's
shell is bash, the login shell will read ~/.bash_profile which in
turn *should* be configured to read ~/.bashrc.

So, make sure ~/.bash_profile or ~/.profile sources or dots in
~/.bashrc.  Debian's default ~/.profile does so, but if you created
a ~/.bash_profile, that overrides ~/.profile, so you'd have to check
your own work.

> Rebooting the computer doesn't solve the problem.

Not a surprise.

> I have initiated a search of the entire file system for PS1= , although 
> I suspecct it take a while.

You said the new prompt has p4 in it, which makes me suspect that you
have installed something (like, say, p4) which modified your ~/.bashrc
to change the prompt.  Or it might have modified /etc/bash.bashrc which
Debian's bash also uses.  It's worth looking at it.

[toc] | [prev] | [next] | [standalone]


#176950

From"der.hans" <deb-user@LuftHans.com>
Date2017-01-23 21:00 +0100
Message-ID<t2SWu-2b0-17@gated-at.bofh.it>
In reply to#176948

[Multipart message — attachments visible in raw view] — view raw

Am 23. Jan, 2017 schwätzte S. P. Molnar so:

moin moin Stephen,

>
> On 01/23/2017 01:38 PM, der.hans wrote:
>> grep PS1 ~/.bashrc ~/.bash_profile ~/.profile
>
> Thanks for the answers.
>
> I thought that i had the solution.  Grep showed me that ps1 was only in 
> .bashrc.  After making a copy of .bashrc I removed the entire if ... fi 
> section that contained PS1.
>
> I added PS1="\u@\h >" to the end of .bashrc and sourced the file -  it 
> worked, in that terminal.  However, if I open a new terminal (I'm using 
> xfce4-terminal) the prompt is back to the corrupted one!

Ah, xfce might have a(n annoying) default setting. KDE had a similar
problem for a while. If so searching your home dir for the change won't
help as the default was either in a system config file or baked into the
binaries.

Perhaps search online for setting xfce environment variables.

I forget exactly what I had to do with KDE before, but it was a
configuration change to fix the default behavior.

ciao,

der.hans

> Rebooting the computer doesn't solve the problem.
>
> I have initiated a search of the entire file system for PS1= , although I 
> suspecct it take a while.

-- 
#  http://www.LuftHans.com/        http://www.PhxLinux.org/
#  C'est la Net - der.hans

[toc] | [prev] | [next] | [standalone]


#176952

FromKent West <westk@acu.edu>
Date2017-01-23 21:20 +0100
Message-ID<t2TfP-2xn-1@gated-at.bofh.it>
In reply to#176950

[Multipart message — attachments visible in raw view] — view raw

On Mon, Jan 23, 2017 at 2:09 PM, <tomas@tuxteam.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Mon, Jan 23, 2017 at 07:58:01PM +0000, der.hans wrote:
> > Am 23. Jan, 2017 schwätzte S. P. Molnar so:
> >
> > moin moin Stephen,
> >
> > >
> > >On 01/23/2017 01:38 PM, der.hans wrote:
> > >>grep PS1 ~/.bashrc ~/.bash_profile ~/.profile
> > >
> > >Thanks for the answers.
> > >
> > >I thought that i had the solution.  Grep showed me that ps1 was
> > >only in .bashrc.  After making a copy of .bashrc I removed the
> > >entire if ... fi section that contained PS1.
> > >
> > >I added PS1="\u@\h >" to the end of .bashrc and sourced the file -
> > >it worked, in that terminal.  However, if I open a new terminal
> > >(I'm using xfce4-terminal) the prompt is back to the corrupted
> > >one!
> >
> > Ah, xfce might have a(n annoying) default setting. KDE had a similar
> > problem for a while. If so searching your home dir for the change won't
> > help as the default was either in a system config file or baked into the
> > binaries.
>
>
>
>
XFCE has a menu shell option:

Menu -> Edit -> Preferences -> General Tab -> “Run command as login shell”

that as I understand it, if clicked, causes XFCE shells to bypass .bashrc
in favor of .bash_profile.

But my understanding is not to be trusted; I found this info at
http://www.rebrik.info/blog/?p=74

-- 
Kent


-- 
Kent West                    <")))><
Westing Peacefully - http://kentwest.blogspot.com

[toc] | [prev] | [next] | [standalone]


#176953

From<tomas@tuxteam.de>
Date2017-01-23 21:20 +0100
Message-ID<t2TfP-2xn-3@gated-at.bofh.it>
In reply to#176950
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jan 23, 2017 at 07:58:01PM +0000, der.hans wrote:
> Am 23. Jan, 2017 schwätzte S. P. Molnar so:
> 
> moin moin Stephen,
> 
> >
> >On 01/23/2017 01:38 PM, der.hans wrote:
> >>grep PS1 ~/.bashrc ~/.bash_profile ~/.profile
> >
> >Thanks for the answers.
> >
> >I thought that i had the solution.  Grep showed me that ps1 was
> >only in .bashrc.  After making a copy of .bashrc I removed the
> >entire if ... fi section that contained PS1.
> >
> >I added PS1="\u@\h >" to the end of .bashrc and sourced the file -
> >it worked, in that terminal.  However, if I open a new terminal
> >(I'm using xfce4-terminal) the prompt is back to the corrupted
> >one!
> 
> Ah, xfce might have a(n annoying) default setting. KDE had a similar
> problem for a while. If so searching your home dir for the change won't
> help as the default was either in a system config file or baked into the
> binaries.

There should be a session file somewhere in ~/.config (sorry I have no
more details). Perhaps XFCE honors ~/.xinitrc, ~/.xsessionrc or some
of their siblings.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAliGYwQACgkQBcgs9XrR2kZisQCfZIPhoC6R9bsEGk6LUfmDQ3aE
y/0AnjeKHrkLeAF2MN0Bwb7mQtv8xk4u
=cLav
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#176954

FromBen Caradoc-Davies <ben@transient.nz>
Date2017-01-23 22:30 +0100
Message-ID<t2UlA-3fA-17@gated-at.bofh.it>
In reply to#176953
On 24/01/17 09:09, tomas@tuxteam.de wrote:
> There should be a session file somewhere in ~/.config (sorry I have no
> more details). Perhaps XFCE honors ~/.xinitrc, ~/.xsessionrc or some
> of their siblings.

I use ~/.config/xfce4/xinitrc to set environment variables before XFCE 
starts:

#!/bin/sh
# ...
# settings needed before xfce start
export PATH=$HOME/bin:$PATH
export LC_COLLATE=C
# ...
# last line:
. /etc/xdg/xfce4/xinitrc

Stephen, as mentioned earlier, the prompt should be settable in 
~/.bashrc *if* it is sourced by ~/.bash_profile or ~/.profile so the 
more likely solution is to check that these files are not damaged.

Also check that the shell really is bash and not something else:

echo $BASH_VERSION
echo $SHELL

Kind regards,

-- 
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

[toc] | [prev] | [next] | [standalone]


#176968

From"S. P. Molnar" <s.molnar@sbcglobal.net>
Date2017-01-24 13:00 +0100
Message-ID<t37Vv-3Pu-1@gated-at.bofh.it>
In reply to#176954
On 01/23/2017 04:21 PM, Ben Caradoc-Davies wrote:
> On 24/01/17 09:09, tomas@tuxteam.de wrote:
>> There should be a session file somewhere in ~/.config (sorry I have no
>> more details). Perhaps XFCE honors ~/.xinitrc, ~/.xsessionrc or some
>> of their siblings.
>
> I use ~/.config/xfce4/xinitrc to set environment variables before XFCE 
> starts:
>
> #!/bin/sh
> # ...
> # settings needed before xfce start
> export PATH=$HOME/bin:$PATH
> export LC_COLLATE=C
> # ...
> # last line:
> . /etc/xdg/xfce4/xinitrc
>
> Stephen, as mentioned earlier, the prompt should be settable in 
> ~/.bashrc *if* it is sourced by ~/.bash_profile or ~/.profile so the 
> more likely solution is to check that these files are not damaged.
>
> Also check that the shell really is bash and not something else:
>
> echo $BASH_VERSION
> echo $SHELL
>
> Kind regards,
>
Problem solved.  I finally rooted out the problem.  It was in /bash_profile.

Thanks to all that helped.

-- 
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] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web