how to re-define the HOME directory?




On Mon, 1 Jun 2009, Dan Hatton wrote:

< On Mon, 1 Jun 2009, Oliver Kullmann wrote:
< 
< > since in my research platform Maxima needs to run locally, without
< > intrusion of the user space, I needed to do something w.r.t. the
< > .maxima directory, and fortunately redefining the environment
< > variable HOME when calling Maxima does the job!
< 
< Now Leo has told us how to do this without breaking the calling of
< Gnuplot, I think we also have a way to run multiple simultaneous
< instances of Maxima containing plot2d commands (cf. thread starting at
< <http://www.math.utexas.edu/pipermail/maxima/2008/011095.html>;).
< 
 
Oliver's solution is destined to have further problems with it, because
changing HOME is such a heavy-handed solution. Moreover, by putting in a
link to ~/.Xauthority, he's not really playing by the rules.

What is needed, I think, is a command-line option that allows the user
to set the init file at run-time. This is presently lacking.

To run multiple parallel instances of maxima which call gnuplot, one can 
create a tmp directory in the present directory and set
maxima_tempdir in the first line of maxima.


In maxima-init.mac,

system("(echo -e 'maxima_tempdir : \"'$PWD'\"/tmp' >tmpfile)");
batch("tmpfile");
system("rm tmpfile");


I use this to run parallel sessions in parallel directories.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.