image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old March 25th, 2002, 06:13 AM
Registered User
 
Join Date: Jan 2002
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
bluehz is on a distinguished road
Strange term prompt - \s\v \u@\h \w%

I am getting a strange prompt when I boot into single-user mode. The prompt looks like this:

\s\v \u@\h \w%

I am not sure but I don't think it was like that before and I think it started appearing after switching my shell to bash. I didn't really like bash - so I am using tcsh again in the terminal, but I never deactivated/removed bash though.

Does any one know what casues this strange prompt?
Reply With Quote
  #2  
Old March 25th, 2002, 07:08 PM
LordOphidian's Avatar
Adjutant On-Line
 
Join Date: Sep 2001
Location: Mesa, Az
Posts: 354
Thanks: 0
Thanked 0 Times in 0 Posts
LordOphidian is on a distinguished road
that is the prompt string ($PS1) for BASH.

Im not sure off the top of my head what \s and \v are, but \u is user, \h is host and \w is working directory. Bash would expand those ito something like

user@host /tmp/foo%

As for what tcsh uses? I have no idea, but you could do a "grep 'PS1' /etc" in the terminal to find all ocurrances of PS1 in the config files in there.... and if any of them match that string, try commenting them out.
__________________
iMac 800 15", Mac OS X 10.3.2
Dell OptiPlex GX200, RedHat Linux (ugg) 9
Reply With Quote
  #3  
Old March 25th, 2002, 07:15 PM
LordOphidian's Avatar
Adjutant On-Line
 
Join Date: Sep 2001
Location: Mesa, Az
Posts: 354
Thanks: 0
Thanked 0 Times in 0 Posts
LordOphidian is on a distinguished road
On further inspection, it looks like tcsh doesn't even use the PS1 variable and instead uses 'prompt'. So I have no idea why its grabing bash's prompt config.
__________________
iMac 800 15", Mac OS X 10.3.2
Dell OptiPlex GX200, RedHat Linux (ugg) 9
Reply With Quote
  #4  
Old March 26th, 2002, 07:12 AM
Registered User
 
Join Date: Jan 2002
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
bluehz is on a distinguished road
I don't think tcsh is grabbing the bash profile.....the terminal is fine. I only see the strange prompt when I boot into single-user mode. Which I assume is now attempting to use BASH since I set that as the default. Prob should just back step through the process of changing bash to the default as listed at OSXHints.
Reply With Quote
  #5  
Old March 26th, 2002, 10:03 AM
nkuvu's Avatar
Gone
 
Join Date: Mar 2002
Posts: 1,566
Thanks: 0
Thanked 1 Time in 1 Post
nkuvu is on a distinguished road
You could also do a 'man bash' and wade through the manpages looking for the file in which the prompt is set.

But here's a hint: try looking in your home directory for .profile, .bashrc. and/or .login -- to show files that begin with a dot, use 'ls -a'.

If those are not there (or not the culprit) try looking in /etc for profile or bashrc (those aren't dot files -- just as is)

Oh yeah, for single user mode, find out what directory that uses to start up. An easy way would be to start up in single-user mode and enter 'pwd' to get the current working directory.
Reply With Quote
  #6  
Old March 26th, 2002, 10:16 AM
Registered User
 
Join Date: Jan 2002
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
bluehz is on a distinguished road
Cool thnx - I have lots of 'dot' files in my home dir as I have done a great deal of customizing. Not sure what each one is so I am a little leary of willy nilly deleting.
Reply With Quote
  #7  
Old March 26th, 2002, 05:51 PM
LordOphidian's Avatar
Adjutant On-Line
 
Join Date: Sep 2001
Location: Mesa, Az
Posts: 354
Thanks: 0
Thanked 0 Times in 0 Posts
LordOphidian is on a distinguished road
What shell is root using? You can find out by doing a 'nidump passwd .' in the shell.

Single user mode should only be looking at the config files in /etc/ for shell config things, so I wouldn't worry about the ones in your home directory.
__________________
iMac 800 15", Mac OS X 10.3.2
Dell OptiPlex GX200, RedHat Linux (ugg) 9
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FAQ] - Setting the UNIX shell prompt michaelsanford HOWTO & FAQs 4 March 27th, 2003 02:25 PM
A custom(izable) bash prompt PEZIUS Unix & X11 0 December 4th, 2002 04:17 AM
"Localhost#" prompt strange after 10.1.5 update bossa nova Mac OS X System & Mac Software 1 June 7th, 2002 02:12 AM


All times are GMT -5. The time now is 09:10 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.