I have a bash shell script that runs on login. Even though I selected the "hide" checkbox in system preferences, iTerm still shows while running it.
How do I completely hide it?
bashitermlogin-itemsmacosscript
I have a bash shell script that runs on login. Even though I selected the "hide" checkbox in system preferences, iTerm still shows while running it.
How do I completely hide it?
Best Answer
Try to run the script with launchd instead. Save a property list like this as
~/Library/LaunchAgents/some.label.plist
:The script should be run the next time you log in. Make sure the script is executable (
chmod +x /path/to/script
) and starts with an interpreter line (like#!/usr/bin/env bash
).You can also replace the
Program
key with for exampleor
See
man launchd.plist
or http://osxnotes.net/launchd.html for more information.