Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
changing prompt in shells, and problem with cd mounting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Lazarus18
n00b
n00b


Joined: 01 May 2002
Posts: 38

PostPosted: Thu May 02, 2002 5:37 am    Post subject: changing prompt in shells, and problem with cd mounting Reply with quote

OK, so first off, how do I change the default behavior of the prompt for a shell?

Before I had X installed and running, the default bash prompt was a nice pretty color, and told me where I was. Now it doesn't, but that's not too important. I prefer tcsh, so how would I go about getting similar behavior for that shell? Right now it just shows > as the prompt. Oddly, if I ssh into my machine I get to see my location ~/Documents> for example.

Unrelatedly, how do I enable the CD to automount in KDE? It's not showing up on the desktop, but I have it set in fstab, correctly I think.

Thanks all. The Gentoo community is insanely helpful. Kudos all 'round.
-Rob
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Thu May 02, 2002 12:15 pm    Post subject: Re: changing prompt in shells, and problem with cd mounting Reply with quote

Lazarus18 wrote:
OK, so first off, how do I change the default behavior of the prompt for a shell?


create a .bashrc file if you don't already have one.
put the following in the file:

Code:
export PS1='\u@\h:\w\$ '


Or, muck around with the different options to get one that matches your fancy. (man bash for more info)

This, BTW, is answered in about 4 billion places on the web. :) Next time, you might try searching Google first.



Quote:
I prefer tcsh, so how would I go about getting similar behavior for that shell?


Create .tcshrc file.
Add:

Code:
set prompt = "${user} %"


Again, Google search


Quote:

Unrelatedly, how do I enable the CD to automount in KDE? It's not showing up on the desktop, but I have it set in fstab, correctly I think.


I don't automount my cdrom, so I'm not sure. However, simply changing something in /etc/fstab shouldn't be the only thing you have to do -- you need to have some sort of daemon that polls the cdrom/dvd/whatever to see if new media has been inserted. Thus, I think you want to look at automount or supermount (not sure if there are gentoo packages for those)

And, you can always try a friendly google search. :)

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
Lazarus18
n00b
n00b


Joined: 01 May 2002
Posts: 38

PostPosted: Fri May 03, 2002 5:57 am    Post subject: Reply with quote

I DID search google, and have known about .whateverrc files for awhile. The question is more about the deafult behavior for all shells, should I create a new user for example. Right now I have to put a copy of a .tcshrc in every users home dir. I'm sure there's a way to establish default behavior for all, but I don't know what file that would be. Perhaps I'm searching for the wrong things, but everything I find refers to ~/.whateverrc.

I did find a very handy util called dotfile generator, highly recommended.
Back to top
View user's profile Send private message
klieber
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 3657
Location: San Francisco, CA

PostPosted: Fri May 03, 2002 12:09 pm    Post subject: Reply with quote

Lazarus18 wrote:
The question is more about the deafult behavior for all shells, should I create a new user for example.


OK, in that case, the files you want to edit are:
  • /etc/bashrc
  • /etc/tcshrc

The syntax should be the same as your .*rc files. Note that ~/.*rc files will override anything in the /etc/*rc file -- the /etc files just provide default behavior.

hth.

--kurt
_________________
The problem with political jokes is that they get elected
Back to top
View user's profile Send private message
dArkMaGE
Apprentice
Apprentice


Joined: 20 Apr 2002
Posts: 152

PostPosted: Fri May 03, 2002 2:40 pm    Post subject: Reply with quote

you can also but .bashrc/.tcshrc and other files like that into /etc/skel and then every user you create will automatically have a ~/.tcshrc file
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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