mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] session maxima; session tableur ?


Chronological Thread 
  • From: slelievre <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] session maxima; session tableur ?
  • Date: Sat, 25 Jun 2011 01:11:12 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Xo/uq557lQk4UXRmiC80xauFBNI932au3fgwRQqM5kfFkCPz6DYQLPDA+yK3EzAXrj sIaEwyNjSnbLgDVKkTSPndBhiDpXuT1eAPwKGxd4ScYe/Ddl7JC279CT4bzvoJDf99eL babs1cfyCAj366HmbwD4fA/3bpIkemfAtY+jo=

Hi Sacha,

2011/6/24 El.Douwen <address@hidden>:
> Thank you all for the long explanation; i see more clear now. I try to
> answer to all questions you give. Here are the answers :
> ——————————————————————————————
> about the sentence "There is not a terminal command corresponding to every
> os X application"
> i now understand that as you say there is a terminal command for every osX
> application but one has to explore the bundle (paquet) of the applications
> to find the thrue app and its path. When i think to "textedit" as an app,
> the terminal has an other point of view. He will only understand
> /Applications/TextEdit.app/Contents/MacOS/TextEdit. And he will open a new
> session of textedit each time i do this, that it the first time i see this,
> as in windows…
> The relation between any mac os X app and the terminal is given by the
> following formula :
> name of the application is os X : coco.app
> name that terminal recognize (path+name) :
> /Applications/Coco.app/Contents/MacOS/Coco
> with attention to the fonts (casse majuscules et minuscules)

Note you can also type the following in Terminal to open Coco.app:
open -a Coco

For instance:
open -a Firefox
open -a Google\ Chrome
open -a TextEdit

> ——————————————————————————————
> here is the three of the paquet (bundle) called /Applications/maxima

you mean the tree

> - contents/
> - info.plist
> - MacOS/Maxima ("executable unix file") (* *)
> - Ressources/

you mean Resources

> - Appsetting.plist
> - an icon
> - maxima.sh (*)
> - script
> - a folder about languages (here only english)
> - maxima/
> bin/
> lib/
> libexec/
> share/
> ——————————————————————————————
> i type in the terminal, corresponding to (*)
> /Applications/Maxima.app/Contents/Resources/maxima.sh
> it launches maxima in the same terminal windows

You could also type:
open -a Maxima

> i notice that the content of this maxima.sh is very short :
> #!/bin/sh
> ROOT=`(cd \`dirname $0\` > /dev/null 2>&1 ; pwd)`
> MAXIMA_PREFIX=$ROOT/maxima/
> export MAXIMA_PREFIX
> PATH="$MAXIMA_PREFIX/bin:$PATH"
> export PATH
> exec "$MAXIMA_PREFIX/bin/maxima" "$1" "$2" "$3" "$3" "$4" "$5" "$6" "$7"
> "$8" "$9"
> ——————————————————————————————
> i type now, corresponding to (* *)
> /Applications/Maxima.app/Contents/MacOS/Maxima
> it launches maxima in an new terminal windows
> i notice that i can not see the content of this Maxima by draging it on the
> application Xcode.app
> ——————————————————————————————
> for these two files, maxima.sh and Maxima, i (the user i am) have write/read
> rights but we (admin) have only read autorizations. Idem for the folder
> /Applications/maxima
> ——————————————————————————————
> i type echo $PATH in the terminal i get :
> /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
> i presume it means the following list :
> /usr/bin
> /bin
> /usr/sbin [does not exist]
> /sbin
> /usr/local/bin
> /usr/X11/bin
> i have opened all these folders; in none of them there is any file whose
> name starts with "maxima"
> the really dark point for me :
> i do not understand why the maxima application that i have downloaded does
> not install a maxima shortcut in the right folder, that is to say one of
> these folders. Do they expect that the user will only use maxima as an osX
> application and never as an unix application that is to say within texmacs
> or anything that will call the application not from the mouse but from a
> command line ?
> I mean, each person has his job; in my idea, running the applications and
> working with them should be my job. Preparing something that installs the
> app convenently should have be the job of the programmers of maxima. But
> maybe i miss something

I guess you are right in that the expectation is probably that someone
who downloads an app wants to use it as an app, and if they want to
use it in the command line or have scripts or other programs call them
they will arrange for it to work (eg by modifying the PATH or by
adding a symlink in a place that is already in the PATH).

> ——————————————————————————————
> you say i must access to these files :
> /usr/share/TeXmacs/plugins/maxima/progs/init-maxima.scm
> /usr/libexec/TeXmacs/bin/tm_maxima
> /usr/libexec/TeXmacs/bin/maxima_detect
> in :
> /usr/share/
> and in :
> /usr/libexec/
> there is no folder called TeXmacs/
> sould i go gon and create
> - the folder TeXmacs/plugins/maxima/progs/ and save in it a new file called
> init-maxima.scm
> - the folder TeXmacs/bin/ save in it a new file called maxima_detect ?
> and why should i write in these files ?
> ——————————————————————————————
> to create an alias of maxima in a folder that belongs to the path
> sudo ln -s /Applications/Maxima.app/Contents/Resources/maxima.sh
> /usr/local/bin/maxima
> i suppose that means "create in /usr/local/bin a file called maxima that is
> an alias of the path to maxima.sh"

You can learn more about "ln -s" by searching for it on the internet, eg
http://www.google.fr/search?q=%22ln+-s%22

> i am right i verifyed with the finder in this folder /usr/local/bin
> now, i take this alias called "maxima" and i drag it to the terminal windows
> as i did with :
> /Applications/Maxima.app/Contents/Resources/maxima.sh
> i expect the same effect
> but  here is the result of terminal :
> /usr/local/bin/maxima: line 10: /usr/local/bin/maxima//bin/maxima: Not a
> directory
> /usr/local/bin/maxima: line 10: exec: /usr/local/bin/maxima//bin/maxima:
> cannot execute: Not a directory
> i guess that the maxima.sh drives the user to an adress that becomes
> incompatible with the new location of the alias, something with absolute and
> relative adresse
> i think i loose your time with this
> the fact is : even if we manage, with more hours of work (for me 2 hours
> this morning, for you also lot of time driving me), to install correctly
> maxima so that texmacs can call it, then i will have in mind that it is not
> reproductible, i mean, i wont be able to tell a single friend "hey, come,
> you can install maxima on your mac os X and run it from texmacs" because i
> wont find fliud enough the way to install it…
> i always have in mind that one day i can propose texmacs to my colleagues in
> the secondary schools, that must be quite automatic
> ——————————————————————————————
> Sage
> i look at it since i have a highflow internet connexion
> then i add
> /Applications/sage/local/bin
> to the path
> ——————————————————————————————
> Conclusion
> i now have to do this :
> If you want to make this valid in each Terminal session, edit the
> .bash_profile file in your home folder and add the line
> export PATH=$PATH:/Applications/Maxima.app/Contents/Resources/
> somewhere in that file (if the file doesn't exist, create it).
> This file is loaded each time you open a Terminal window or tab.
>  i look for the means to make a resarch in hidden files in order to find
> this file called ".bash_profile" and when i have the information i try and i
> tell you
> /usr/share/TeXmacs/plugins/maxima/progs/init-maxima.scm
> /usr/libexec/TeXmacs/bin/tm_maxima
> /usr/libexec/TeXmacs/bin/maxima_detect
> They might be in a location that Spotlight doesn't search (like
> probably hidden in the TeXmacs.app bundle or in "~/Library/Application
> Support").
> i will throw an eye on this
> look on internet for some information about manipulation of terminal
> i will find for time for this.
> ——————————————————————————————
> thanks



Archive powered by MHonArc 2.6.19.

Top of page