Terminal script


 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Terminal script
# 8  
Old 11-15-2008
Could you not simply add Terminal to your Accounts login items, along with an AppleScript:

tell application "Terminal"
activate
close every window
end tell

and add to Terminal's Info.plist:

LSUIElement String 1 <- This tells Finder to hide the application's Dock icon.

I'm unsure of what order the login items launch however.
# 9  
Old 12-09-2008
I dont have a mac infront of me so I cant test but..

#!/bin/bash
open /Applications/Terminal.app &

maybe that will work, I dont know.. you can save it as a .sh file, then run chmod +x on it (I'm not sure that is even necessary, but shouldnt hurt).. then you can add it as a launchd item which I am not able to explain right now.. hopefully this info will help somewhat.

OR... just go to system prefs/accounts and add Terminal.app to your login items and check the hide box.. probably the easiest way.

Last edited by glev2005; 12-10-2008 at 06:52 PM..
# 10  
Old 01-11-2009
Look into launchd and making a launchd item that runs when your user account logs in, all you have to do is place the script where launchd looks in that user's home folder and it will execute all scripts upon log in.

I am not sure how to have it close the window from the shell, but an apple script maybe able to do that.
# 11  
Old 01-23-2009
black-eyed-dog,

One way to get the same effect without using a script is to add Terminal to your account's login items, as Ravelnze said, but specify that you want Terminal to run hidden.

Next time you log in, Terminal will start running, but no Terminal window will be visible. You even get the Terminal icon bouncing in the dock that you mentioned. When you click on the icon a window will appear.


If you are using Leopard, these are the steps -

- Log in as the user you want to change.

- Go to System Preferences. In the "System" section, select "Accounts".

- At the top of the right-hand side of the window, select "Login Items".

- Click the "+" sign near the bottom of the window to add an application.

- In the window that appears, navigate to Applications>Utilities and click on Terminal.app.

- Click the Add button.

- Terminal will appear in the list of applications. Click the check box in the "Hide" column.

Regards,
Davf
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

2. Shell Programming and Scripting

Cannot get terminal application to launch with a graphical launcher when successful in terminal

I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies

3. Shell Programming and Scripting

Run script in new terminal

Hi Guys, I have a script that runs certain simulations in batch mode. I need to schedule some simulations to run over night. For each simulation to complete it should be run in separate terminal. My script is as follows sh run_test.sh <arg1> <arg2> <arg3> ... I need to launch this... (5 Replies)
Discussion started by: aelhosiny
5 Replies

4. OS X (Apple)

Terminal Command into script

Hi All I have this script that checks to see if ntp is enabled on a machine launchctl load -w /System/Library/LaunchDaemons/org.ntp.ntpd.plist It retuns org.ntp.ntpd: Already loaded if it is loaded, is there a way to script it so that if it is loaded it does not say anything but... (2 Replies)
Discussion started by: ab52
2 Replies

5. UNIX for Dummies Questions & Answers

Gnuplot wxt terminal vs x11 terminal

Hi, I installed ubuntu recently on my pc. And I installed gnuplot as well. When I first started working with gnuplot it was working . I did a plot and when I wanted to fit my data something happened and not the default terminal of gnuplot is xwt! I changed it to: set terminal x11, but it... (0 Replies)
Discussion started by: cosmologist
0 Replies

6. OS X (Apple)

terminal script stops after script command :(.

Hello, i am trying to write a script for terminal for my mac that i may drag into the terminal and will excute the following command: script -akq Desktop/TerminalLogin/Cisco1Bob.txt telnet x.x.x.x the problem is that when i drag the text file to the terminal window the script stops after... (6 Replies)
Discussion started by: drdread
6 Replies

7. Shell Programming and Scripting

running terminal with script

suppose we have a file ab 81 and another file exec < $1 while read line do ssh root@172.16.1.$line done while running the command sh file.sh ab output display as shown Pseudo-terminal will not be allocated because stdin is not a terminal. root@172.16.1.81's password: after... (3 Replies)
Discussion started by: cdfd123
3 Replies

8. Linux

run script through terminal

for all friends i am using linux enterprise 4. i installed oracle 10g in user name oracle.at the end of install i got a pop up window saying that u should run the following scripts(root.sh,orainstRoot.sh) in terminal from root account(cui) without log out oracle account . how i can run these... (5 Replies)
Discussion started by: sadiquep
5 Replies

9. UNIX for Advanced & Expert Users

Pseudo-terminal will not be allocated because stdin is not a terminal.

I am trying to automate a SSH login using Keys using the following command ssh -i id_rsa usernamw@ipaddr. I am successful in doing this and i am getting the Warning Screen and I logon successfully. but when I am executing the command tail -1cf put.dat | ssh -i id_rsa username@ipaddr > get.dat ... (1 Reply)
Discussion started by: Shivdatta
1 Replies

10. UNIX for Advanced & Expert Users

connecting to unix through hyper terminal - as a dumb terminal

I just changed from windows NT to XP and I am no longer able to connect to my unix system. I used to use hyper terminal -- which acts as dumb terminal to my main frame unix system. I think one of the options used to be "direct to comX". This option isn't listed now. I use a serial port and the... (2 Replies)
Discussion started by: michelle
2 Replies
Login or Register to Ask a Question