Sponsored Content
Full Discussion: close a mac terminal
Top Forums UNIX for Advanced & Expert Users close a mac terminal Post 302583748 by xbin on Wednesday 21st of December 2011 07:56:51 AM
Old 12-21-2011
If you are trying to close a Terminal window then configure the Terminal preferences: Settings > Shell . Set "When the shell exits:" to "Close the window" and "Prompt before closing" to "Never". When you type "exit" the window will close.

If you want to quit the Terminal application then configure the preferences as above and use this command->
Code:
osascript -e 'tell application "Terminal" to quit'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mac OS X/UNIX/Terminal Question

Hey everyone I'm new to UNIX due to the new Mac OS X operating system and would like some help. I'm trying to send an email via the UNIX-Shell-Terminal i Mac OS X, (it's called darwin) How do I do that? When I enter the Command mail I can send messages to root and with the command -forward... (4 Replies)
Discussion started by: onkel
4 Replies

2. OS X (Apple)

New to Mac OS X Terminal

Hi everyone. I'm new to using the Terminal and was just wondering if anyone had a link to perhaps a list of commands. And tips on some useful websites to visit or books to read. Oh and is there a way to delete just part of the Terminal's history? If so what is the command? Thanks :) (2 Replies)
Discussion started by: xsemperidem5
2 Replies

3. UNIX for Dummies Questions & Answers

How to create new users on my mac from the terminal

I finally got how to su - in my mac from the terminal. Now I would like to be able to add new users. useradd -m -d ..... doesn't seem to work. (1 Reply)
Discussion started by: bigmac18
1 Replies

4. AIX

User cant log in (close terminal)

Hello everyone I have a user on my server, Aix 5.3 TL9 sp4. Weeks ago I dont have a problem but today the user cannot log in. let me explain. Me with root user I can change his password. then I log in with the user and I can change the password and the terminal close. Im using ssh. But... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

5. Shell Programming and Scripting

How to checkout from SVN using Terminal in Mac OS X?

Hi, I am new for SVN. Earlier I have been using CVS. When I checkout the code from SVN using Eclipse, the size of the source code checked out is 612MB. But when I try to checkout from terminal, from my 5.8 branch , the checked out source code's size is only 312.1 MB. Can anyone tell me... (0 Replies)
Discussion started by: Afreen
0 Replies

6. Shell Programming and Scripting

script does not close terminal after running

For a small script i want it so that the terminal closes when the script has completed its tasks. To do so i use at the end if the script the following: echo "Hello, World!" echo "Knowledge is power." echo "" echo "shutting down terminal in 10 seconds" exit 10 however the terminal stay's... (3 Replies)
Discussion started by: Ditzyken
3 Replies

7. UNIX for Advanced & Expert Users

Close UNIX terminal

Hi, In one of the circumstances, my manager asked my password and opened unix terminal (Putty) with my user credentials. Its been more than 2 days that terminal is opened (saw it through finger command). How do I close that terminal which is not opened in my pc. I'm very uncomfortable of the... (11 Replies)
Discussion started by: bobbygsk
11 Replies

8. OS X (Apple)

The Terminal on Mac: Coding

So found this C code online and need to compile it in Terminal on Mac. Here is the code: #include <stdio.h> #include <math.h> int option; char q; int number; int currentsum; int value; void calc() { printf("\t\t\t\t\tBegin\n"); // says begin in top middle of screen ... (3 Replies)
Discussion started by: 1negroup
3 Replies

9. Open Source

The Terminal on Mac OS X

Does anyone know the differences in commands when it come to Linux and Mac OS X? I'm wanting to know if I use "this" command in Linux and It doesn't work in Mac then what command is equivalent to the one in Linux. Example Ctrl+Alt+f2 switches to (tty2) so what equivalent switches to ttys2 on Mac? (13 Replies)
Discussion started by: 1negroup
13 Replies

10. Shell Programming and Scripting

Terminal running bash/rsync script does not close with exit (MacOS High SIerra)

Hello, I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using, #!/bin/bash # main backup location, trailing slash included backup_loc="/Volumes/Archive_Volume/00_macos_backup/" # generic backup function function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies
SCF_Session_close(3SMARTCARD)				    Smartcard Library Functions 			     SCF_Session_close(3SMARTCARD)

NAME
SCF_Session_close, SCF_Terminal_close, SCF_Card_close - close a smartcard session, terminal, or card SYNOPSIS
cc [ flag... ] file... -lsmartcard [ library...] #include <smartcard/scf.h> SCF_Status_t SCF_Session_close(SCF_Session_t session); SCF_Status_t SCF_Terminal_close(SCF_Terminal_t terminal); SCF_Status_t SCF_Card_close(SCF_Card_t card); PARAMETERS
card An object that was returned from SCF_Terminal_getCard(3SMARTCARD) session An object that was returned from SCF_Session_getSession(3SMARTCARD) terminal An object that was returned from SCF_Session_getTerminal(3SMARTCARD) DESCRIPTION
These functions release the resources (memory, threads, and others) that were allocated within the library when the session, terminal, or card was opened. Any storage allocated by calls to SCF_Session_getInfo(3SMARTCARD), SCF_Terminal_getInfo(3SMARTCARD), or SCF_Card_get- Info(3SMARTCARD) is deallocated when the associated object is closed. Attempts to access results from these interfaces after the object has been closed results in undefined behavior. If a card that was locked by SCF_Card_lock(3SMARTCARD) is closed, the lock is automatically released. When a terminal is closed, any event listeners on that terminal object are removed and any cards that were obtained with the terminal are closed. Similarly, closing a session will close any terminals or cards obtained with that session. These are the only cases where the library will automatically perform a close. Once closed, a session, terminal, or card object can no longer be used by an SCF function. Any attempt to do so results in an SCF_STA- TUS_BADHANDLE error. The sole exception is that closing an object, even if already closed, is always a successful operation. RETURN VALUES
Closing a handle is always a successful operation that returns SCF_STATUS_SUCCESS. The library can safely detect handles that are invalid or already closed. EXAMPLES
Example 1: Close each object explicitly. SCF_Status_t status; SCF_Session_t mySession; SCF_Terminal_t myTerminal; SCF_Card_t myCard; status = SCF_Session_getSession(&mySession); if (status != SCF_STATUS_SUCCESS) exit(1); status = SCF_Session_getTerminal(mySession, NULL, &myTerminal); if (status != SCF_STATUS_SUCCESS) exit(1); status = SCF_Terminal_getCard(myTerminal, &myCard); if (status != SCF_STATUS_SUCCESS) exit(1); /* (Do interesting things with smartcard...) */ SCF_Card_close(myCard); SCF_Terminal_close(myTerminal); SCF_Session_close(mySession); Example 2: Allow the library to close objects. SCF_Status_t status; SCF_Session_t mySession; SCF_Terminal_t myTerminal; SCF_Card_t myCard; status = SCF_Session_getSession(&mySession); if (status != SCF_STATUS_SUCCESS) exit(1); status = SCF_Session_getTerminal(mySession, NULL, &myTerminal); if (status != SCF_STATUS_SUCCESS) exit(1); status = SCF_Terminal_getCard(myTerminal, &myCard); if (status != SCF_STATUS_SUCCESS) exit(1); /* (Do interesting things with smartcard...) */ SCF_Session_close(mySession); /* myTerminal and myCard have been closed by the library. */ ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
libsmartcard(3LIB), SCF_Card_getInfo(3SMARTCARD), SCF_Card_lock(3SMARTCARD), SCF_Session_getInfo(3SMARTCARD), SCF_Session_getSes- sion(3SMARTCARD), SCF_Session_getTerminal(3SMARTCARD), SCF_Terminal_getCard(3SMARTCARD), SCF_Terminal_getInfo(3SMARTCARD), attributes(5) SunOS 5.10 14 May 2002 SCF_Session_close(3SMARTCARD)
All times are GMT -4. The time now is 11:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy