Working on Ubuntu/Linux with Matlab - Fla

Working on Ubuntu/Linux with Matlab

Fla posted @ 2014年4月17日 23:11 in Linux/Ubuntu with tags linux matlab , 15380 阅读

Working on linux would be more efficient.

1. Install Ubuntu

install the system:

sudo umount -l /isodevice

uninstall firefox and install chrome.

//保留配置文件
sudo apt-get autoremove firefox firefox-branding firefox-gnome-support ubufox
//配置文件也一起删掉
sudo apt-get purge firefox firefox-branding firefox-gnome-support ubufox

Chrome browzer can be downloaded by google/baidu it and install the deb file by double-click it.

Then the shurufa ibus can also be uninstalled.

sudo apt-get remove ibus

Another problem is the lightness of the screen could not be saved, just try this command.

sudo gedit /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0″ on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
// add this row
echo 0 > /sys/class/backlight/acpi_video0/brightness
exit 0

You may need to set the default launch system by revising the grub configurations.

sudo gedit /etc/default/grub
// set the default launch system number
grub_default=0
// set waiting time by revising the timeout
timeout=3
// after this
sudo update-grub

And you may need to disable your touch panel while you already have a mouse.

sudo gedit /etc/modprobe.d/blacklist.conf
// in the end, add this line and restart your computer
blacklist psmouse

To reenable, you can delete this line. or try these commands

sudo rmmod psmouse    #disable
sudo modprobe psmouse #enable
通过以上方法禁用触摸板之后,无法再重新启用触摸板,除非删除添加的语句,重启电脑。
今天发现一个应用指示器(Indicator)可以很方便的禁用和启用触摸板,方法如下:
安装Touchpad Indicator (触摸板开关)
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

2.  Install matlab.iso to device

download the matlab.iso with versions you can, and then mount it like this,

sudo mkdir /media/cdrom 
sudo mount -o loop myfile.iso /media/cdrom

then you can easily install matlab on your system using these commands.

cd /mnt/cdrom
sudo ./install

select "install without using internet" and then input the key to continue the installation, 

when finished, try to "acivate without using the internet" and select the lisence file.

Then execute this to umount the iso file and you can try matlab in your installation directory

sudo umount /mnt/cdrom 
in the /usr/local/MATLAB/ directory, you will find a desktop file, copy it to your desktop and enjoy it.

If you are unable to find the desktop file, you may try to copy the "Matlab.png" icon file and the "Matlab.desktop" to your matlab installation place. And then try to revise the content by

sudo gedit /usr/local/MATLAB/MATLAB_Production_Server/R2013a/Matlab.desktop
// the dektop file content
// the installation path is "/usr/local/MATLAB/MATLAB_Production_Server/R2013a/"
[Desktop Entry]
Type=Application
Name=Matlab 8.01
Comment="Start Matlab 8.01"
Icon=/usr/local/MATLAB/MATLAB_Production_Server/R2013a/Matlab.png
Exec=/usr/local/MATLAB/MATLAB_Production_Server/R2013a/bin/matlab -desktop
Categories=Development;
Name[en_US]=Matlab
// lastly you can copy the desktop file to your desktop.
sudo cp /usr/local/MATLAB/MATLAB_Production_Server/R2013a/Matlab.desktop ~/Desktop/Matlab.desktop 

3. Update the system

Firstly try this commands to update the system.

sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo update-manager –d

Then the system would open the update-manager, select the upgrade button to finish you upgrading.

sudo apt-get install update-manager-core
sudo do-release-upgrade

Unity是Ubuntu自己打造的桌面环境,有人认为Unity桌面环境糟糕的设计使很多Ubuntu用户不满,使其转向Linux Mint等非Unity系列系统。

  • Unity优化工具:Unity Tweak Tool,可用来调整外观设置、鼠标、Unity启动器、窗口行为等选项,可直接在Ubuntu软件中心搜索安装或使用命令:sudo apt-get install unity-tweak-tool
  • 隐私设置:Ubuntu默认在其控制面板中显示用户最近访问的文件,可在“系统设置-安全与隐私”中进行调整。
  • 禁止显示在线搜索结果:可在Dash中点击需要禁用的插件,选择“禁用”即可。
  • 禁止显示购物建议:可在终端执行命令禁用,命令如下:
gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"

 

4. Install JAVA SE JDK

在安装之前,系统没有任何jdk软件,也就是说在终端执行 java -version
将会输出如下内容:
root@haiyang-Aspire:~# java -version
程序 'java' 已包含在下列软件包中:
 * default-jre
 * gcj-4.6-jre-headless
 * openjdk-6-jre-headless
 * gcj-4.5-jre-headless
 * openjdk-7-jre-headless
请尝试:apt-get install <选定的软件包>
 
先去 Oracle下载Linux下的JDK压缩包,http://www.oracle.com/technetwork/java/javase/downloads/index.html,下好后直接解压。进入在存放jdk文件夹的当前目录,将解压好的jdk1.7.0_10文件夹用最高权限复移动到/usr/lib/jvm目录里,此时即使没有jvm目录也可以执行如下命令,jvm文件夹将得到创建。
sudo mv jdk1.7.0_10 /usr/lib/jvm/
接下来需要设置环境变量,进入当前用户名的主文件夹,修改.profile文件。注意,该文件是当前用户的配置文件,如果要对使用计算机的所有用户生效,那么需要设置的文件应该是 /etc/profile。
sudo gedit ~/.profile
在末尾加上:
export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_10
export JRE_HOME=/usr/lib/jvm/jdk1.7.0_10/jre 
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH

export PATH=$JAVA_HOME/bin:$PATH
然后保存关闭,此时在命令行输入java -version将会仍然显示java没有安装。此时,需要使用source更新下.profile文件:
$ source ~/.profile

再次使用java -version命令可以看到如下输出:

$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
到此,已经将oracle jdk配置完成。如果之前系统里面已经安装了openjdk,可以使用如下方法将默认jdk更改过来:
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_10/bin/java 300

输入sun jdk前的数字就好了

$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_10/bin/javac 300
$ sudo update-alternatives --config java 
$ sudo update-alternatives --config javac

这个问题很奇怪,不知到根本原因是什么,但是用以下方法可以解决:

$ cd <eclipse dir>
$ ln -sf $JRE_HOME jre

目的是在eclipse安装目录下建立一个名称为jre的链接,将其指向java安装目录下的jre目录。

PS:欢迎访问本人的CSDN博客:http://blog.csdn.net/luofl1992

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee