Hi there,

first of all thanks to Manickaraja who reminded me to work again on the 
Intermapper vs iTerm stuff.
His tip worked but not always.
The Launcher only works if iTerm is totally closed or has at least one window 
open because he uses 'tell the last terminal' applescript command. If iTerm has 
no window opened it fails. If iTerm has to be started by the script
it may work if you set up iTerm to always open one window at startup.

My tip is to change the Launcher script this way:

osascript -e 'tell application "iTerm"' -e 'activate' -e 'set myterm to (make 
new terminal)' -e 'tell myterm' -e 'launch session "Default Session"' -e 'tell 
the last session' -e 'set background color to "black"' -e 'set foreground color 
to "green"' -e 'write text "

You can omit the read marked stuff or change it to fit your preferences


Greetings from Germany

Jürgen

Am 22.09.2010 um 17:22 schrieb Manickaraja Arumugam:

> Thanks a ton Andrey.
> 
> I have been using putty long back and every time while closing the device 
> window I have close the dos-prompt windows manually.
> 
> 
> Regards
> Manickaraja Arumugam
> A R I C E N T
> 
> 
> 
> -----Original Message-----
> From: InterMapper-Talk@list.dartware.com 
> [mailto:intermapper-t...@list.dartware.com] On Behalf Of 
> andrey.khomya...@mcphs.edu
> Sent: Thursday, September 02, 2010 5:09 AM
> To: InterMapper-Talk@list.dartware.com
> Subject: [IM-Talk] InterMapper Remote + iTerm
> 
> I wanted to send this out merely as a documentation to what I've done so next 
> time I need it I don't have to waste an hour. Hopefully, it will get indexed 
> in the archives and become googlable and/or Dartware will put out as a KB. 
> Here it comes:
> 
> I wanted to setup iTerm as my helper application in InterMapper Remote client 
> because Terminal.app drives me bananas
> I wanted to right click a device and launch telnet or ssh in iTerm rather 
> than Terminal (actually ssh doesn't even work in Terminal out of the box, 
> iirc)
> 
> So to achieve this I did the following:
> 
> - Defined the ${LAUNCHER} as this command exactly as it appears below
> 
> osascript -e 'tell application "iTerm"' -e 'activate' -e 'tell the last 
> terminal' -e 'tell the last session' -e 'write text "
> 
> Notice how the quotes don't actually close correctly here. That's because 
> they will close in the application definition.
> 
> - Added "SSH" to the application list and filled it out like so
> 
> ${TITLE}: SSH
> Command Line: ${LAUNCHER} ${PATH} ${ARGS} ${ADDRESS}"' -e 'end tell' -e 'end 
> tell' -e 'end tell'
> ${PATH}: /usr/bin/ssh
> ${ARGS}: -l admin
> 
> Notice how the Command Line is actually a continuation of the ${LAUNCHER} 
> definition.
> -l argument will actually log you into your ssh host with the username 
> specified (in this case it's "admin"). If you don't do this, it will log you 
> in with your shell username, which almost never will match your host, I guess.
> 
> 
> 
> For telnet I modified the existing application entry to:
> ${TITLE}: Telnet
> Command Line: ${LAUNCHER} ${PATH} ${ARGS} ${ADDRESS}"' -e 'end tell' -e 'end 
> tell' -e 'end tell'
> ${PATH}: /usr/bin/telnet
> ${ARGS}:
> 
> So the point is that just by modifying the ${PATH} variable you can launch 
> anything in iTerm:
> 
> ${PATH}: /usr/sbin/traceroute
> ${PATH}: /sbin/ping
> 
> 
> Bonus:
> On Windows I use puTTY.
> My Command Line reads: putty ${ARGS} ${ADDRESS}
> ${PATH}:
> ${ARGS}: -ssh
> Input: ${ADDRESS}
> 
> For telnet just change ${ARGS} to be -telnet
> I had to add path to putty into my windows $path variable, but could have 
> probably instead used InterMapper's ${PATH}. I did that because I wanted to 
> launch putty from the command line just by hitting Windows+R and typing in 
> putty. Very helpful.
> 
> Hopefully, this helps someone.
> Enjoy
> 
> -andrey
> __________________________________________________________
> Andrey Khomyakov | Network Engineer | +1.617.879.5945
> 
> 
> 
> Confidentiality Note:  This e-mail, and any attachment to it, is intended to 
> be confidential and might be legally privileged.  It is intended solely for 
> the use of the addressee.  If you are not the intended recipient, you are 
> hereby notified that reading, copying, disseminating or distributing this 
> email is strictly prohibited.  If you have received this e-mail in error, 
> please immediately return it to the sender and delete it from your system.  
> Thank you.
> 
> ____________________________________________________________________
> List archives:
> http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
> To unsubscribe: send email to: intermapper-talk-...@list.dartware.com
> 
> 
> "DISCLAIMER: This message is proprietary to Aricent and is intended solely 
> for the use of the individual to whom it is addressed. It may contain 
> privileged or confidential information and should not be circulated or used 
> for any purpose other than for what it is intended. If you have received this 
> message in error, please notify the originator immediately. If you are not 
> the intended recipient, you are notified that you are strictly prohibited 
> from using, copying, altering, or disclosing the contents of this message. 
> Aricent accepts no responsibility for loss or damage arising from the use of 
> the information transmitted by this email including damage from virus."
> ____________________________________________________________________
> List archives:
> http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
> To unsubscribe: send email to: intermapper-talk-...@list.dartware.com
> 
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: intermapper-talk-...@list.dartware.com

Reply via email to