Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

iTerm2 is an awesome utility and makes my interaction w/ the command line much easier. There are a lot of update commands I run on a daily basis, and thought it would be amazing if those could be launched on my user's login. I know that in order to run a script on a user login event a directory has to be created at /System/Library/StartupItems w/ the script that is wished to be run having the same name as the directory (e.g. update_sys/ The two main issues I have after this is that 1) when the commands are executed there's no terminal window to show any output, and 2) I don't know how to designate iTerm2 (or any other utility) as the primary terminal utility to run scripts. I do have iTerm2 set as the default terminal utility, however some executed scripts will still be launched in Terminal.

Any help is greatly appreciated!

(If my conceptions on how to add commands to a user login event are incorrect or if there is an easier way to do so, please let me know!)

share|improve this question

2 Answers 2

I never used iTerm (or Mac OS); but since iTerm is a terminal emulator, it is probably unsuitable to schedule tasks. On *nixiod systems login scripts are usually executed from files like ~/.profile, /etc/profile, and in shell-specific files like ~/.bashrc and /etc/bash.bashrc. You can read about them in the manual page of you shell (e. g. man 1 bash).

share|improve this answer

iTerm allows you to run those scripts interactively and as interactive sessions send output to the screen you see the results.

Many programs can also be executed as background processes.

The best way to see output is usually to manually append it to a log. If necessary using echo statements to show where and what command is being run. For the stream of output that comes from builtin command.

I think what you probably want is detailed here:

i.e. some_cmd > some_file 2>&1 & which will redirect standard output to the log file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.