Re: An Embarrassing Progblem

2017-01-24 Thread S. P. Molnar


On 01/23/2017 04:21 PM, Ben Caradoc-Davies wrote:

On 24/01/17 09:09, to...@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



Re: An Embarrassing Progblem

2017-01-23 Thread Ben Caradoc-Davies

On 24/01/17 09:09, to...@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 
Director
Transient Software Limited 
New Zealand



Re: An Embarrassing Progblem

2017-01-23 Thread Kent West
On Mon, Jan 23, 2017 at 2:09 PM,  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Mon, Jan 23, 2017 at 07:58:01PM +, 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


Re: An Embarrassing Progblem

2017-01-23 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Jan 23, 2017 at 07:58:01PM +, 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-



Re: An Embarrassing Progblem

2017-01-23 Thread der.hans

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

Re: An Embarrassing Progblem

2017-01-23 Thread Greg Wooledge
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.



Re: An Embarrassing Progblem

2017-01-23 Thread S. P. Molnar


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



Re: An Embarrassing Progblem

2017-01-23 Thread der.hans

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

Re: An Embarrassing Progblem

2017-01-23 Thread Ben Caradoc-Davies

On 24/01/17 07:27, S. P. Molnar wrote:

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, you can make this change permanent by appending this line to 
your ~/.bashrc :


export PS1='\u@\h > '

Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Re: An Embarrassing Progblem

2017-01-23 Thread Greg Wooledge
On Mon, Jan 23, 2017 at 01:27:05PM -0500, S. P. Molnar wrote:
> 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).

Put the PS1=... command that you want into your ~/.bashrc file, removing
any other PS1 assignments that you don't want.

Some people prefer to export PS1 in ~/.bash_profile instead of simply
assigning it in ~/.bashrc -- either way is acceptable, if it works
for you.



An Embarrassing Progblem

2017-01-23 Thread S. P. Molnar

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