My Avatar

LanternD's Castle

PhD Student in ECE @ MSU

Thinks to Do After Installing Ubuntu 17.10

2017-11-27

A quick note. It includes installing packages and configuring the system. Most of the stuff works for other Ubuntu versions as well.

Final update: 2018.03.20

Software and Library Installation 

TL;DR

1
sudo apt install git emacs25 vim python-apt python-pip python3-pip curl zsh ruby-full cmake silversearcher-ag autojump gir1.2-gtop-2.0 gir1.2-networkmanager-1.0

Install through CLI

Add sudo if needed.

git

1
apt install git
1
2
3
4
git config --global user.name "LanternD"
git config --global user.email the_email@gmail.com
git config --global core.editor emacs
git config --global credential.helper cache

curl

apt install curl

Zsh (Z shell)

apt-get install zsh

Follows by oh-my-zsh (Official Github Link).

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

after adding ubuntu plugins in zsh, we will have alias agi="sudo apt-get install.

pyenv

Link: Pyenv/pyenv - GitHub

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbnings and errors from the command linez2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesservice cups restart5-dev libncursesw5-dev xz-utils tk-dev

curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer \| bash

Don’t forget the add PATH and eval stuff to the .bashrc or .zshrc (Step 3 in the installation tutorial).

After the installation, use pyenv to install certain python version.

python global 3.6.x

Get ride of every annoying version selection between Python 2.7.x and 3.6.x.

pip

apt install python-pip python3-pip

Emacs

apt install emacs25

Emacs Configuration

  1. First git clone the .emacs.d to ~ directory.
  2. Use symbolic link to create ~/.spacemacs.d folder. ln -s ~/Dropbox/Misc_Cfg_Sync/.spacemacs.d ~/.spacemacs.d

Vim

apt install vim

Sublime Text 3

Official site: Linux Repositories

1
2
3
4
5
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

LaTeX environment

Ruby

Tutorial: Ruby Installation

apt-get install ruby-full

The packages in ruby:

cmake

Simply apt install cmake.

Zotero

Pinyin input method

fcitx

Follow this link.

1
2
3
add-apt-repository ppa:fcitx-team/nightly
apt-get update
agi fcitx fcitx-module-cloudpinyin fcitx-googlepinyin fcitx-sunpinyin

[!important] fcitx only works in Xorg environment, make sure you log into that.

Let fcitx start after loging-in. Use gnome-tweaks-tool to do so.

Sogou Pinyin Input Method

Tutorial: Sogou Pinyin Official Help

gtk missing packages

Sometimes the gtk+ GUI looks ugly, that is because of the missing of some packages, such as pixmap and adwaita.

This can be reproduced by running a software with command line. There will be a warning like:

Gtk-WARNING **: Unable to locate theme engine in module_path: “pixmap”

Gtk-WARNING **: Unable to locate theme engine in module_path: “adwaita”

Install them to solve this issure.

1
2
agi gtk2-engines-pixbuf
agi gnome-themes-standard

ag

Tutorial: the_silver_searcher - Github

A fast code searching tool.

apt-get install silversearcher-ag

autojump

agi autojump

PostgreSQL

Tutorial: How to Install PostgreSQL 10 on Ubuntu 16.04 and 14.04 LTS

Add the Apt Repo to source list in Ubuntu and then sudo install.

sudo apt-get install postgresql postgresql-contrib

Python use psycopg2 to manipulate the PostgreSQL database. Do not forget to install it as well.

pip install psycopg2

Tutorial: Setting a password for the postgres user

Use psql command and \password command to do so.

Update: it would be less painful to create a new role (user) and use it to create a database.

pgAdmin

A python-written program that manages PostgreSQL. Install it using python wheel. Use python in system (not those in pyenv) to install.

pip install pgAdmin

This app requires sudo permission to run.

powerline

pip install powerline-status

Install via .deb file

Google Chrome

Of cause. Link: Chrome.

Dropbox

Use the client provided by Dropbox. Download link.

VNC Viewer

It supports connection from remote computers.

Download, install, login, done. Google Remote Desktop somewhat does not support Ubuntu 17.10.

The VNC Viewer only works under Xorg environment.

Visual Studio Code

An programming IDE provided by Microsoft. Link.

Install via ppa

Settings

GitHub SSH key

Follow the instructions on these two posts:

Remove Unused Folders in Home

Tutorial: Ubuntu - permanently remove ~/Videos and ~/Public

Change the following:

Then we can rmdir those folders.

Replace Caps Lock by Ctrl

Tutorial: MovingTheCtrlKey - EmacsWiki

Install GNOME Tweaks and changes the settings: Keyboard & Mouse -> Additional Layout Options -> Caps Lock key behavior -> Caps Lock is also a Ctrl.

Enable vim in sudo mode

alias svim="sudo -E vim"

Disable Auto Printer Discovery

Tutorial: How do I disable automatic remote printer installation?

SSH timeout settings

Prevent the disconnection due to keyboard inactive.

Link: 解决SSH自动断线,无响应的问题

1
2
3
4
sudo vim /etc/ssh/ssh_config
# Add or uncomment the following code at client side
ServerAliveInterval 20
ServerAliveCountMax 999

And

1
2
3
4
sudo vim /etc/ssh/sshd_config
# Uncomment the following code at server side 
ClientAliveInterval 30
ClientAliveCountMax 6

(Sometimes this file is not there.)

UI Related

Add Fonts

Tutorial: How To Install New Fonts In Ubuntu 14.04 and 16.04

Font list:

Gnome Extensions

Gnome Extensions

apt install gir1.2-gtop-2.0 gir1.2-networkmanager-1.0

Remove Redundant Icons and Softwares

sudo rm -f /usr/share/applications/com.canonical.launcher.amazon.desktop

sudo rm -f /usr/share/applications/ubuntu-amazon-default.desktop

sudo apt-get autoremove firefox firefox-locale-en

Beautify the UI

Theme

Icons

ZSH themes

Most of the work is done by synchronizing the .oh-my-zsh folder and .zshrc file via Dropbox, the rest things we can do is:

1
apt-get install fonts-powerline

Lagacy (not used anymore)

Google Drive

Update: I don’t use Google Drive anymore because it doesn’t officially support Linux.

Bad solution: In Ubuntu Settings, enter Online Accounts, and add Google account. After a while, the files in Google Drive will be synchonized as a mounted folder.

Better solution: the above method is not convenient. Use Grive2 instead.

Just follow the instructions. Remember to add the .griveignore file before running grive -a command.

GNU Radio

Tutorials: GNURadio - GitHub

Follow the instruction. Use pybombs to install it. It will take care of UHD at the same time.

WhatPulse

Tutorial: WhatPulse Linux Installation

Optional.

Code block test

1
2
3
4
5
6
7
8
9
10
11
12
def run():
    x = 12
    y = "simple"
    print("This is the end", x, y)

def bubble_sort(items):
    """ Implementation of bubble sort """
    for i in range(len(items)):
        for j in range(len(items)-1-i):
            if items[j] > items[j+1]:
                # Swap!
                items[j], items[j+1] = items[j+1], items[j]


Disqus Comment 0