From: Anthony Rey (arey_at_etud.insa-toulouse.fr)
Date: Mon Oct 31 2011 - 02:09:42 CDT

Hi Axel,

Thanks so much for your help. Works perfectly now! you're awesome.

Tony

On 31.10.2011 01:04, Axel Kohlmeyer wrote:
> On Sun, 2011-10-30 at 21:55 +1000, Anthony Rey wrote:
>> Hi all,
>>
>> I use VMD on a Mac OS X version 10.6.8.
>>
>> I want to run gedit through my Tcl/Tk console but can't figure out
>> out
>> to do it. I made an alias in my .bashrc file and it does work in my
>> Terminal:
>>
>> alias gedit ' /Applications/gedit.app/Contents/MacOS/gedit ';
>>
>> I thought that I just had to copy this alias into the .vmdrc file to
>> be
>> able to run gedit through the Tcl/Tk console....but it doesn't work:
>
> of course not! the syntax in .vmdrc is Tcl syntax
> and not bash syntax. how should this work?
> if you copy a sentence in written in french into
> an english book, it won't become english, either.
>
>>
>> I obtain the following error message:
>>
>> /usr/bin/alias: line 4: alias: gedit: not found
>> /usr/bin/alias: line 4: alias: ': not found
>> /usr/bin/alias: line 4: alias:
>> /Applications/gedit.app/Contents/MacOS/gedit: not found
>> /usr/bin/alias: line 4: alias: ': not found
>> child process exited abnormally
>>
>>
>> How could I possibly run gedit (as well as other packages such as
>> xmtrace etc..) through the Tk/Tcl console in VMD?
>
> you have three options:
>
> 1) you don't use an alias but change your PATH
> environment variable to include the directory
> with gedit in it
>
> 2) you write a small wrapper shell script:
> #!/bin/sh
> exec /Applications/gedit.app/Contents/MacOS/gedit "$@"
>
> and place that in a directory that *is* already
> in your PATH
>
> 3) you write a small tcl proc that works like
> an alias on the VMD/Tcl command prompt. e.g.:
>
> proc gedit {args} {
> exec /Applications/gedit.app/Contents/MacOS/gedit $args &
> }
>
> HTH,
> axel
>> Thanks very much for your help,
>>
>> Tony