Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install Matlab R20112a on Ubuntu.

My problem is: I get access to the installation gui running ./install from a terminal, but the installer fails when it tries to write on the folder /usr/local/MATLAB/R2012a (even though I created this folder before running the installation).

I assume the problem is I need root privileges, but "root" is disabled in ubuntu.

I can install the program in my home folder, but this is not a good solution because I want access to the program for all users.

share|improve this question
add comment

3 Answers 3

As explained here, you do not need to enable root logins to run commands as root. That's what sudo and its graphical frontends (like gksu/gksudo and kdesudo) are for.

Since install runs a graphical installer, and you can run it (but not as root) like ./install, you can run it as root with:

gksu ./install
share|improve this answer
    
This worked. Thanks. –  Guillermo Jul 9 '12 at 23:00
    
Also, you can disable root login via /etc/ssh/sshd_config and prevent remote login through your root user. –  earthmeLon Jan 13 at 22:36
1  
@earthmeLon It should be disabled in /etc/ssh/sshd_config by default already (even when the root account is permitted to log in locally or via su with a password), as that is the default in Ubuntu and, I think, every other OS with sshd. Of course, anyone who does choose to enable the root account would still be well-advised to check /etc/ssh/sshd_config to make sure it remains disabled there. –  Eliah Kagan Jan 15 at 6:16
    
My experience is different, @EliahKagan. I just recommend being 100% sure root isn't exposed to sshd. –  earthmeLon Jan 15 at 16:32
add comment

Try running gksudo ./install from the terminal. This will run the install as root.

share|improve this answer
3  
    
IIRC it's a CLI start followed by fall-forward to GUI by JRE if an X server is detected... –  izx Jul 9 '12 at 22:39
1  
@izx Sounds like gksu is the way to go, then (as the X server will still be detected even if it's run with straight sudo). –  Eliah Kagan Jul 9 '12 at 22:55
    
Right-o, edited answer. –  izx Jul 9 '12 at 23:00
add comment

You can also try to install Matlab in other place. I had already tried all of this and it didn't work for me, so I changed the installation directory to /home/<username>/Matlab/R2012a and it worked!!

share|improve this answer
1  
Welcome to Ask Ubuntu Waferf! Even though your post attempts to answer the question, the questioner has already mentioned in his question that he can install the program in his home folder, but doesn't want to. –  Alaa Jul 11 '13 at 7:14
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.