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 > Mac OS X > Exiting Terminal

Exiting Terminal
Thread Tools
Dedicated MacNNer
Join Date: Apr 2002
Location: Chicago
Status: Offline
Reply With Quote
Apr 30, 2003, 11:20 AM
 
The way I have it setup now is when I type exit in the terminal, it closes the active window but the application is still open. Is there any way to change the preferences so when I type exit it exits the entire app like it would do in UNIX or Linux? I looked at the settings and there was nothing there so I am wondering if any of you guys was able to do this?
     
Mac Elite
Join Date: May 2002
Status: Offline
Reply With Quote
Apr 30, 2003, 12:18 PM
 
You could try adding "killall Terminal" to your .logout...
[vash:~] banana% killall killall
Terminated
     
MrNo  (op)
Dedicated MacNNer
Join Date: Apr 2002
Location: Chicago
Status: Offline
Reply With Quote
Apr 30, 2003, 12:57 PM
 
All right but where is .logout located. The only file I was able to find was /private/etc/csh.logout
     
Senior User
Join Date: Nov 2002
Location: San Francisco Bay Area
Status: Offline
Reply With Quote
Apr 30, 2003, 02:32 PM
 
Originally posted by MrNo:
All right but where is .logout located. The only file I was able to find was /private/etc/csh.logout
You should create a .logout file and stick it in your home directory.
Use something simple like pico to do it.


To choose doubt as a philosophy of life is akin to choosing immobility as a means of transportation.
     
MrNo  (op)
Dedicated MacNNer
Join Date: Apr 2002
Location: Chicago
Status: Offline
Reply With Quote
Apr 30, 2003, 03:31 PM
 
sweet, that worked perfectly
tnx guys
     
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status: Offline
Reply With Quote
May 1, 2003, 07:58 AM
 
I think this command may be more graceful than killall, as it achieves the exact same effect as choosing "Quit Terminal" from the Terminal application menu:
osascript -e 'tell application "Terminal.app" to quit'
     
Dedicated MacNNer
Join Date: Dec 2002
Location: someplace
Status: Offline
Reply With Quote
May 1, 2003, 08:05 AM
 
Oh, and you may want to run a check to make sure it's Apple's terminal that's running (and not iTerm, an X11 terminal, or a remote SSH login):
Code:
if ("$TERM_PROGRAM" == "Apple_Terminal") then osascript -e 'tell application "Terminal.app" to quit' endif
     
   
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:55 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2