3

I'm using ssh extensively and I want to be able to click on a button on the OS X menubar that opens the Terminal and does:

ssh -p myport myserver

Such that I only have to type in my password, and keeps the terminal open until I exit the terminal.

3 Answers 3

5

Open AppleScript Editor and paste the following script:

tell application "Terminal"
    activate
    do script "ssh -p myport myserver"
end tell

Save it in ~/Library/Scripts. Then download FastScripts and run it—it will show your script right in the menu bar:

3
  • 2
    You can, in fact, show the system-wide script menu in the menubar (and add and subtract to its contents as desired) by opening AppleScript Editor and in the first pane of its Preferences, check "Show Script Menu in Menubar."
    – Zo219
    Jul 23, 2013 at 20:05
  • True, it's a little hidden. I prefer FastScripts for the ability to set shortcuts right away.
    – slhck
    Jul 23, 2013 at 20:19
  • Yeah, I know, and that is cool. I should have added, the main virtue of the system menu is, it's free.
    – Zo219
    Jul 23, 2013 at 20:27
0

Platypus could be exactly what you are looking for. (I am not affiliated with the developer in any way.)

0

Xbar works nicely for that, you just need to follow the submenu example and define menu items like this:

echo "Run"
echo "---"

echo "Menu Item"
echo "--Submenu Item | shell=my_app | param1=--arg | terminal=true"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .