Can't get started with tutorial

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
Forum rules
This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
wikner
Posts: 199
Joined: Sun Nov 02, 2003 2:04 pm

Can't get started with tutorial

Post by wikner »

After many years of frustration with AppleScript I have decided to give Python a go. I started to work through the tutorial at http://www.perceptiveautomation.com/wik ... g_tutorial.

I haven't gotten very far, because I can't get bash to recognize the alias "indigoserver".

Per instructions I executed:

Code: Select all

echo "alias indigohost='/Library/Application\ Support/Perceptive\ Automation/Indigo\ 5/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost'" >> ~/.bashrc
I verified that this had caused the correct line to be entered in ~/.bashch by opening it in BBEdit. BBEdit shows there is one line there, namely:

Code: Select all

alias indigohost='/Library/Application\ Support/Perceptive\ Automation/Indigo\ 5/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost'
However, when I start a ew terminal session, "indigohost" is not recognised until I type the alias command directly into the terminal session.

Code: Select all

Last login: Fri Apr 13 16:55:21 on ttys000
Homemaker:~ norman$ indigohost -i
-bash: indigohost: command not found
Homemaker:~ norman$ alias indigohost='/Library/Application\ Support/Perceptive\ Automation/Indigo\ 5/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost'
Homemaker:~ norman$ indigohost -i
Python 2.5.4 (r254:67916, Aug  1 2011, 15:52:49) 
[GCC 4.2.1 (Apple Inc. build 5646)]
Connected to Indigo Server 5.1.0 (localhost:1176)
>>> 
So what do I do to get Terminal to read and execute the .bashch file on launch?
User avatar
matt (support)
Site Admin
Posts: 21542
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Can't get started with tutorial

Post by matt (support) »

wikner wrote:I verified that this had caused the correct line to be entered in ~/.bashch by opening it in BBEdit. BBEdit shows there is one line there, namely
In the .bashch or .bashrc file? The 'echo' line above should add it to the .bashrc file.

You can also try adding it to the .bash_profile file instead:

Code: Select all

echo "alias indigohost='/Library/Application\ Support/Perceptive\ Automation/Indigo\ 5/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost'" >> ~/.bash_profile
Image
wikner
Posts: 199
Joined: Sun Nov 02, 2003 2:04 pm

Re: Can't get started with tutorial

Post by wikner »

Good pickup. I guess in your business typos are very important :) I meant to say .bashrc. In any case I did this:

cp .bashrc .bash_profile

then quit and relaunched Terminal. The indigohost command then worked. (I discovered, on the way, that there needs to be a newline at the end of the line in the file, or it won't work). But fixing that in .bashrc didn't help. The line had to be in .bash_profile. If I delete .bashrc it still works.

Now I'm going to try to see why doing this remotely over ssh is Sooo slooooow. I'll be reporting on this soon.
Locked

Return to “Extending Indigo with Plugins and Python”