Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal Commands don't run "commands" on startup

I have numerous "profiles" in the Terminal application for different systems and scenarios. Each one runs a different "shell command" on startup based on the system to which I want to connect. This works perfectly when you launch a new shell in a new window based on the specific profile using the GUI. If you do Shift-Command-N and type in the profile it does not. It will launch the profile, but it appears that you only get a new window with the custom colors, not the shell command (from the startup box on the shell tab).


It would be nice if the entire profile was run. This would be the only way I know of to launch a profile from the command line without having to use a mouse/trackpad. If there is another way, please post it here!


Thanks,

Posted on Sep 4, 2012 1:33 PM

Reply
2 replies

Sep 5, 2012 7:35 AM in response to loatswil

I'm not entirely certain what you're up to.


I usually load the colors and such from the login in the remote system, if that's what you're up to. The production servers all load red text in their login scripts, for instance.


I also use a locally-written tool that sets up the context for the remote system; a wrapper around the ssh, et al.


The sequence of initialization files in Terminal.app is documented (somewhere); some scripts only run when Terminal.app first starts, some (or one) of the other files are invoked when a new tab is created.

Sep 5, 2012 7:58 AM in response to MrHoffman

I realize my situation is fairly unique so I'll try to be more descriptive =)


In the Application "terminal" when I click "Shell->New Command..." (or use the key shortcut Shift-Command-N) and type in the name of a saved "profile" it appears to only use only some of the settings from that profile. The text color is used but the "command" from the "shell" tab is NOT used. I haven't gone through each tab or setting to verify what is and what isn't used but I am sure of those two.


Since the colors from the profile are used, I am assuming the entire profile would be used. But that doesn't appear to be the case. I'm not sure if that's intentional or not.


I like the idea of changing the local server settings but that's not really my job. I'll bring in up some time though =)

Terminal Commands don't run "commands" on startup

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.