help: lingon terminal command at startup python string

Joined
Aug 31, 2009
Messages
7
Reaction score
0
Points
1
Can anyone please help me figure out how to have a simple command string run in the terminal every time I startup, and have the terminal window close automatically when it is done? I have lingon, which should make it easy, but I still need help. I created a "user agent", but it doesn't seem to be doing the trick and there are no error messages. Here is the string I need to run from terminal every time the computer starts up (and then close the terminal after the string is run):

python /Applications/python-client/tcprelay.py -t 22:2222 &

Or get to the directory /Applications/python-client, and then run

python tcprelay.py -t 22:2222 &

Thanks.

lingon.png
 
OP
L
Joined
Aug 31, 2009
Messages
7
Reaction score
0
Points
1
I wrote a simple shell script with 755 permissions and used lingon to execute the shell script with a user agent -- command string "sh [path to shell script]".

#!/bin/bash

# iphone usb ssh script

/Applications/python-client/tcprelay.py -t 22:2222 &

However, I was unable to figure out how to force the full command string to execute without a shell script just by running a user agent at logon -- the farthest I got was executing tcprelay.py without the arguments, and am not sure why the arguments are not recognized -- looking in /var/log/system.log revealed that tcprelay.py was being executed without arguments despite the user agent containing the arguments.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top