image
image
Ticket Options
Question Profile
DATEApr 1, 2007
TICKET#333825
STATUSClosed
SUBJECTTerminal automatically goes to mysql
CATComputers, Operating Systems, Applications or Connected Devices
TYPEOperating System Features, Bugs and Problems
DESCApple
DESC10.4.X (Tiger)
PLATFORMApple Macintosh (Intel)
MODELApple MacBook
PROC1.88Ghz
RAM2GB
DRIVE80GB
NAMEDoron
USERNAMEdoronkatz
TECHNICALLittle Experience
ISSUEStumped
Question Details
TICKET ARCHIVE -> Terminal automatically goes to mysql
doronkatz - Apr 1, 2007 - 10:21 am
image
image
The Mac Tiger terminal automatically goes onto the mysql prompt rather than the clean home prompt, when i launch terminal. How do I get it to default to the normal prompt, what is the file I look for. Is it .profile?

macbri - Apr 1, 2007 - 8:03 pm
image
image
Hi there -

The "mysql" command might be in your Terminal preferences plist file. Try this: Open a terminal, and at the "mysql>" prompt type 'exit'. Now you should have your regular terminal prompt again. At this stage, type the following command:

Code:
defaults write com.apple.Terminal "ExecutionString" ''
Now try opening a new terminal window and see if it works.
doronkatz - Apr 2, 2007 - 4:17 am
image
image
Hi thanks for your response. Firstly, when I go onto terminal and exit MySql, the terminal is also terminated, not just the MySQL prompt and htus it does not allow me to enter into normal prompt. When I click on new terminal and get a prompt, and enter defaults, its not recognised. It seems that the profile must be damaged as basic commands are not recognised.

Where would I go from here?
Thanks
macbri - Apr 2, 2007 - 8:55 pm
image
image
Try giving the full path to the "defaults" command:

Code:
/usr/bin/defaults write com.apple.Terminal "ExecutionString" ''
See if that helps any. Also can you paste the output of the following command (assuming I understand you correctly and you *can* get a shell prompt by opening a second terminal window?):

Code:
/usr/bin/cat ~/.profile
doronkatz - Apr 3, 2007 - 6:11 am
image
image
Hi mate, thanks. The first part worked, and i now can get the basic commands. As for hte second command, it states :
-bash: /usr/bin/cat: No such file or directory
I am assuming it infers, there is no .profile.

Thanks mate,
doron
macbri - Apr 3, 2007 - 6:18 am
image
image
Whoops, my mistake, it should read:

Code:
/bin/cat ~/.profile
Since we're looking anyway, can you also try:
Code:
/bin/cat ~/.bashrc
(Just in case).

doronkatz - Apr 3, 2007 - 7:29 am
image
image
Hi mate,

Thanks. yeah those two files dont exist it seems, so it may have to be recovered somehow? both commands dont work because it states that no file or directory exists.

Thanks
macbri - Apr 3, 2007 - 3:04 pm
image
image
Without those files you should at least have a basic environment... Can you post the output of the following commands to help track this down?

Code:
/usr/bin/env
/bin/cat /etc/profile
/usr/bin/defaults read com.apple.Terminal
These commands (in order) will report your overall shell environment, the contents of the "global" profile, and the full Terminal preferences. From these we should be able to narrow it down.

- Brian
doronkatz - Apr 4, 2007 - 4:39 am
image
image
DoronKatz:~ doronkatz$ /usr/bin/env
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/bash
TERM_PROGRAM_VERSION=133
USER=doronkatz
__CF_USER_TEXT_ENCODING=0x1F5:0:15
PATH=/bin:/sbin:/usr/bin:/usr/sbin
PWD=/Users/doronkatz
SHLVL=1
HOME=/Users/doronkatz
LOGNAME=doronkatz
SECURITYSESSIONID=910da0
_=/usr/bin/env


DoronKatz:~ doronkatz$ /bin/cat /etc/profile
# System-wide .profile for sh(1)

PATH="/bin:/sbin:/usr/bin:/usr/sbin"
export PATH

if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi



DoronKatz:~ doronkatz$ /usr/bin/defaults read com.apple.Terminal
{
AutoFocus = YES;
Autowrap = YES;
BackgroundImagePath = "";
Backwrap = YES;
Bell = YES;
BlinkCursor = NO;
BlinkText = YES;
CleanCommands = "rlogin;telnet;ssh;slogin";
Columns = 80;
CommandHistory = (pico);
CursorShape = 0;
CustomTitle = Terminal;
DeleteKeySendsBackspace = NO;
DisableAnsiColors = NO;
DoubleBold = YES;
DoubleColumnsForDoubleWide = NO;
DoubleWideChars = YES;
EnableDragCopy = YES;
ExecutionString = "";
FontAntialiasing = NO;
FontHeightSpacing = 1;
FontWidthSpacing = 1;
IsMiniaturized = NO;
KeyBindings = {
"$F708" = "\033[25~";
"$F709" = "\033[26~";
"$F70A" = "\033[28~";
"$F70B" = "\033[29~";
"$F70C" = "\033[31~";
"$F70D" = "\033[22~";
"$F70E" = "\033[33~";
"$F70F" = "\033[34~";
"$F729" = "\033[H";
"$F72B" = "\033[F";
"$F72C" = "\033[5~";
"$F72D" = "\033[6~";
F704 = "\033OP";
F705 = "\033OQ";
F706 = "\033OR";
F707 = "\033OS";
F708 = "\033[15~";
F709 = "\033[17~";
F70A = "\033[18~";
F70B = "\033[19~";
F70C = "\033[20~";
F70D = "\033[21~";
F70E = "\033[23~";
F70F = "\033[24~";
F710 = "\033[25~";
F711 = "\033[26~";
F712 = "\033[28~";
F713 = "\033[29~";
F714 = "\033[31~";
F715 = "\033[32~";
F716 = "\033[33~";
F717 = "\033[34~";
F728 = "\033[3~";
F729 = "scrollToBeginningOfDocument:";
F72B = "scrollToEndOfDocument:";
F72C = "scrollPageUp:";
F72D = "scrollPageDown:";
"^F702" = "\033[5D";
"^F703" = "\033[5C";
"~F704" = "\033[17~";
"~F705" = "\033[18~";
"~F706" = "\033[19~";
"~F707" = "\033[20~";
"~F708" = "\033[21~";
"~F709" = "\033[23~";
"~F70A" = "\033[24~";
"~F70B" = "\033[25~";
"~F70C" = "\033[26~";
"~F70D" = "\033[28~";
"~F70E" = "\033[29~";
"~F70F" = "\033[31~";
"~F710" = "\033[32~";
"~F711" = "\033[33~";
"~F712" = "\033[34~";
};
Meta = "-1";
NSColorPanelMode = 5;
NSColorPanelVisibleSwatchRows = 1;
NSColorPickerPageableNameListDefaults = 1Apple;
NSFixedPitchFont = Monaco;
NSFixedPitchFontSize = 10;
NSFontPanelAttributes = "1, 0";
NSFontPanelPreviewHeight = 0;
NSNavBrowserPreferedColumnContentWidth = 186;
NSNavLastRootDirectory = "~/Library/Application Support/Terminal";
NSNavPanelExpandedSizeForOpenMode = "{520, 406}";
NSNavPanelExpandedSizeForSaveMode = "{522, 501}";
"NSTableView Columns NSNavOutlineColumnSettings.v1" = (
<040b7374 7265616d 74797065 6481e803 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 1c4e534e 61764469 73706c61 794e616d 6546696c 6550726f 70657274 7986>,
241,
<040b7374 7265616d 74797065 6481e803 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 184e534e 61764d6f 64446174 6546696c 6550726f 70657274 7986>,
103
);
"NSTableView Sort Ordering NSNavOutlineColumnSettings.v1" = (
<040b7374 7265616d 74797065 6481e803 84014084 8484084e 53537472 696e6701 8484084e 534f626a 65637400 8584012b 1c4e534e 61764469 73706c61 794e616d 6546696c 6550726f 70657274 7986>,
1
);
"NSWindow Frame Inspector" = "257 321 268 435 0 0 1280 1002 ";
"NSWindow Frame NSColorPanel" = "206 232 201 309 0 0 1280 778 ";
"NSWindow Frame NSFontPanel" = "768 77 445 270 0 0 1280 1002 ";
"NSWindow Frame RunCommand" = "392 462 499 112 0 0 1280 778 ";
OptionClickToMoveCursor = NO;
PadBottom = 3;
PadLeft = 5;
PadRight = 3;
PadTop = 3;
RewrapOnResize = YES;
Rows = 24;
SaveLines = 10000;
ScrollRegionCompat = NO;
ScrollRows = 0;
Scrollback = YES;
Scrollbar = YES;
Shell = "";
ShellExitAction = 1;
StartupAction = 1;
StartupFile = "~/Library/Application Support/Terminal/default.term";
StrictEmulation = NO;
StringEncoding = 4;
TermCapString = "xterm-color";
TerminalOpaqueness = 0.6868519;
TextColors = "1.000 1.000 1.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1.000 1.000 1.000 0.666 0.666 0.666 1.000 1.000 1.000 ";
TitleBits = 76;
Translate = YES;
UseCtrlVEscapes = YES;
VisualBell = NO;
WinLocULY = 575;
WinLocX = 572;
WinLocY = 0;
WindowCloseAction = 1;
}

macbri - Apr 4, 2007 - 4:56 am
image
image
Thanks - that helps a lot. So your environment and system-wide profile look good. The only thing I see in your Terminal prefs which might affect you is the StartupFile:

/Users/doronkatz/Library/Application Support/Terminal/default.term

It might be overriding something, so try:

Code:
/usr/bin/defaults write com.apple.Terminal "StartupFile" ''
If that doesn't help, try moving the file in question out of its folder, e.g. drag it to the desktop. (/Users/doronkatz/Library/Application Support/Terminal/default.term)

If that doesn't help you might see what happens with the following commands:

Code:
which cat
/usr/bin/which cat
doronkatz - Apr 4, 2007 - 8:18 am
image
image
Thanks, it worked fine, I think we are ok with the settings, should be fine now I hope.
Hope all is good to go.
Thanks for your help mate,

IF THIS IS YOUR QUESTION AND YOU WISH TO RESPOND, LOGIN HERE FIRST.


Search Engine Friendly URLs by vBSEO 3.1.0