Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
easy one: bash home prompt
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
!db!
Apprentice
Apprentice


Joined: 25 Nov 2003
Posts: 172
Location: A frozen, barren wasteland

PostPosted: Thu Dec 04, 2003 3:27 am    Post subject: easy one: bash home prompt Reply with quote

OK, Gentoo with KDE works fine since install over the weekend ... fiddling with it since then ...

One thing puzzles me (newbie), but I guess one single linux guru could suggest a quick fix for this one ...

When I open a 'Konsole' shell, I get the prompt

Code:
bash-2.05b$


instead of something more elegant like

Code:
studio fred #


I'm obvioulsy still in my home directory and my echo $PATH will give me a long list of /bin directories (set up by default with all the 'emerges').

If I su -, I'll get:

Code:
studio root #


If I then su fred, I'll get:

Code:
studio fred


but then if I echo $PATH, I'll only get a standard:

Code:
/usr/local/bin:/usr/bin:/bin


Where did I screw up? How do I get a default login prompt as 'fred'? (I can handle setting up my own path variables though)

Thanks in advance!
Back to top
View user's profile Send private message
venom600
n00b
n00b


Joined: 26 Nov 2003
Posts: 41

PostPosted: Thu Dec 04, 2003 5:45 am    Post subject: Reply with quote

Most terminal emulators have an option to make your shell a 'login' shell when starting the application up. I'd bet that Konsole has something similar. In xterm and rxvt the flag is '-l' . (thats a lower case 'L')

By making your shell a login shell, your profile will be sourced and any aliases, special prompts, environment variables that you normally have set in your .profile or .bash_profile will be available to you.

--Ben
Back to top
View user's profile Send private message
molecularbear
n00b
n00b


Joined: 24 Mar 2004
Posts: 22

PostPosted: Sun Mar 28, 2004 6:54 pm    Post subject: Re: easy one: bash home prompt Reply with quote

!db! wrote:
When I open a 'Konsole' shell, I get the prompt

Code:
bash-2.05b$


instead of something more elegant like

Code:
studio fred #


Make sure that you start konsole with:
Code:
konsole --ls

which makes it a login shell.
Back to top
View user's profile Send private message
tommy_fila
Guru
Guru


Joined: 19 Nov 2003
Posts: 450
Location: Phoenix, AZ

PostPosted: Sun Mar 28, 2004 9:08 pm    Post subject: Reply with quote

Check out this link. It will provide you with all the necessary details!

http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/
_________________
"What goes on in life, that goes for eternity."
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Mon Mar 29, 2004 5:18 am    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum