The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Terminal window has changed ????? URGENT (http://hintsforums.macworld.com/showthread.php?t=102241)

Germaris 06-05-2009 12:12 PM

Terminal window has changed ????? URGENT
 
HI there!

This could be a very stupid question... Please don't laugh at me!

Usually, when I opened Terminal, a window opened with some text like (I don't remember exactly) ssh#2... or/and You have mail... or/and My web address... etc, etc...

I used to enter sudo su
I was then asked for my password which I entered and then I was able to enter commands.

Now, a window opens with only the cursor and when I enter a command, nothing happens !!!!!

How can I be back to the window I used to work with?

Thanks in advance for your help"

Gerard


PS : I didn't change anything in Terminal Preferences

hayne 06-05-2009 12:23 PM

See the Terminal problems section of this Unix FAQ

tlarkin 06-05-2009 12:27 PM

Do you have a process running in the shell? Open up a new terminal window and what happens?

Germaris 06-05-2009 12:29 PM

Quote:

Originally Posted by hayne (Post 536659)
See the Terminal problems section of this Unix FAQ

I already browse this (fairly long) page and didn't find an answer to this specific question...

Thanks for replying!

Germaris 06-05-2009 12:32 PM

Quote:

Originally Posted by tlarkin (Post 536661)
Do you have a process running in the shell? Open up a new terminal window and what happens?

I don't know if a process is running...
When I enter a command (for example sudo su) nothing happens, nothing at all.
This wasn't the case "before" as I explained in my first post.

If I open a new window, it is blank with only the cursor blinking.

Thanks for your interest!

tlarkin 06-05-2009 12:56 PM

OK, just for grins have you logged in/out or restarted your computer lately? I am thinking some process is running in the shell, but that is just a guess.

You aren't bound to a directory server or anything are you? This is your stand alone machine?

Germaris 06-05-2009 01:19 PM

Quote:

Originally Posted by tlarkin (Post 536668)
OK, just for grins have you logged in/out or restarted your computer lately? I am thinking some process is running in the shell, but that is just a guess.

You aren't bound to a directory server or anything are you? This is your stand alone machine?

I deleted the preferences file of Terminal and restarted.
Everything is A-Okay.

But, as I am a newbie in Terminal I wish to learn.
How can you explain this sudden change of Terminal Window I experienced?

I'm working on a standalone machine (most recent Mac mini running 10.5.7) on which I operate my own website.

It will be great if you could give me some ways to explore to finf out what could have happenned...

Many thanks for your help!

hayne 06-05-2009 01:30 PM

Quote:

Originally Posted by Germaris (Post 536662)
I already browse this (fairly long) page and didn't find an answer to this specific question...

But I pointed you to a specific section of that document - the section about Terminal problems.

hayne 06-05-2009 01:31 PM

Quote:

Originally Posted by Germaris (Post 536670)
How can you explain this sudden change of Terminal Window I experienced?

The "Save" command in Terminal saves the current state of the application. Maybe you did a save inadvertently when something was running.

tlarkin 06-05-2009 01:34 PM

Corrupted preferences happen in OS X and it is part of the standard troubleshooting method when dealing with OS X.

How did it become corrupted? That is hard to tell and you may never know. I think it is best practice at times to not spend time and energy on why it happened rather than fix it and move on. Though the why is definitely important at times if it reoccurs.

Just remember to ALWAYS back up your data.

Germaris 06-05-2009 02:32 PM

Thank you my friends for your help!

Don't worry: I am a backup maniac.
:-)

I wish you a wonderful day.

Cheers!

Germaris 06-05-2009 02:36 PM

Quote:

Originally Posted by hayne (Post 536674)
The "Save" command in Terminal saves the current state of the application. Maybe you did a save inadvertently when something was running.

Maybe...

Hey Hayne, we're neighbors. I didn't noticed that...

_lowell 06-06-2009 12:59 AM

Quote:

Originally Posted by hayne (Post 536674)
The "Save" command in Terminal saves the current state of the application. Maybe you did a save inadvertently when something was running.

Terminal.app doesn't have a Save menu option and the command-s shortcut just exports text. There's also no save utility located anywhere in any of the folders in PATH.

I was thinking at first that something he was using in bash altered his one of his dot files, but if it got fixed by deleting the plist, definitely not. Weird; the worst part is that now that it's fixed, there's no easy way to find out what went wrong - and thus doesn't know what behavior to avoid.

Oh well.

kzzaaa 06-08-2009 11:31 PM

Here's one for you. I set up an automator action using a shell script from here to auto download the latest Chromium build. It worked fine the first time, but the second time I used it I got this:
Last login: Mon Jun 8 22:48:33 on ttys000
Setup...
Checking current version...
* your/latest build: 17731 /

404 Not Found

Not Found
The requested URL /buildbot/snapshots/sub-rel-mac//LATEST was not found on this server.

Downloading and unpacking...
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
100 1350 100 1350 0 0 20627 0 --:--:-- --:--:-- --:--:-- 659k
[chrome-mac.zip]
End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of chrome-mac.zip or chrome-mac.zip.zip, and cannot find chrome-mac.zip.ZIP, period.
Unkown error (see above for help)!

[Process completed]
The terminal just locks at this point and I cannot break whatever process is going on. Every time I open terminal it's like this. I've sent a hard reset, I've rebooted, I've tossed out the preferences, I've checked the dot files and the other stuff the terminal problems part of the faq suggests (as far as I can tell).

Does anyone have any idea how I can get out of this?

_lowell 06-10-2009 10:42 PM

Quote:

Originally Posted by kzzaaa (Post 537108)
Does anyone have any idea how I can get out of this?

Let's take a look at your Terminal login script. What we're going to do here is copy the contents of that script to your Mac's clipboard (like a command-C) then post it here in the thread.

Start by opening Terminal and typing the following:

Code:

cat ~/.bash_profile | pbcopy
cat is a UNIX tool that reads the contents of a file and prints the contents to the standard output. We want the contents to go to your Mac's clipboard, not the stdout, so we 'pipe' (|) it over to the pbcopy, or pasteboard copy, utility.

Return to this forum, press reply and paste what you've got into the text field.

hayne 06-10-2009 11:34 PM

I'd recommend running the following AppleScript in "Script Editor" - it will move all of your "dot" files to a new folder named "OldDotFiles":
Code:

do shell script "mkdir -p ~/OldDotFiles; mv ~/.??* ~/OldDotFiles"
After that, try opening a new Terminal window to see if it got fixed.
If so, the problem is in one of your dot files.

You can move your dot files back by running the following AppleScript in "Script Editor":
Code:

do shell script "mv ~/OldDotFiles/.??* ~"

Notes: the above move any files/folders whose names start with a dot and have at least 2 characters after the dot. But some of the dot files/folder might not move due to permissions - you will see an error message about them if this is the case.

_lowell 06-11-2009 12:42 AM

.
.
.
.
.
Post content cleared. kzzaaa's description of his problem isn't accurate; nothing in my original post applied to the actual problem.

tlarkin 06-11-2009 12:54 AM

Quote:

Originally Posted by _lowell (Post 537494)
crap

forgot that you don't have shell.. umm.. i threw together a quick Cocoa app for you. click the sole button to show your hidden files. we can get to your .bash_profile this way. it's located in your home directory, one level above your Documents and Downloads, etc folders.

paste the contents. if you don't have that file, look for dot files with the words bash, shell, login, profile or rc in them.

http://cocoastep.com/kzzaaa.dmg

the app only shows hidden files, nothing else; does not revert - we can worry about that after your problem is fixed.

===
if you just want to start over and don't care about preserving your old path settings and stuff, copy (not move) bashrc from /etc over to your home directory (/Users/username or ~/) and rename it .bash_profile or .bash_login; you'll need to run the hidden file tool i included above beforehand to see the files. afterwards, run in terminal:
Code:

defaults write com.apple.finder AppleShowAllFiles FALSE

You could always boot into single user mode, perhaps?

Hal Itosis 06-11-2009 01:00 AM

@ hayne & _lowell,

Apparently kzzaaa did not correctly state his case.
This line...
Quote:

Originally Posted by kzzaaa (Post 537108)
Every time I open terminal it's like this.

...should read:
"Every time I (open terminal and) RUN A PARTICULAR SCRIPT it's like this."

See this thread: Terminal fubar'd

[as such, it doesn't really fit in this thread.]

hayne 06-11-2009 01:06 AM

There's no need for resort to single-user mode or even custom Cocoa apps when a simple AppleScript will suffice to do what is wanted (e.g. the one I supplied above).

E.g. an AppleScript to show hidden files in Finder would be:
Code:

do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE"
tell application "Finder" to quit
delay 5
tell application "Finder" to activate

(Run that in "Script Editor")

hayne 06-11-2009 01:12 AM

Quote:

Originally Posted by Hal Itosis (Post 537496)
Apparently kzzaaa did not correctly state his case.
This line...

...should read:
"Every time I (open terminal and) RUN A PARTICULAR SCRIPT it's like this."

See this thread: Terminal fubar'd

Thanks for the clarification.
So it's like the old "Doctor, it hurts when I do this" joke.

_lowell 06-11-2009 01:12 AM

Quote:

Originally Posted by hayne (Post 537497)
There's no need for resort to single-user mode or even custom Cocoa apps when a simple AppleScript will suffice to do what is wanted (e.g. the one I supplied above).

E.g. an AppleScript to show hidden files in Finder would be:
Code:

do shell script "defaults write com.apple.finder AppleShowAllFiles TRUE"
tell application "Finder" to quit
delay 5
tell application "Finder" to activate

(Run that in "Script Editor")

yes, i know. i've never opened script editor; it takes all of a minute to write the method in Xcode. in my case, it was faster and easier to write him an app. i just wanted to fix his problem as painlessly as possible for him.

_lowell 06-11-2009 01:15 AM

Quote:

Originally Posted by Hal Itosis (Post 537496)
@ hayne & _lowell,

Apparently kzzaaa did not correctly state his case.
This line...

...should read:
"Every time I (open terminal and) RUN A PARTICULAR SCRIPT it's like this."

See this thread: Terminal fubar'd

[as such, it doesn't really fit in this thread.]

**facepalm**

thanks for the heads up!


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

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.