Separate icons for slightly different invocations

Hippo Man

Hippo Man
I'm a long-term Unix user (and this includes linux and *bsd): more than 20 years experience. Therefore, the underlying system of OS X is easy for me. However, I'm fairly inexperienced with the Mac itself, and I'm wondering if someone could point me to some documentation that describes how to accomplish the following task in OS X:

I want to have three separate instances of the Terminal app, each of which having its own startup icon. The three instances should have these characteristics:

Instance 1
- Opens a Terminal window to my current login account via the standard login shell.
- Dark grey background with white foreground.

Instance 2
- Opens a Terminal window to the root account via "sudo su -".
- Dark blue background with white foreground.

Instance 3
- Opens a Terminal window to a remote account via "ssh user@remote.com".
- Black backround with white foreground.

I do not want to have to invoke these via the Terminal application's menus; rather, I want to start each of these instances with a single mouse click via its own, separate icon in the dock.

All suggestions and pointers will be much appreciated.
 
One way would be to set up each terminal the way you want and save it as a .term file. So for example, open Terminal.app, set up window colour as blue, text as white, then File -> Save As... making sure that you select "Main Window" in the "What to save" dropdown list, and you can enter the "sudo su -" in the "When opening this file, execute this command" option. Then you can change the icon of the resulting .term file, drag it to the right side (document side) of your Dock, and voila. You could modify the base icon to get three colours which reflect your choice of background colours:

grey.pngblue.pngblack.png
 
Thank you. That works great.

But it leaves me with a new question: how do I change the icon of these resulting .term files? I'm pretty new to the Mac, and I don't know how to perform this basic task. I know that I can borrow the icons that you supplied here (much appreciated!), but where do I put them?

Thanks again.
 
There's a good thread here which talks about generating icons from images. The only thing that might not be clear is how to cut-and-paste an icon.

All you have to do is click once on your newly created icon file (assuming you use one of the methods in the thread above) and press Command-I (or from the menu File -> Get Info). On the top left of the resulting info window you'll see a small icon, you can click on that and copy it (Command-C or Edit -> Copy). Then click on your .term file, do a "Get Info" on that one, click on the icon in the top-left and paste (Command-V or Edit -> Paste). Done! :)
 
This has been working for me, but today, I noticed that I can only bring up one of these terminal sessions at a time. For example, if I double-click on the .plist file that I saved for the black terminal that does a remote connection, that terminal session comes up fine. However, if I then double-click on the .plist file for the grey terminal that does a local login, that second window doesn't come up, and all that happens is that the black one gets moved to the front.

I'm pretty sure that this used to work (i.e., that I could bring up multiple terminal windows simply by double-clicking on each of the .plist files), but I guess there's a chance that I'm mistaken. In any case, I didn't change anything in any of the .plist files.

Is there anything I can do to ensure that every time I double-click on one of those .plist files, a new terminal window comes up?

Thanks.
 
I figured out why I could bring up only a single Terminal instance: I had a virtual desktop manager running. Once I got rid of it, the problem went away. I've tried three or four virtual desktop managers, and all have "issues" under OS X. Oh well, I'll keep looking for one that actually works ...
 
Back
Top