TODO: make custom shortcuts portable
this is a guide for me to configure a new Ubuntu install, including install packages, some configurations to be made
this guide is not comprehensive, some steps were not recorded
terminator
sudo apt-get install terminator
# assign ctrl+alt+t as shortcut
tmux
sudo apt-get install tmux
vim
only vim.tiny is installed by default
# install gvim, by default, this will make vim-gnome as the default vim, replacing vim.basic
# vim-gnome is compiled with clipboard support, you can copy text to system clipboard, vim.basic lacks this functionality (gvim compiled with '+xterm_clipboard', while vim.basic compiled with '-xterm_clipboard')
$ sudo apt-get install vim-gnome
# install exuberant-ctags
sudo apt-get install exuberant-ctags
openvpn
sudo apt-get install openvpn
# cp vpn config files to /etc/openvpn/
# fireup vpn
vpn-work.sh # should be in ~/bin
dropbox
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
~/.dropbox-dist/dropboxd
# add '/home/lee/.dropbox-dist/dropbox' to 'Startup Applications'
flash plugin
sudo apt-get install flashplugin-installer
git
sudo apt-get install git gitk
google chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo vi /etc/apt/sources.list.d/google.list
# input this line:
# deb http://dl.google.com/linux/chrome/deb/ stable main
sudo apt-get update
sudo apt-get install google-chrome-stable
virtualbox
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo vi /etc/apt/sources.list.d/virtualbox.list
# input this line ('raring' need be changed to your version code):
# deb http://download.virtualbox.org/virtualbox/debian raring contrib
sudo apt-get update
sudo apt-get install virtualbox-4.2
# vbox will create a new group, add your user to it
sudo usermod -G vboxusers -a lee
# you need "Oracle VM VirtualBox Extension Pack" to enable USB support in guest OS
# download, install: 'File -> Preferences -> Extensions'
markdown
$ sudo apt-get install markdown
inkscape
sudo apt-get install inkscape
JDK
$ sudo apt-get install openjdk-8-jdk
eclipse
# see eclipse.markdown
multimedia / video / music
$ sudo apt-get install guayadeque
$ sudo apt-get install vlc
calibre - ebook management
# ref: http://calibre-ebook.com/download_linux
# install to /opt (change the install_dir if you need)
$ sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')"
misc
$ sudo apt-get install markdown xclip unrar-free p7zip-full
$ sudo apt-get install openssh-server # sshd
$ sudo apt-get install curl
$ sudo apt-get install shutter
$ sudo apt-get install ascii # print ascii table, do not google it every time, you fool
$ sudo apt-get install graphviz
$ sudo apt-get install chmsee # view chm files
$ sudo apt-get install unity-lens-wikipedia
blueman # bluetooth manager, ubuntu 13.04's default bluetooth has bug, cannot send file to smart phone
f-spot # photo manager
ubuntu one
killall ubuntuone-login ubuntuone-preferences ubuntuone-syncdaemon
sudo rm -rf ~/.local/share/ubuntuone
rm -rf ~/.cache/ubuntuone
rm -rf ~/.config/ubuntuone
mv ~/Ubuntu\ One/ ~/UbuntuOne_old/
sudo apt-get purge ubuntuone-client python-ubuntuone-storage*
system settings
tweak some system settings: appearance, privacy, etc
add Chinese language support
linking ~/.config/user-dirs.dirs
firefox
setup sync
disable pre-installed addons
input method
# 'System Settings' -> 'Language Support' -> change input method to 'fcitx'
sudo add-apt-repository ppa:fcitx-team/nightly
sudo apt-get update
sudo apt-get install fcitx-sogoupinyin
# install google pinyin
$ sudo apt-get install ibus-googlepinyin
# set preferences
$ ibus-setup
bin, ssh, hosts
ln -s ~/Dropbox/code/bin /home/lee/bin
# add 'PATH=~/bin/:$PATH' to ~/.bashrc
ln -s ~/Dropbox/work/litb/ssh-config .ssh/config
ssh, keychain
# generate key pairs
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/lee/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/lee/.ssh/id_rsa.
Your public key has been saved in /home/lee/.ssh/id_rsa.pub.
The key fingerprint is:
d3:43:6f:93:e4:70:37:ed:54:af:0a:94:b7:0a:e1:45 lee@lee-ubuntu
The key's randomart image is:
+--[ RSA 2048]----+
| E .|
| . . .o|
| . * + o +|
| . * B + = |
| S + B . .|
| o = o |
| . . |
| |
| |
+-----------------+
$ ssh-copy-id lee@guisheng.li
$ sudo apt-get install keychain
# add following line to ~/.bash_profile
# keychain, passwordless ssh
/usr/bin/keychain $HOME/.ssh/id_rsa
source $HOME/.keychain/$HOSTNAME-sh
backup guisheng.li crontab
add a cronjob: guisheng.li.backup.sh
relabel usb hard drive
reference: [RenameUSBDrive]
$ sudo fdisk -l # find the usb drive
$ sudo umount /dev/sdc1 # unmount the drive
# IMPORTANT: 'ntfslabel' is for renaming ntfs drive, for drive of other filesystem, check the reference
$ sudo ntfslabel /dev/sdc1 # check current label
My Passport
$ sudo ntfslabel /dev/sdc1 my_passport # change the label
# unplug the drive, then plug it again, check the label
$ sudo blkid
...
/dev/sdc1: LABEL="my_passport" UUID="4E1AEA7B1AEA6007" TYPE="ntfs"
# done
remove the email icon on top bar
ref: http://askubuntu.com/a/533836/159823
fonts-arphic-uming (文鼎楷体) fonts-arphic-uming (文鼎宋体)
visit this page to generate a font configuration file if any problem encountered: http://wenq.org/cloud/fcdesigner_local.html
$ sudo apt-get install fonts-arphic-uming
# tweak system fonts
$ sudo apt-get install unity-tweak-tool
put the fonts file (.ttf) in ~/.fonts
# mail
$ sudo apt-get install sendmail
$ sudo apt-get install php5
$ sudo apt-get install php5-dev php-pear
$ sudo apt-get install php5-curl php5-mcrypt php5-memcached php5-mysql php5-xdebug php-apc php5-memcache
# local memcache server
$ sudo apt-get install memcached
# when asked about this:
# 'OpenSSL install prefix (no to disable SSL support) [/usr] :'
# when you input '/usr', you got error, input 'yes' here, then everything is ok
$ sudo pecl install stomp
# phpunit
$ sudo apt-get install phpunit
$ pear config-set auto_discover 1
$ pear install pear.phpunit.de/PHPUnit
# mysql
$ sudo apt-get install mysql-client mysql-server
# apache
$ sudo apt-get install apache2
$ sudo a2enmod rewrite # enable a module
$ sudo service apache2 restart # restart apache
# install composer
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
install ice-php, for Vela search, we need php-zeroc-ice 3.3.*, which can be found in Ubuntu 10.04 Lucid's repository, whild Ubuntu 12.04 Precise's repository contains php-zeroc-ice 3.4.*, to install the 3.3 version, add this lines to your /etc/apt/sources.list
deb http://cn.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
then,
$ sudo apt-get update
$ apt-cache show php-zeroc-ice # will show both 3.3 and 3.4 version info
$ sudo apt-get install php-zeroc-ice=3.3.1-12 # install the 3.3 version
$ cp ~/Dropbox/config/etc/php5/conf.d/ice.* /etc/php5/conf.d/ # copy config files
or, install from source, ref: https://dev.tbox.me/projects/vela/wiki/Ice_install
**NOTICE:**
Seems like if installing python in a customized location, the readline module is not enabled, which is cumbersome for interaction at the command line
# download python tarball, extract it
# cd Python-3.3.2/
# ./configure --prefix='/opt/python3.3.2'
# make
# sudo make install
# add python3.3 to path
sudo ln -s /opt/python3.3.2/bin/python3.3 /usr/bin/python3.3
# install setuptools
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python3.3
sudo ln -s /opt/python3.3.2/bin/easy_install-3.3 /usr/bin/easy_install-3.3
# install pip
sudo easy_install-3.3 pip
sudo ln -s /opt/python3.3.2/bin/pip-3.3 /usr/bin/pip-3.3
# ipython
sudo pip-3.3 install ipython
# MySQLdb module
$ sudo apt-get install python-mysqldb
# Tkinter
$ apt-cache search python-tk
# pylab, matplotlib
# pre-built package: python-matplotlib
install Oracle JDK (maybe better than OpenJDK for Eclipse suport)
ref: http://www.cnblogs.com/Wisp/articles/3099494.html
!! apt-get install may fail, download jdk manually and move it to /var/cache/oracle-jdk7-installer
sudo mv ~/downloads/oracle-jdk7-installer.tar.gz /var/cache/oracle-jdk7-installer
Nvidia Drivers: http://www.webupd8.org/2016/06/how-to-install-latest-nvidia-drivers-in.html
http://www.geforce.com/drivers
$ gnome-session-properties # a gui for editting startup applications
# the config files are in ~/.config/autostart/
if you want a sudo service to autostart, add the command to `/etc/rc.local`
sudo apt-get install compizconfig-settings-manager compiz-plugins
then use the 'Put' in 'Window Management' to set a shortcut for moving window between monitors
# set up dropbox daemon to run at ubuntu startup, see: http://www.dropboxwiki.com/Ubuntu_Startup
# the 'update-rc.d' line in the tutorial may not appropriate, it should start late and stop early, use the following line instead:
# sudo update-rc.d dropbox start 98 2 3 4 5 . stop 2 0 1 6 .
# use the rc.d do not show the dropbox icon in status bar, add '/home/lee/.dropbox-dist/dropbox' to 'Startup Applications'
# customize Launcher
# show Launcher items
$ gsettings get com.canonical.Unity.Launcher favorites
['firefox.desktop', '/home/lee/Dropbox/config/home/eclipse.desktop', 'google-chrome.desktop', 'virtualbox.desktop', 'nautilus-home.desktop', 'gnome-control-center.desktop']
# .desktop files usually stored in ~/.local/share/applications/ or /usr/share/applications/
# you can edit those files, once .desktop files are placed in those two folders, you can found them through Dash, and drag them to the Launcher from Dash