run terminal commands from quicksilver

6k Views Asked by At

I know there is a Terminal plugin for quicksilver but I would invoke terminal commands which basically just runs in the background and never popups a terminal window. is that possible?

UPDATE:

I have the following code in my applescript but its giving me an error:

do shell script "/path/to/shell.sh blah" 

error:

curses.setupterm()
_curses.error: setupterm: could not find terminfo database
3

There are 3 best solutions below

1
On

Applescript is the simple solution, see: http://developer.apple.com/library/mac/#technotes/tn2002/tn2065.html

Sample:

do shell script "ifconfig"
do shell script "ifconfig" user name "Anne" password "p@ssw0rd" with administrator privileges

Automator can also run shell scripts in the background.

If you are familiar with XCode, you can use NSTask with Objective-C.

3
On

Hold on a sec, is your shell script a bash shell script? In your first line do you have:

#!/bin/bash

If not, add that line to your script. Also instead of just

do shell script "/path/to/yourscript.sh"

consider this:

do shell script "/bin/bash /path/to/yourscript.sh"
0
On

In Quicksilver you can use the action "Run Command in Shell", which is part of the "Terminal Module". The command is run without showing a window. Search on the quoted terms and you'll find some examples.