how to re-define the HOME directory?



Ah, thanks, this solves my problem: I just put a symbolic link
to ~/.Xauthority into that directory which I want to be my Maxima-home!

As I explained in the other e-mail regarding this issue, maxima_userdir
on the one hand seems not to be powerful enough (due to .maxima_history out
of its control), and apparently can't be set early enough (that is,
before accessing it!).

And actually exactly the same problem occurred with my usage of R:
R has a few more options influencing which files are read, but again
this doesn't catch all cases, and re-defining HOME again solved that
problem, except of plotting not working, and again the symbolic link
did the job!

Thanks!

Oliver


On Mon, Jun 01, 2009 at 07:13:56PM +0100, Leo Butler wrote:
>  bin> HOME=$(pwd) ./rmaxima
> < ;;; Loading #P"/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Ecl/9.4.1/lib/ecl-9.4.1/defsystem.fas"
> < ;;; Loading #P"/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Ecl/9.4.1/lib/ecl-9.4.1/cmp.fas"
> < ;;; Loading #P"/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/Installations/Ecl/9.4.1/lib/ecl-9.4.1/sysfun.lsp"
> < Maxima 5.18.1 http://maxima.sourceforge.net
> < Using Lisp ECL 9.4.1
> < Distributed under the GNU Public License. See the file COPYING.
> < Dedicated to the memory of William Schelter.
> < The function bug_report() provides bug reporting information.
> < (%i1) plot2d(sin(x),[x,-5,5])$
> < Xlib: connection to ":0.0" refused by server
> < Xlib: No protocol specified
> < 
> < 
> < gnuplot: unable to open display ':0'
> < gnuplot: X11 aborted.
> < 
> < (%i2) Xlib: connection to ":0.0" refused by server
> < Xlib: No protocol specified
> < 
> < 
> < gnuplot: unable to open display ':0'
> < gnuplot: X11 aborted.
> < 
> < -----------------------------------------
> 
> 
> Oliver,
> The pro/blem is that you have changed the shell variable HOME, and your
> shell
> is looking in $PWD for .Xauthority, the file that holds the permissions
> to use your display. I do not understand why you need to change HOME. 
> 
> To test what I am saying,  do the following in a new shell:
> 
> plot2d(sin(x),[x,-%pi,%pi],[psfile,"sin.ps"]);
> 
> You should not have any errors here. 
> 
> You mention that you needed to do someting with .maxima.
> Perhaps that following from the man page is useful?
> 
> ENVIRONMENT VARIABLES
>        MAXIMA_USERDIR
>               Points to a directory for user customization files.
> Maxima's default search paths include MAXIMA_USERDIR. Default value:
> $HOME/.maxima.
> 
> Leo
> 
> < 
> wing in a new shell
> < Just to mention, using "maxima" instead of "rmaxima" doesn't change anything.
> < 
> < Could it then be that somehow gnuplot or whatever is involved
> < determines the user through his home directory?
> < 
> < Oliver
> < 
> < 
> < On Mon, Jun 01, 2009 at 05:03:27PM +0100, Leo Butler wrote:
> < > 
> < > 
> < > On Mon, 1 Jun 2009, Oliver Kullmann wrote:
> < > 
> < > < Hi,
> < > < 
> < > < 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!
> < > < 
> < > < Alas, now I found out that gnuplot (version 4.2.4 or 4.2.5,
> < > < but apparently this doesn't matter) doesn't work anymore:
> < > < 
> < > < (%i1) plot2d(sin(x),[x,-5,5])$
> < > < Xlib: connection to ":0.0" refused by server
> < > < Xlib: No protocol specified
> < > < gnuplot: unable to open display ':0'
> < > < gnuplot: X11 aborted.
> < >  
> < > Oliver,
> < > This error message tells you that gnuplot is attempting to open display
> < > :0, but your xserver is refusing it permission. I suspect that you are
> < > running maxima in a terminal as a user other than the owner of the
> < > display.
> < > 
> < > If you are running maxima as user B, while user A owns the display, then
> < > user A can enable B's access to the display via
> < >  
> < > A$ xhost +local:B
> < > 
> < > (possibly 'localhost', see the man page for xhost; 'A$' is the shell
> < > prompt for A).
> < > 
> < > If you are running maxima on a remote machine via ssh, then you need to
> < > forward the xserver's port. This is done by adding the option '-X', e.g.
> < > 
> < > ssh user at some.machine.org -X
> < > 
> < > will open an ssh session for user on some.machine.org and the X
> < > connection will be forwarded from the remote some.machine.org
> < > to the local machine.
> < > 
> < > 
> < > Leo
> < > 
> < > -- 
> < > The University of Edinburgh is a charitable body, registered in
> < > Scotland, with registration number SC005336.
> < 
> < 
> < 
> 
> -- 
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.

-- 
Dr. Oliver Kullmann
Computer Science Department
Swansea University
Faraday Building, Singleton Park
Swansea SA2 8PP, UK
http://cs.swan.ac.uk/~csoliver/