PDA

View Full Version : terminal executing a script on launch, how do i stop it?




mrjamin
May 7, 2004, 06:30 PM
Ok, for some reason terminal on my OSX 10.3.3 12" 1ghz Powerbook is misbehaving. Whenever I launch terminal, it runs:

perl -p -i -e 's#%(..)#chr(hex($1))#eg; s#/[^/]+$#/# if (not -d $_)' ~/.OpenTerminalHere; cd "`cat ~/.OpenTerminalHere`";

My terminal prefs are set to the default (it executes the default login script: /usr/bin/login), and its not set to open a saved .term file.

OpenTerminalHere is an app released by Marc Liyanage on [url=http://www.entropy.ch/software/applescript/welcome.html[/url]www.entropy.ch, which you place in finder sidebars to launch a terminal in the window you're currently in, but for some reason, terminal runs the perl script above, and sends you to /Applications/Adium.app/Contents/Resources/Emoticons (the emoticons folder on the multi-IM app, AdiumX).

Its really annoying, and very confusing! Any pointers?? I tried opening the default login script to see if there's anything interesting in there that could be the cause of the problem, but it seems to be a binary file?

MrJ

edit: ok, so i looked in the contents of ~/.OpenTerminalHere and it contained just the path to the AdiumX emoticons folder (GREAT IM client btw), so i emptied the file and it no longer goes to that folder, but it still executes the perl script. wtf?!



NuPowerbook
May 7, 2004, 06:35 PM
Check to see if ~/.profile or ~/.bash_profile is executing that. Whatever is in those two files, gets executed at logon using BaSH.

mrjamin
May 7, 2004, 06:45 PM
~/.profile doesn't exhist, but ~/bash_profile does, and that just has the term type declaration, and the path to the fink sh file (/sw/bin/init.sh). I looked it that file and it doesn't contain any relevant info.

Weirdly, the ~/.OpenTerminalHere file is back, and now contains '/', so every terminal window i open now opens at '/' - about 5 minutes ago i did launch "Open Terminal Here" in the basedir, so it seems that every time I launch terminal from OpenTerminalHere it creates that file and defaults terminal windows to open from there. Might delete the app and see what happens...

update: "open terminal here" is now deleted, but terminal still defaults to the path specified in ~/.OpenTerminalHere - deleted that to, but terminal still runs the perl script

ANOTHER UPDATE: The solution is here: http://www.entropy.ch/phpbb2/viewtopic.php?t=1069