Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Debian GNU Linux x64 Wheezy and I'm about to re-install Mathematica. Most of my work will be done as user 'fred' but there is one project that needs 'root'.

Where can I install it so I can access the same notebooks from either 'fred' or 'root'?

Only notebooks that execute openCL functions will require 'root'.

share|improve this question
    
Just trying to understand, isn't where you install Mathematica independent of where you save your notebooks ? –  b.gatessucks Oct 2 '12 at 13:49
    
@b.gatessucks, I believe that is the case. I will make sure the notebooks are in user 'fred' directories. However, if I change any Mathematica settings, I want them to persist for both users. As I have it set up now, both my email and browser are not persistent when I switch user. –  Fred Kline Oct 2 '12 at 14:00
    
I have never used mathematica, but it should have a user-specific configuration file. Use it as your normal user and then copy that file ($HOME/.mathematica perhaps?) to /root. –  terdon Oct 2 '12 at 17:01
    
Generally speaking, you should never have to run an application such as Mathematica as root. Not only is it inconvenient, and not possible on systems you are not administrating yourself, it's also a glaring security hole. I am sure you know that, but it should be said so that other users don't get the impression that this is "OK-ish". It's a problem, either in your project, or in Mathematica itself. –  DevSolar Oct 4 '12 at 9:50
add comment

1 Answer 1

up vote 1 down vote accepted

As terdon says, there should be a hidden config directory for mathematica in /home/fred or /home/fred/.config. To have the same configuration for root as for fred you have to make a symbolic link to the config-directory:

sudo su
cd
rm -r ./mathematica-config-directory
ln -s /home/fred/mathematica-config-directory
exit

Note that everytime you are using mathematica as root and it creates a new file in the config-directory you won't be able to change this particular file as user fred. In this case you have to change the ownership of the mathematica-config-directory back to fred with the following command:

sudo chown -R fred:fred mathematica-config-directory

share|improve this answer
    
Is there a way to have each file in that directory owned by 'fred' even if it is created by 'root'? –  Fred Kline Oct 4 '12 at 13:15
    
This problem was discussed in another thread which I can't find right now, but the only solution I could find was creating a cronjob which fixes the permissions every minute. –  FSMaxB Oct 4 '12 at 13:24
1  
I found the link: stackoverflow.com/questions/12556303/… –  FSMaxB Oct 4 '12 at 13:59
    
Thanks. I think I have enough info to make it work. –  Fred Kline Oct 4 '12 at 15:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.