1

is it possible to create (and put in the dock) a custom terminal window?

What I mean with "custom":

  • it should have a different name (eg. "myTerminal");
  • it should automatically start running a certain command (I'll ask if this is possible in another question);

Any help is appreciated.

  • Can you upload an image showing exactly where the "different name" will be drawn on your mac's screen? I'll answer the running a certain command as that part is quite trivial and I'm pretty sure I know what you need there. – bmike Jan 13 '16 at 17:42
  • @bmike: thanks for your kind reply. I'm not using the Mac in this moment, so I don't remember exactly when you roll over an icon in the dock if it pops out a label showing the name of the application (eventually, it is that name I need to change) – user165602 Jan 13 '16 at 17:48
1

Yes, create a .terminal or .command file with the settings you like. The contents can then be a normal shell script that sets up the terminal the way you like it. Classic .sh files work as well, but the icon is not as nice. Place you file in a directory of your choice and add it to the dock.

Once you have that part working, you can probably paste a custom icon of your choice over the file using Finder and these posts.

  • where do I find documentation about creating .terminal files? – user165602 Jan 19 '16 at 9:32
  • 1
    .terminal files are basically bash shell scripts. From bash, you can set the terminal settings. So basically, you are creating a bash script with a .terminal extension. – John Keates Jan 28 '16 at 14:46
  • I don't understand very well the difference between a .command and a .terminal – user165602 Jan 28 '16 at 19:28
0

Yes, at least to an extent. You can of course change the name of 'Terminal.app' to 'myTerminal.app' and this would change the label of the shortcut on the dock. Alternatively you could modify the 'file-label' tag inside of ~/Library/Preferences/com.apple.dock.plist though I suspect this to be a temporary change since the plist values will overwrite once the app is launched.

Your second request is much more simple to accomplish, simply enter any command you want executed when opening Terminal.app into a text file called .bash_profile inside your home directory, this file is executed every time Terminal is opened.

I'd like to also suggest an alternative solution, it sounds like your trying to create a shell script that can be launched from the dock, create a text file with any shell scripts you wanted to execute, then remove .txt and replace with .command and you have a shell script that can execute from the Finder.

You must log in to answer this question.