記一次系統重裝
Backup
Folders to back up
Ubuntu Side
- ~/Documents
- ~/workspace
- ~/dotfiles
- ~/.emacs.d
- ~/.ipython/kernels
Windows Side
- Videos
- Pictures
Other files
- python installation
Firefox bookmarks(Firefox sync takes care of all these)Firefo.x saved passwords- Atom packages
- Atom snippets
Prepare 16.04 installation
I ended up wiping out the Windows installation.
Set up system
Firefox(Comes prepackaged with it)- Dropbox
- Atom (with packages)
- Emacs (with package)
- Scala
- DB Browser
- Haroopad
- Skype
- KMPlayer
Input method
fcitx
This page talks about how to config system to use fcitxUse emacs key
Use Tweak Tool (found at Software Store), go to Typing > Caplocks Behavior > select “as additional Ctrl”- in the System setting Keyboard > shortcuts > Typing, Disable Ctrl+Space for switching input methods, as this conflicts with emacs’ C-SPACE selection key-binding.
Switch default shell from bash > zsh
- install zsh in package manager
sudo usermod -s /bin/zsh $USER
Python environment
Turns out, most system modules are now in python3, unlike in Ubuntu 15.10 when they were under python2. So now it’s the pip3 that gets all the mess. Good thing is the system comes pre-packaged with python3.5.
Problem: The packaged python doesn’t contain
- pip (pip2, pip3)
go to pip website, downloadget_pip.py
and run it with sudo for both python2 and python3. This will install pip2 and pip3 respectively. I don’t know whether the order matters, but I ran 2 and then 3. - virtualenv
Findpython-virtualenv
package in Synaptic - Also find
python-dev
andpython3-dev
package in Synaptic, because some python libraries require compiling withPython.h
. - Matplotlib requires the dev portions of
libfreetype
andlibpng
to be installed
Permission Problem
Turns out the mobile hard drive I used to backup my files is NTFS or something and this messed up all the permission codes (All become 777
)…
I wrote a script to recursively change all the directory and executable files permission to 755
, all the normal file permission to 644
. The way it differentiates executable files and non-executable is first by extension name: those ending in bin
, sh
, exe
are usually executable files. The trickier part is those executables without extension, which is a norm under Linux. To tackle those types of files (and differentiatbe them from normal files without extension like Makefile
) I leveraged the file
system program, which will usually tell you whether something is an executable binary. However it also has the bad habbit of saying executalbe on python script file, even those without shebang. Therefore I can’t trust it completely.
|
|