Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create dock icon for running terminal command in Mac OS

Now I open jmeter using terminal using command: open /usr/local/bin/jmeter

I need it frequently, so I want to create dock icon to run this command.

How can I do it?

I tried to make a right click and choose 'keep in dock' option. However, it disappears when I close the application.

like image 373
Jacob Avatar asked Sep 25 '17 04:09

Jacob


1 Answers

The closest I could get was creating a desktop icon through the following method:

  1. Create a plain text document in TextEdit
  2. Paste the following code in the document

    #!/bin/bash open /usr/local/bin/jmeter

  3. Save the file as fileName.command

  4. Open Terminal and navigate to the directory which you saved the file

  5. Type in chmod +x fileName.command and hit enter

You should now have a shortcut to execute this command! I know this isn't the exact solution you were looking for, but I hope this still solves your problem.

like image 63
Ethan Zimbelman Avatar answered Sep 19 '22 18:09

Ethan Zimbelman