Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Terminal suddenly acting strange. Need to fix it.

Terminal suddenly acting strange. Need to fix it.
Thread Tools
Spliff
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status: Offline
Reply With Quote
Mar 28, 2003, 08:22 PM
 
I posted this in the Unix forum but didn't get much of a response.

A couple days ago, the terminal app on my system suddenly started listing things on launch. The first time this happened, I got the following in the terminal:

sh: Blood: command not found

I restarted and now when I launch the terminal or a new shell I get this:

Last login: Fri Mar 28 16:16:46 on ttyp1
pbpaste | sh
Welcome to Darwin!
[h24-80-21-153:~] user% pbpaste | sh
[h24-80-21-153:~] user%


Why am I getting that "pbpaste | sh" upon launch? And how do I fix it?
     
Spliff  (op)
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status: Offline
Reply With Quote
Mar 28, 2003, 08:25 PM
 
Okay, this is really getting fscked up. I just opened a new shell and something different happened. I had to hit control-z just to stop the process.

Last login: Fri Mar 28 16:23:10 on ttyp1
pbpaste | sh
Welcome to Darwin!
[h24-80-21-153:~] mango% pbpaste | sh
mango ttyp1 Fri Mar 28 16:23 still logged in
user ttyp1 Fri Mar 28 16:23 - 16:23 (00:00)
user ttyp1 Fri Mar 28 16:23 - 16:23 (00:00)
user ttyp1 Fri Mar 28 16:23 - 16:23 (00:00)
user ttyp1 Fri Mar 28 16:17 - 16:23 (00:05)
user ttyp1 Fri Mar 28 16:17 - 16:17 (00:00)
user ttyp1 Fri Mar 28 16:16 - 16:17 (00:00)
user ttyp1 Fri Mar 28 16:16 - 16:16 (00:00)
user ttyp1 Fri Mar 28 16:08 - shutdown (00:02)
user ttyp1 Fri Mar 28 16:08 - 16:08 (00:00)



This just kept listing and listing until I killed it.
     
Brooks Seymore
Fresh-Faced Recruit
Join Date: Mar 2002
Status: Offline
Reply With Quote
Mar 29, 2003, 12:21 AM
 
Originally posted by Spliff:
Okay, this is really getting fscked up. I just opened a new shell and something different happened. I had to hit control-z just to stop the process.

Last login: Fri Mar 28 16:23:10 on ttyp1
pbpaste | sh
Welcome to Darwin!
[h24-80-21-153:~] mango% pbpaste | sh
Have you ever tinkered with either a .tcshrc file or an alises.mine file? I'm no Unix guru, but it certainly sounds like it.

To check the .tcshrc file, launch your Terminal and enter the following 'pico .tcshrc' from your home directory. Pico is a text editor and .tcshrc is the Unix equivalent of the Login Items preferences pane. If you see the line pbpaste | sh, delete it and you should be fine.

To check to see if its an aliases.mine file (very similar to the .tcshrc file, though I don't know the exact difference between the two items), look in the Library folder in your home directory (~/Library) for a folder named init and within that, one named tcsh. Inside that one might be a file named aliases.mine. You can open that with any text editor (BBEdit Lite, TextEdit, etc.). If pbpaste | sh is there, delete it. Quit Terminal and you should be in the clear.

If this doesn't work, check out the forums over at MacOSXHints.com. A lot of folks with a Unix background congregate there, maybe one of them can offer some further suggestions.

b.
     
Spliff  (op)
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status: Offline
Reply With Quote
Mar 29, 2003, 12:51 AM
 
Originally posted by Brooks Seymore:
Have you ever tinkered with either a .tcshrc file or an alises.mine file? I'm no Unix guru, but it certainly sounds like it.
No, never tinkered with it.

I can't find any .tcshrc file on my system.
     
Brooks Seymore
Fresh-Faced Recruit
Join Date: Mar 2002
Status: Offline
Reply With Quote
Mar 29, 2003, 02:44 AM
 
Originally posted by Spliff:
No, never tinkered with it.

I can't find any .tcshrc file on my system.
Not too surprised, .tcshrc files are generally created *by* the user or at least by someone with access to the machine.

Give Mac OS X Hints a try. Also try running a Google searche to see if anyone has had a similar problem. I find a lot of solutions that way.

B.
     
Spheric Harlot
Clinically Insane
Join Date: Nov 1999
Location: 888500128, C3, 2nd soft.
Status: Offline
Reply With Quote
Mar 29, 2003, 03:34 AM
 
I had something similar happen after I tried to make it run a script on startup.

I believe I fixed it by removing the com.apple.terminal preference file.

-s*
     
Spliff  (op)
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status: Offline
Reply With Quote
Mar 29, 2003, 03:42 AM
 
Originally posted by Spheric Harlot:
I had something similar happen after I tried to make it run a script on startup.

I believe I fixed it by removing the com.apple.terminal preference file.

-s*
Well crap. That worked. What an easy fix. Thanks Spheric.

Nice to see that the OS 9 problem with corrupt preferences has been carried over into OS X. You think Apple would've fixed that.



Slightly off-topic: is there a Windows OS equivalent to a preference file?
     
Algernnon
Forum Regular
Join Date: Jun 2002
Location: The Bog of Eternal Stench
Status: Offline
Reply With Quote
Mar 29, 2003, 03:53 AM
 
I had something similar happen as well, and as a last resort trashed the prefs. It worked. This was after days of tinkering with Unix... What I think happened, was that I ran a script while I was messing around with the window settings. When I was happy with my changes I hit the "Use Settings as Defaults" button. I think that saved the script somehow so that every time I opened a new window, it tried to run. Were you messing around with any setting in the terminal? I just wonder if my theory is correct.

I'm with stupid
---->
     
Spliff  (op)
Mac Elite
Join Date: Feb 2001
Location: Canaduh
Status: Offline
Reply With Quote
Mar 29, 2003, 04:05 AM
 
Originally posted by Algernnon:
I had something similar happen as well, and as a last resort trashed the prefs. It worked. This was after days of tinkering with Unix... What I think happened, was that I ran a script while I was messing around with the window settings. When I was happy with my changes I hit the "Use Settings as Defaults" button. I think that saved the script somehow so that every time I opened a new window, it tried to run. Were you messing around with any setting in the terminal? I just wonder if my theory is correct.
This all began when I was changing the window setting in terminal. I must've done something inadvertently without knowing it. I thought I was just changing the transparency of my terminal window.
     
Spheric Harlot
Clinically Insane
Join Date: Nov 1999
Location: 888500128, C3, 2nd soft.
Status: Offline
Reply With Quote
Mar 29, 2003, 08:24 AM
 
Originally posted by Spliff:
Well crap. That worked. What an easy fix. Thanks Spheric.

Nice to see that the OS 9 problem with corrupt preferences has been carried over into OS X. You think Apple would've fixed that.

I'd say that, as in OS 9, it's a problem with certain programs corrupting their preferences.

In contrast to you, I'm quite happy that this simple fix has carried over into OS X. (more the half-full-glass guy, I guess)

Glad to see it helped, though.

-s*
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 01:45 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,