| | Run command at login/startup.
I'm finding nothing but dead ends in this department and it's making me wonder if there's a way I can actually do what is seemingly a basic task. I want to run a command at either startup or login, either one will work. How would I do it?
I see /etc/rc.local has been deprecated, so that's out. I read a little bit about some sort of a custom plist but it looked like the target was different than what I was after. I also read about a login hook, which sounds like it's the best bet so far.
The only other option that I thought MIGHT work was to create a bin/bash script, chmod +x it, and add it to "login items" for my user account under system preferences.
Is there a way to make this happen?
EDIT - seems as if I can get a work around to making it function as I had hoped. If I set the .sh script to open with terminal, it'll launch terminal and complete. It's not exactly hidden, but the terminal output simply says "process completed" with the already-launched command above it. What I had to do was create a script that I just stored in my home directory. To test I just put #!/bin/bash, then mkdir /Users/Jason/Desktop/HELLOWORLD. System preferences - accounts, login items, add script to login item (but again make sure it launches in terminal).
At any rate, this will work. But, eh... is there a quieter, more backgrounded (and less cumbersome) way to accomplish this?
There's no place like /home.