Re: [gentoo-user] Command Prompt question

2003-10-27 Thread Joe Stone
On Saturday 25 October 2003 17:06, Tom Hosiawa wrote:
..snip...
 Try adding this to your file right after this statement , I have it in
 mine:
 [ -f /etc/profile ]  . /etc/profile

I don't know if somebody said this already or if the problem lies somewhere 
else (to many postings in this list :-),

but if you get 
bash-2.05b$ 
in xterm, then xterm did not run the login-stuff.

if you add in  
/etc/X11/app-defaults/XTerm
the line
*VT100*loginShell: true
then xterm logins with environment.

joe


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-27 Thread Robert Crawford
On Monday 27 October 2003 9:35 am, Joe Stone wrote:
 On Saturday 25 October 2003 17:06, Tom Hosiawa wrote:
 ..snip...

  Try adding this to your file right after this statement , I have it in
  mine:
  [ -f /etc/profile ]  . /etc/profile

 I don't know if somebody said this already or if the problem lies somewhere
 else (to many postings in this list :-),

 but if you get
   bash-2.05b$
 in xterm, then xterm did not run the login-stuff.

 if you add in
   /etc/X11/app-defaults/XTerm
 the line
   *VT100*loginShell: true
 then xterm logins with environment.

 joe

People following this thread:

I was advised on the Gentoo forum to create an .Xdefaults file in /root, and 
add only this line:

XTerm*loginShell: true

Does this accomplish the same thing as joe mentions? It did solve one problem 
I had with getting x to open a prog (perl script) window from a terminal.

Robert Crawford


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-26 Thread Dennis Robertson
On Sun, 26 Oct 2003 05:20, Kai Lindenberg wrote:
 Hi Dennis,

 Am Samstag, 25. Oktober 2003 15:01 schrieb Dennis Robertson:
  This was bugging me, too, so I did what you said. All checked out
  as per your message except your changes made no difference. I
  still get the bash login. Can you help some more, please.

 yes, of course, have you changed both lines in /etc/profile?
Yes I have.
 
  Can you please send

 ---code

$ grep '$BASH' /etc/profile
if [ -n BASH ]
if [ -n BASH ]

$ grep ^Session= /usr/kde/3.1/share/config/kdm/kdmrc
Session=/etc/X11/xdm/Xsession

$ head -1 /etc/X11/xdm/Xsession
#!/bin/bash --login

$ head -1 /usr/kde/3.1/bin/startkde
#!/bin/bash

$ ls -l /bin/sh
lrwxrwxrwx 1  root root  4 Oct 19 20:30 /bin/sh - bash

Hope that helps. I'll wait for your response before trying the other useful 
and welcome suggestions.
-- 
Dennis Robertson  2/2 Sylvia Street Noosaville QLD 4566 Australia  
   
Phone: 61 7 54742343  Mobile: 0419 535539


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-26 Thread Kai Lindenberg
Hi Dennis,

Am Sonntag, 26. Oktober 2003 08:27 schrieb Dennis Robertson:

[...]

 $ head -1 /usr/kde/3.1/bin/startkde
 #!/bin/bash

try to change this back to 
#!/bin/sh --login

Although /etc/profile gets sourced by Xsession, there is something 
in the standard installation which resets PS1, all other variables 
keep their values...

Kai


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-26 Thread Patrick Börjesson
   Can you please send
 
  ---code
 
 $ grep '$BASH' /etc/profile
 if [ -n BASH ]
 if [ -n BASH ]
  ^^^ There should be a $-sign here (inside quotation-signs,
  before BASH)

 $ grep ^Session= /usr/kde/3.1/share/config/kdm/kdmrc
 Session=/etc/X11/xdm/Xsession
 
 $ head -1 /etc/X11/xdm/Xsession
 #!/bin/bash --login
 
 $ head -1 /usr/kde/3.1/bin/startkde
 #!/bin/bash
 
 $ ls -l /bin/sh
 lrwxrwxrwx 1  root root  4 Oct 19 20:30 /bin/sh -
 bash
 
 Hope that helps. I'll wait for your response before trying the other
 useful and welcome suggestions.

Patrick Börjesson

-- 
Public key id: 4C5AB0BF
Public key available at search.keyserver.net[:11371]


pgp0.pgp
Description: PGP signature


Re: [gentoo-user] Command Prompt question

2003-10-26 Thread Dennis Robertson
Hello Kai,
Thanks, but that did not work - login is still bash-2.05b$. Having read the 
bash prompt how-to on Eamon's recommendation and noting Barry's advice I'll 
use .bashrc. Thanks to all for your help.  
Dennis

On Sun, 26 Oct 2003 19:16, Kai Lindenberg wrote:
 Hi Dennis,

 Am Sonntag, 26. Oktober 2003 08:27 schrieb Dennis Robertson:

 [...]

  $ head -1 /usr/kde/3.1/bin/startkde
  #!/bin/bash

 try to change this back to
 #!/bin/sh --login

 Although /etc/profile gets sourced by Xsession, there is something
 in the standard installation which resets PS1, all other variables
 keep their values...

 Kai


 --
 [EMAIL PROTECTED] mailing list

-- 
Dennis Robertson  2/2 Sylvia Street Noosaville QLD 4566 Australia  
   
Phone: 61 7 54742343  Mobile: 0419 535539


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question (PROBLEM SOLVED)

2003-10-26 Thread Robert Crawford
Stephen,
Very interesting. I only recently added the mymachine to my /etc/hosts file 
line, as advised, and it immediately solved other problems of severe 
misconfiguration I had as shown in xsession.errors, and failure to get a gui 
for cfg-update from an xterm. Everything works fine now, so I'm not ready to 
change my entire .bashrc files in order to change the wording of the prompts, 
until I fully understand the implications.

My USER prompt is ([EMAIL PROTECTED] in green, wrc in blue):
[EMAIL PROTECTED] wrc $

My ROOT prompt is (mymachine in red, wrc in blue):
mymachine wrc #

My /etc/hostname file says only mymachine, which was what the Gentoo install 
docs said to do. My first thought was to say localhost, but I figured I'd 
better follow the Gentoo docs until I got a running system up, and had more 
experience with source based distros.

Both prompts function normally, and the red root prompt stands out (I have 
schema set to green on black), so I can live with that. I will study the new 
.bashrc file you posted, and try and undersand why it was recommended.

IIRC, the way your prompts now look is how my Mandrake prompts look (haven't 
booted to Mandrake in 2 months!- waiting for my 9.2 cd's before doing that, 
and I've been enjoying Gentoo too much anyway).

Robert


On Sunday 26 October 2003 8:36 pm, Stephen Liu wrote:
 Hi Robert and other folks,

 Problem solved now.

 Hereinunder is my solution.

 1) Replaced both
 /root/.bashrc
 and
 /home/satimis/.bashrc

 with the attached file which was found from Internet.

 2) Edited
 /etc/hostname
 localhost
 (only one word)

 3) Rebooted the PC

 On Konsole window now it displays
 ROOT
 [EMAIL PROTECTED] root]#

 USER
 [EMAIL PROTECTED] satimis]$

 All words in black colour

 Lot of thanks for your kind advice and time spent.

 B.R.
 Stephen

 Robert Crawford wrote:
 Stephen,
 What's your /etc/hosts file look like? Mine is:
 
 127.0.0.1localhost   mymachine
 
 Maybe Tom's previous post (quoted below) is what we both need in
 /etc/skel/.bashrc?
 
 [ -f /etc/profile ]  . /etc/profile
 
 However, all seems to work fine with how I have it now- I was informed on
  the Gentoo forum to do what I have done.
 
 Hmmm. just looked at my /etc/skel/.bashrc, and I forgot I had added this
  line, when I was figuring out the cfg-update replacement for Gentoo's
  etc-update. This looks relevant to what we're talking about, but it
  didn't change my xterm prompt at all.
 
 # The following is added by me to source /etc/profile
 [ -f /etc/profile ]  source /etc/profile
 
 Come to think of it, I was having trouble getting x to open an xxdiff
  window from an xterminal after put the cfg-update perl script into
  /usr/local/bin, and the author of the script advised me to add that line
  to
 /etc/skel/.bashrc, and it fixed my problem.
 
 Robert
 
 On Saturday 25 October 2003 7:51 pm, Stephen Liu wrote:
 Hi Robert and folks
 
 # echo source /etc/profile /home/satimis/.bashrc
 
 NOW becomes
  As ROOT
  mymachine root #
 
  As USER
  [EMAIL PROTECTED] satimis $
 
  How to change them to;
  As ROOT
  [EMAIL PROTECTED] root]#
 
  As USER
  [EMAIL PROTECTED] satimis]$
 
 B.R.
 Stephen
 
 Robert Crawford wrote:
 Try placing this line at the end of your ~/.bashrc file- it worked for
  me.
 
 source /etc/profile
 
 This will also show the current directory if you cd to another
  directory, instead of  just the bash-2.05b$ prompt.
 
 Robert Crawford
 
 On Saturday 25 October 2003 1:06 pm, Stephen Liu wrote:
 Hi all folks,
 
 Gentoo 1.4
 ==
 
 On KDE Konsole window
 
 As ROOT, it prompts
 mymachine root #
 
 not as
 [EMAIL PROTECTED] root]#
 
 
 As USER
 bash-2.05b$  the bash version, not as
 
 [EMAIL PROTECTED] satimis]$
 
 Kindly advise how to change them back
 
 Thanks
 
 B.R.
 Stephen Liu


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-26 Thread Dennis Robertson
On Sun, 26 Oct 2003 20:21, Patrick Börjesson wrote:
Can you please send
  
   ---code
 
  $ grep '$BASH' /etc/profile
  if [ -n BASH ]
  if [ -n BASH ]

   ^^^ There should be a $-sign here (inside quotation-signs,
   before BASH)

Sorry, my typo. 
-- 
Dennis Robertson  2/2 Sylvia Street Noosaville QLD 4566 Australia  
   
Phone: 61 7 54742343  Mobile: 0419 535539


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-26 Thread Dennis Robertson
On Sat, 25 Oct 2003 20:00, Barry Marler wrote:
 I may as well add that you'll have to re-source .bashrc, a la:

 source ~/.bashrc (or simply . ~/.bashrc).

 On Sat, 2003-10-25 at 05:55, Barry Marler wrote:
  Append
 
  PS1='\[\033[01;31m\]\h \[\033[01;34m\](\w) \$ \[\033[00m\]'
 
  to ~/.bashrc.
 
Thanks. By including [EMAIL PROTECTED] I have the prompt I want.
-- 
Dennis Robertson  2/2 Sylvia Street Noosaville QLD 4566 Australia  
   
Phone: 61 7 54742343  Mobile: 0419 535539


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-26 Thread Barry Marler
Had I read closely enough in the first place, I would have included the user element.  
Sorry!

On 10:13 Mon 27 Oct , Dennis Robertson wrote:
 On Sat, 25 Oct 2003 20:00, Barry Marler wrote:
  I may as well add that you'll have to re-source .bashrc, a la:
 
  source ~/.bashrc (or simply . ~/.bashrc).
 
  On Sat, 2003-10-25 at 05:55, Barry Marler wrote:
   Append
  
   PS1='\[\033[01;31m\]\h \[\033[01;34m\](\w) \$ \[\033[00m\]'
  
   to ~/.bashrc.
  
 Thanks. By including [EMAIL PROTECTED] I have the prompt I want.
 -- 
 Dennis Robertson  2/2 Sylvia Street Noosaville QLD 4566 Australia

 Phone: 61 7 54742343  Mobile: 0419 535539
 
 
 --
 [EMAIL PROTECTED] mailing list
 

-- 
Barry Marler
Plant Genome Mapping Laboratory
University of Georgia
Room 229, Center for Applied Genetic Technologies
111 Riverbend Rd.
Athens, GA 30602
706.583.0164 [office]
706.583.0160 [fax]
http://www.plantgenome.uga.edu

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question (PROBLEM SOLVED)

2003-10-26 Thread Stephen Liu
Hi Robert and other folks,

Problem solved now. 

Hereinunder is my solution.

1) Replaced both
/root/.bashrc
and
/home/satimis/.bashrc
with the attached file which was found from Internet.

2) Edited
/etc/hostname
localhost
(only one word)
3) Rebooted the PC

On Konsole window now it displays
ROOT
[EMAIL PROTECTED] root]#
USER
[EMAIL PROTECTED] satimis]$
All words in black colour

Lot of thanks for your kind advice and time spent.

B.R.
Stephen


Robert Crawford wrote:

Stephen,
What's your /etc/hosts file look like? Mine is:
127.0.0.1	localhost   mymachine

Maybe Tom's previous post (quoted below) is what we both need in 
/etc/skel/.bashrc?

[ -f /etc/profile ]  . /etc/profile

However, all seems to work fine with how I have it now- I was informed on the 
Gentoo forum to do what I have done.

Hmmm. just looked at my /etc/skel/.bashrc, and I forgot I had added this line, 
when I was figuring out the cfg-update replacement for Gentoo's etc-update. 
This looks relevant to what we're talking about, but it didn't change my 
xterm prompt at all.

# The following is added by me to source /etc/profile 
[ -f /etc/profile ]  source /etc/profile 

Come to think of it, I was having trouble getting x to open an xxdiff window 
from an xterminal after put the cfg-update perl script into /usr/local/bin, 
and the author of the script advised me to add that line to 
/etc/skel/.bashrc, and it fixed my problem.

Robert

On Saturday 25 October 2003 7:51 pm, Stephen Liu wrote:
 

Hi Robert and folks

# echo source /etc/profile /home/satimis/.bashrc

NOW becomes
As ROOT
mymachine root #
As USER
[EMAIL PROTECTED] satimis $
How to change them to;
As ROOT
[EMAIL PROTECTED] root]#
As USER
[EMAIL PROTECTED] satimis]$
B.R.
Stephen
Robert Crawford wrote:
   

Try placing this line at the end of your ~/.bashrc file- it worked for me.

source /etc/profile

This will also show the current directory if you cd to another directory,
instead of  just the bash-2.05b$ prompt.
Robert Crawford

On Saturday 25 October 2003 1:06 pm, Stephen Liu wrote:
 

Hi all folks,

Gentoo 1.4
==
On KDE Konsole window

As ROOT, it prompts
mymachine root #
not as
[EMAIL PROTECTED] root]#
As USER
bash-2.05b$  the bash version, not as
[EMAIL PROTECTED] satimis]$

Kindly advise how to change them back

Thanks

B.R.
Stephen Liu

# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

# by default, we want this to get set.
# Even for non-interactive, non-login shells.
if [ `id -gn` = `id -un` -a `id -u` -gt 99 ]; then
umask 002
else
umask 022
fi

# are we an interactive shell?
if [ $PS1 ]; then
if [ -x /usr/bin/tput ]; then
  if [ x`tput kbs` != x ]; then # We can't do this with dumb terminal
stty erase `tput kbs`
  elif [ -x /usr/bin/wc ]; then
if [ `tput kbs|wc -c ` -gt 0 ]; then # We can't do this with dumb terminal
  stty erase `tput kbs`
fi
  fi
fi
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='echo -ne \033]0;[EMAIL 
PROTECTED]:${PWD/#$HOME/~}\007'
fi
;;
screen)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='echo -ne [EMAIL PROTECTED]:${PWD/#$HOME/~}\033\\'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ]  
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
# Turn on checkwinsize
shopt -s checkwinsize
   [ $PS1 = \\s-\\v\\\$  ]  PS1=[EMAIL PROTECTED] \W]\\$ 
 #  PS1=[EMAIL PROTECTED] \h\033\[m \w\]\\$\[\e\[m\]  
if [ x$SHLVL != x1 ]; then # We're not a login shell
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
fi
fi
# vim:ts=4:sw=4

--
[EMAIL PROTECTED] mailing list

[gentoo-user] Command Prompt question

2003-10-25 Thread Stephen Liu
Hi all folks,

Gentoo 1.4
==
On KDE Konsole window

As ROOT, it prompts
mymachine root #
not as
[EMAIL PROTECTED] root]#
As USER
bash-2.05b$  the bash version, not as
[EMAIL PROTECTED] satimis]$

Kindly advise how to change them back

Thanks

B.R.
Stephen Liu
--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Command Prompt question

2003-10-25 Thread William Kenworthy
Nope, its not normal, you dont know what your missing!  Looks like the
gentoo env scripts (bash) arent being run on login.  Are you using a
login shell (one of the options to gnome-terminal, others should be
similar.)

BillK

On Sat, 2003-10-25 at 17:07, Paul Fraser wrote:
 Change them to what?
 
 That behaviour is normal.
 
 On Sat, Oct 25, 2003 at 05:06:09PM +, Stephen Liu wrote:
  Hi all folks,
  
  Gentoo 1.4
  ==
  
  On KDE Konsole window
  
  As ROOT, it prompts
  mymachine root #
  
  not as
  [EMAIL PROTECTED] root]#
  
  
  As USER
  bash-2.05b$  the bash version, not as
  
  [EMAIL PROTECTED] satimis]$
  
  Kindly advise how to change them back
  
  Thanks
  
  B.R.
  Stephen Liu
  
  
  --
  [EMAIL PROTECTED] mailing list
-- 
William Kenworthy [EMAIL PROTECTED]


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Paul Fraser
It isn't? It's just as my prompt looks on my Gentoo install - it's looked like that 
way for the last 8 months.

On Sat, Oct 25, 2003 at 05:23:33PM +0800, William Kenworthy wrote:
 Nope, its not normal, you dont know what your missing!  Looks like the
 gentoo env scripts (bash) arent being run on login.  Are you using a
 login shell (one of the options to gnome-terminal, others should be
 similar.)
 
 BillK
 
 On Sat, 2003-10-25 at 17:07, Paul Fraser wrote:
  Change them to what?
  
  That behaviour is normal.
  
  On Sat, Oct 25, 2003 at 05:06:09PM +, Stephen Liu wrote:
   Hi all folks,
   
   Gentoo 1.4
   ==
   
   On KDE Konsole window
   
   As ROOT, it prompts
   mymachine root #
   
   not as
   [EMAIL PROTECTED] root]#
   
   
   As USER
   bash-2.05b$  the bash version, not as
   
   [EMAIL PROTECTED] satimis]$
   
   Kindly advise how to change them back
   
   Thanks
   
   B.R.
   Stephen Liu
   
   
   --
   [EMAIL PROTECTED] mailing list
 -- 
 William Kenworthy [EMAIL PROTECTED]
 
 
 --
 [EMAIL PROTECTED] mailing list

-- 
Paul J. Fraser
[EMAIL PROTECTED]


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Stephen Liu
Hi William,

I am running only KDE without GNOME

As USER prompting  bash-2.05b$, I met this problem before on another 
distro.  A file (a hidden file) under /home/satimis/ was missing.  I 
copied the same file (also hidden file)  from /root/  to /home/satimis/ 
the problem gone.  Unfortunately I could not recall its name

As ROOT prompting mymachine root #  I am now searching around where I 
can get its name 'mymachine' changed to '[EMAIL PROTECTED]'

B.R.
Stephen
William Kenworthy wrote:

Nope, its not normal, you dont know what your missing!  Looks like the
gentoo env scripts (bash) arent being run on login.  Are you using a
login shell (one of the options to gnome-terminal, others should be
similar.)
BillK

On Sat, 2003-10-25 at 17:07, Paul Fraser wrote:
 

Change them to what?

That behaviour is normal.

On Sat, Oct 25, 2003 at 05:06:09PM +, Stephen Liu wrote:
   

Hi all folks,

Gentoo 1.4
==
On KDE Konsole window

As ROOT, it prompts
mymachine root #
not as
[EMAIL PROTECTED] root]#
As USER
bash-2.05b$  the bash version, not as
[EMAIL PROTECTED] satimis]$

Kindly advise how to change them back

Thanks

B.R.
Stephen Liu
--
[EMAIL PROTECTED] mailing list
 



--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Barry Marler
Append

PS1='\[\033[01;31m\]\h \[\033[01;34m\](\w) \$ \[\033[00m\]'

to ~/.bashrc.



On Sat, 2003-10-25 at 13:43, Stephen Liu wrote:
 Hi William,
 
 I am running only KDE without GNOME
 
 As USER prompting  bash-2.05b$, I met this problem before on another 
 distro.  A file (a hidden file) under /home/satimis/ was missing.  I 
 copied the same file (also hidden file)  from /root/  to /home/satimis/ 
 the problem gone.  Unfortunately I could not recall its name
 
 As ROOT prompting mymachine root #  I am now searching around where I 
 can get its name 'mymachine' changed to '[EMAIL PROTECTED]'
 
 B.R.
 Stephen
 
 William Kenworthy wrote:
 
 Nope, its not normal, you dont know what your missing!  Looks like the
 gentoo env scripts (bash) arent being run on login.  Are you using a
 login shell (one of the options to gnome-terminal, others should be
 similar.)
 
 BillK
 
 On Sat, 2003-10-25 at 17:07, Paul Fraser wrote:
   
 
 Change them to what?
 
 That behaviour is normal.
 
 On Sat, Oct 25, 2003 at 05:06:09PM +, Stephen Liu wrote:
 
 
 Hi all folks,
 
 Gentoo 1.4
 ==
 
 On KDE Konsole window
 
 As ROOT, it prompts
 mymachine root #
 
 not as
 [EMAIL PROTECTED] root]#
 
 
 As USER
 bash-2.05b$  the bash version, not as
 
 [EMAIL PROTECTED] satimis]$
 
 Kindly advise how to change them back
 
 Thanks
 
 B.R.
 Stephen Liu
 
 
 --
 [EMAIL PROTECTED] mailing list
   
 
 
 
 
 --
 [EMAIL PROTECTED] mailing list
-- 
Barry Marler
Plant Genome Mapping Laboratory
University of Georgia
Room 229, Center for Applied Genetic Technologies
111 Riverbend Rd.
Athens, GA 30602
706.583.0164 [office]
706.583.0160 [fax]
http://www.plantgenome.uga.edu

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Barry Marler
I may as well add that you'll have to re-source .bashrc, a la:

source ~/.bashrc (or simply . ~/.bashrc).

On Sat, 2003-10-25 at 05:55, Barry Marler wrote:
 Append
 
 PS1='\[\033[01;31m\]\h \[\033[01;34m\](\w) \$ \[\033[00m\]'
 
 to ~/.bashrc.
 
 
 
 On Sat, 2003-10-25 at 13:43, Stephen Liu wrote:
  Hi William,
  
  I am running only KDE without GNOME
  
  As USER prompting  bash-2.05b$, I met this problem before on another 
  distro.  A file (a hidden file) under /home/satimis/ was missing.  I 
  copied the same file (also hidden file)  from /root/  to /home/satimis/ 
  the problem gone.  Unfortunately I could not recall its name
  
  As ROOT prompting mymachine root #  I am now searching around where I 
  can get its name 'mymachine' changed to '[EMAIL PROTECTED]'
  
  B.R.
  Stephen
  
  William Kenworthy wrote:
  
  Nope, its not normal, you dont know what your missing!  Looks like the
  gentoo env scripts (bash) arent being run on login.  Are you using a
  login shell (one of the options to gnome-terminal, others should be
  similar.)
  
  BillK
  
  On Sat, 2003-10-25 at 17:07, Paul Fraser wrote:

  
  Change them to what?
  
  That behaviour is normal.
  
  On Sat, Oct 25, 2003 at 05:06:09PM +, Stephen Liu wrote:
  
  
  Hi all folks,
  
  Gentoo 1.4
  ==
  
  On KDE Konsole window
  
  As ROOT, it prompts
  mymachine root #
  
  not as
  [EMAIL PROTECTED] root]#
  
  
  As USER
  bash-2.05b$  the bash version, not as
  
  [EMAIL PROTECTED] satimis]$
  
  Kindly advise how to change them back
  
  Thanks
  
  B.R.
  Stephen Liu
  
  
  --
  [EMAIL PROTECTED] mailing list

  
  
  
  
  --
  [EMAIL PROTECTED] mailing list
-- 
Barry Marler
Plant Genome Mapping Laboratory
University of Georgia
Room 229, Center for Applied Genetic Technologies
111 Riverbend Rd.
Athens, GA 30602
706.583.0164 [office]
706.583.0160 [fax]
http://www.plantgenome.uga.edu

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Mike Williams
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Saturday 25 October 2003 18:06, Stephen Liu wrote:
 Hi all folks,

 Gentoo 1.4
 ==

 On KDE Konsole window

 As ROOT, it prompts
 mymachine root #

 not as
 [EMAIL PROTECTED] root]#


 As USER
 bash-2.05b$  the bash version, not as

 [EMAIL PROTECTED] satimis]$

# Source global definitions
if [ -f /etc/profile ]; then
. /etc/profile
fi

in .bashrc

- -- 
Mike Williams
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/mk0nInuLMrk7bIwRArR7AKCPGZ1qtFd8wb2wzhL3dWp4z4ChRACfdvXJ
6jxNM5O16mN9b+gAEzcXx30=
=SaX2
-END PGP SIGNATURE-

--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Kai Lindenberg
Hi Stephen,

Am Samstag, 25. Oktober 2003 19:06 schrieb Stephen Liu:

 On KDE Konsole window

 As ROOT, it prompts
 mymachine root #

 not as
 [EMAIL PROTECTED] root]#


 As USER
 bash-2.05b$  the bash version, not as

 [EMAIL PROTECTED] satimis]$

 Kindly advise how to change them back


Yes, yes, this IS a problem on gentoo. Let's examine the startup 
files, assuming you are using kdm and kde3.1. The first question 
is: what does kdm start after logging in?

---code
$ grep ^Session= /usr/kde/3.1/share/config/kdm/kdmrc
Session=/etc/X11/xdm/Xsession
---

This is the file that is invoked as user by kdm after login. Let's 
check the first line:

---code
$ head -1 /etc/X11/xdm/Xsession
#!/bin/bash --login
---

You see, bash is invoked as login shell. The first sourced file is 
/etc/profile. After reading that file, it looks for 
~/.bash_profile, ~/.bash_login, and ~/.profile, in that 
order, and reads and executes commands only from the first one that 
exists and is readable (- man bash). When you have chosen to start 
kde3.1, the next file which gets invoked is 
/usr/kde/3.1/bin/startkde (have a look in /etc/X11/xdm/Xsession).

---code
$ head -1 /usr/kde/3.1/bin/startkde
#!/bin/sh --login
$ ls -l /bin/sh
lrwxrwxrwx  1 root   root   4 2003-09-30 10:16 /bin/sh - bash
---

Now bash is invoked as sh and as login shell, too. So the 
sourced files are /etc/profile and ~/.profile only, in that 
order (- man bash).

The last thing you do is starting konsole as terminal with your 
login shell, assuming to be bash, but it is not invoked as login 
shell, so it sources only the file ~/.bashrc.

On a fresh installed gentoo, you have ~/.bash_profile and 
~/.bashrc in the users' home directories ($ ls -a /etc/skel).

So the files are sourced in this order:

/etc/profile (by Xsession), ~/.bash_profile (by Xsession), 
/etc/profile (by startkde), ~/.bashrc (by konsole)

You are interested in PS1 for setting your command prompt. This is 
set in /etc/profile, but it checks for a !dumb terminal, but bash 
has always been invoked as dumb terminal. So all you have to do is 
to change both lines

---listing /etc/profile 
if [ $TERM != 'dumb'  ]  [ -n $BASH ]
---

to

---listing /etc/profile
if [ -n $BASH ]
---

Maybe you should also remove --login from the shebang line in 
/usr/kde/3.1/bin/startkde, because whenever kde starts, the 
invoking user is already logged in. In X this should be done by 
Xsession. The login profiles are to be sourced only one time.

I hope this makes the kde startup a little bit clearer.

Kai



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Dennis Robertson
Hello Kai,
This was bugging me, too, so I did what you said. All checked out as per your 
message except your changes made no difference. I still get the bash login. 
Can you help some more, please.

On Sat, 25 Oct 2003 21:13, Kai Lindenberg wrote:
 Hi Stephen,

 Am Samstag, 25. Oktober 2003 19:06 schrieb Stephen Liu:
  On KDE Konsole window
 
  As ROOT, it prompts
  mymachine root #
 
  not as
  [EMAIL PROTECTED] root]#
 
 
  As USER
  bash-2.05b$  the bash version, not as
 
  [EMAIL PROTECTED] satimis]$
 
  Kindly advise how to change them back

 Yes, yes, this IS a problem on gentoo. Let's examine the startup
 files, assuming you are using kdm and kde3.1. The first question
 is: what does kdm start after logging in?

 ---code
 $ grep ^Session= /usr/kde/3.1/share/config/kdm/kdmrc
 Session=/etc/X11/xdm/Xsession
 ---

 This is the file that is invoked as user by kdm after login. Let's
 check the first line:

 ---code
 $ head -1 /etc/X11/xdm/Xsession
 #!/bin/bash --login
 ---

 You see, bash is invoked as login shell. The first sourced file is
 /etc/profile. After reading that file, it looks for
 ~/.bash_profile, ~/.bash_login, and ~/.profile, in that
 order, and reads and executes commands only from the first one that
 exists and is readable (- man bash). When you have chosen to start
 kde3.1, the next file which gets invoked is
 /usr/kde/3.1/bin/startkde (have a look in /etc/X11/xdm/Xsession).

 ---code
 $ head -1 /usr/kde/3.1/bin/startkde
 #!/bin/sh --login
 $ ls -l /bin/sh
 lrwxrwxrwx  1 root   root   4 2003-09-30 10:16 /bin/sh - bash
 ---

 Now bash is invoked as sh and as login shell, too. So the
 sourced files are /etc/profile and ~/.profile only, in that
 order (- man bash).

 The last thing you do is starting konsole as terminal with your
 login shell, assuming to be bash, but it is not invoked as login
 shell, so it sources only the file ~/.bashrc.

 On a fresh installed gentoo, you have ~/.bash_profile and
 ~/.bashrc in the users' home directories ($ ls -a /etc/skel).

 So the files are sourced in this order:

 /etc/profile (by Xsession), ~/.bash_profile (by Xsession),
 /etc/profile (by startkde), ~/.bashrc (by konsole)

 You are interested in PS1 for setting your command prompt. This is
 set in /etc/profile, but it checks for a !dumb terminal, but bash
 has always been invoked as dumb terminal. So all you have to do is
 to change both lines

 ---listing /etc/profile
 if [ $TERM != 'dumb'  ]  [ -n $BASH ]
 ---

 to

 ---listing /etc/profile
 if [ -n $BASH ]
 ---

 Maybe you should also remove --login from the shebang line in
 /usr/kde/3.1/bin/startkde, because whenever kde starts, the
 invoking user is already logged in. In X this should be done by
 Xsession. The login profiles are to be sourced only one time.

 I hope this makes the kde startup a little bit clearer.

 Kai



 --
 [EMAIL PROTECTED] mailing list

-- 
Dennis Robertson  2/2 Sylvia Street Noosaville QLD 4566 Australia  
   
Phone: 61 7 54742343  Mobile: 0419 535539


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Dennis Robertson
Hello Barry,
Following your advice I get:  dencar (~) $  at the prompt. The aterm titlebar 
reads: [EMAIL PROTECTED]:~ which is correct. Can you help further with the prompt 
to have it specify user dennis, please. TIA. BTW there is a script in 
~/.bashrc to change the window title of X terminals, which I assume is 
producing the titlebar entry I mentioned.

On Sat, 25 Oct 2003 20:00, Barry Marler wrote:
 I may as well add that you'll have to re-source .bashrc, a la:

 source ~/.bashrc (or simply . ~/.bashrc).

 On Sat, 2003-10-25 at 05:55, Barry Marler wrote:
  Append
 
  PS1='\[\033[01;31m\]\h \[\033[01;34m\](\w) \$ \[\033[00m\]'
 
  to ~/.bashrc.
 
  On Sat, 2003-10-25 at 13:43, Stephen Liu wrote:
   Hi William,
  
   I am running only KDE without GNOME
  
   As USER prompting  bash-2.05b$, I met this problem before on another
   distro.  A file (a hidden file) under /home/satimis/ was missing.  I
   copied the same file (also hidden file)  from /root/  to /home/satimis/
   the problem gone.  Unfortunately I could not recall its name
  
   As ROOT prompting mymachine root #  I am now searching around where I
   can get its name 'mymachine' changed to '[EMAIL PROTECTED]'
  
   B.R.
   Stephen
  
   William Kenworthy wrote:
   Nope, its not normal, you dont know what your missing!  Looks like the
   gentoo env scripts (bash) arent being run on login.  Are you using a
   login shell (one of the options to gnome-terminal, others should be
   similar.)
   
   BillK
   
   On Sat, 2003-10-25 at 17:07, Paul Fraser wrote:
   Change them to what?
   
   That behaviour is normal.
   
   On Sat, Oct 25, 2003 at 05:06:09PM +, Stephen Liu wrote:
   Hi all folks,
   
   Gentoo 1.4
   ==
   
   On KDE Konsole window
   
   As ROOT, it prompts
   mymachine root #
   
   not as
   [EMAIL PROTECTED] root]#
   
   
   As USER
   bash-2.05b$  the bash version, not as
   
   [EMAIL PROTECTED] satimis]$
   
   Kindly advise how to change them back
   
   Thanks
   
   B.R.
   Stephen Liu
   
   
   --
   [EMAIL PROTECTED] mailing list
  
   --
   [EMAIL PROTECTED] mailing list

-- 
Dennis Robertson  2/2 Sylvia Street Noosaville QLD 4566 Australia  
   
Phone: 61 7 54742343  Mobile: 0419 535539


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Peter Ruskin
On Saturday 25 Oct 2003 14:33, Dennis Robertson wrote:
 Hello Barry,
 Following your advice I get:  dencar (~) $  at the prompt. The aterm
 titlebar reads: [EMAIL PROTECTED]:~ which is correct. Can you help
 further with the prompt to have it specify user dennis, please. TIA.
 BTW there is a script in ~/.bashrc to change the window title of X
 terminals, which I assume is producing the titlebar entry I
 mentioned.

In /etc/profile:
if [ `/usr/bin/whoami` = 'root' ]
then
  # Do not set PS1 for dumb terminals
  if [ $TERM != 'dumb'  ]  [ -n $BASH ]
  then
export PS1='\[\033[01;31m\][$(/bin/date +%H:%M) [EMAIL PROTECTED] \[\033[01;34m
\]\w\[\033[01;31m\]]\n\$ \[\033[00m\]'
  fi
else
  # Do not set PS1 for dumb terminals
  if [ $TERM != 'dumb'  ]  [ -n $BASH ]
  then
export PS1='\[\033[01;32m\][$(/bin/date +%H:%M) [EMAIL PROTECTED] \[\033[01;34m
\]\w\[\033[01;32m\]]\n\$ \[\033[00m\]'
  fi
fi

Peter
-- 
==
Portage 2.0.49-r15 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 
2.4.23_pre7-gss)
i686 AMD Athlon(tm) XP 3200+
==


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Robert Crawford
Try placing this line at the end of your ~/.bashrc file- it worked for me.

source /etc/profile

This will also show the current directory if you cd to another directory, 
instead of  just the bash-2.05b$ prompt.

Robert Crawford

On Saturday 25 October 2003 1:06 pm, Stephen Liu wrote:
 Hi all folks,

 Gentoo 1.4
 ==

 On KDE Konsole window

 As ROOT, it prompts
 mymachine root #

 not as
 [EMAIL PROTECTED] root]#


 As USER
 bash-2.05b$  the bash version, not as

 [EMAIL PROTECTED] satimis]$

 Kindly advise how to change them back

 Thanks

 B.R.
 Stephen Liu


 --
 [EMAIL PROTECTED] mailing list


--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Stephen Liu
Hi Robert and folks

# echo source /etc/profile /home/satimis/.bashrc

NOW becomes
As ROOT
mymachine root #
As USER
[EMAIL PROTECTED] satimis $
How to change them to;
As ROOT
[EMAIL PROTECTED] root]#
As USER
[EMAIL PROTECTED] satimis]$
B.R.
Stephen


Robert Crawford wrote:

Try placing this line at the end of your ~/.bashrc file- it worked for me.

source /etc/profile

This will also show the current directory if you cd to another directory, 
instead of  just the bash-2.05b$ prompt.

Robert Crawford

On Saturday 25 October 2003 1:06 pm, Stephen Liu wrote:
 

Hi all folks,

Gentoo 1.4
==
On KDE Konsole window

As ROOT, it prompts
mymachine root #
not as
[EMAIL PROTECTED] root]#
As USER
bash-2.05b$  the bash version, not as
[EMAIL PROTECTED] satimis]$

Kindly advise how to change them back

Thanks

B.R.
Stephen Liu
--
[EMAIL PROTECTED] mailing list
   



--
[EMAIL PROTECTED] mailing list
 



--
[EMAIL PROTECTED] mailing list


Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Kai Lindenberg
Hi Dennis,

Am Samstag, 25. Oktober 2003 15:01 schrieb Dennis Robertson:

 This was bugging me, too, so I did what you said. All checked out
 as per your message except your changes made no difference. I
 still get the bash login. Can you help some more, please.

yes, of course, have you changed both lines in /etc/profile? Can you 
please send

---code
$ grep '$BASH' /etc/profile
$ grep ^Session= /usr/kde/3.1/share/config/kdm/kdmrc
$ head -1 /etc/X11/xdm/Xsession
$ head -1 /usr/kde/3.1/bin/startkde
$ ls -l /bin/sh
---

Kai



--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] Command Prompt question

2003-10-25 Thread Imre Solti
I deleted earlier posts in this thread so this might not be relevant, 
but if your problem is that you made changes in /etc/profile and they do 
not show up when you log into KDE for example then I found that creating 
file .bashrc in the home directory and adding line:
source /etc/profile
helped and /etc/profile changes were implemented afterwards.
Imre

Kai Lindenberg wrote:
Hi Dennis,

Am Samstag, 25. Oktober 2003 15:01 schrieb Dennis Robertson:


This was bugging me, too, so I did what you said. All checked out
as per your message except your changes made no difference. I
still get the bash login. Can you help some more, please.


yes, of course, have you changed both lines in /etc/profile? Can you 
please send

---code
$ grep '$BASH' /etc/profile
$ grep ^Session= /usr/kde/3.1/share/config/kdm/kdmrc
$ head -1 /etc/X11/xdm/Xsession
$ head -1 /usr/kde/3.1/bin/startkde
$ ls -l /bin/sh
---
Kai



--
[EMAIL PROTECTED] mailing list



--
[EMAIL PROTECTED] mailing list