02 November 2014


sudo apt-get update
sudo apt-get upgrade
  • get the source code of some open source projects
  • Dropbox AT&T client
    sudo apt-get install
  • apt vs apt-get
vim-gnone g++ texlive cscope exuberant-ctags python
  • configure github and bitbucket
  • get vimfiles from github and configure vim.
  • font: Monaco, Inconsolata


To install an additional package, download the package into /usr/share/texlive/texmf-dist/tex/latex and then run sudo texhash.

AT&T Client

sudo apt-get install libidn11:i386 libgtk2.0-0:i386 libxml2:i386
sudo apt-get install libstdc++6:i386 tcl8.4:i386
sudo apt-get install libpango1.0-0:i386
sudo dpkg -i agnclient-compat_1.0-5-ocdc2_i386.deb
sudo dpkg -i agnclient_1.0~

Note: this step will remove the 64bit version of tcl8.4.



sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy

Flash for Chromium

  1. Install Google Chrome
  2. Add the following line to ~/.profile:
      export PEPPER_FLASH_VERSION=$(grep '"version":' /opt/google/chrome*/PepperFlash/manifest.json| grep -Po '(?<=version": ")(?:\d|\.)*')
  3. Add the following line to /etc/chromium-browser/default:
      CHROMIUM_FLAGS="--ppapi-flash-path=/opt/google/chrome*/PepperFlash/libpepflashplayer.so --ppapi-flash-version=$PEPPER_FLASH_VERSION"
  4. Log out
  5. Log in and start Chromium


Use gcc-7

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-7

update-alternatives \
  --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
  --slave /usr/bin/g++ g++ /usr/bin/g++-7

cpp is a master alternative instead of a slave of gcc:

sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-7 60

If the above command does not work, use the following commands:

cd /usr/bin
ln -s cpp-7 cpp

Use GCC-4.8

sudo update-alternatives \
  --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 61 \
  --slave /usr/bin/g++ g++ /usr/bin/g++-4.8

sudo update-alternatives --install /lib/cpp cpp /usr/bin/cpp-4.8 61

cd /usr/bin
ln -s /usr/bin/cpp-4.8 cpp

sudo update-alternatives gcc # Choose gcc-4.8
sudo update-alternatives cpp # Choose g++-4.8



  • Change to /usr/share/themes/Ambiance/gtk-2.0/gtkrc:

#F5F5C5 is yellow. #E7F3FD is blue.


In /usr/share/themes/Mbuntu-Mb/gtk-3.0/gtk-main.css, set tooltip_bg_color to #F5F5C5. For some unknown reason, the color actually shown in Eclipse is a little darker than what is specified. Maybe GTK does some processing of the tooltip_fg_color before showing it.

Wireless stop working after sceensaver

  • http://ubuntuforums.org/showthread.php?t=1232374
  • http://ubuntuforums.org/showthread.php?t=2182128&p=12830153#post12830153


If “Apply System Wide” is unchecked, the proxy setting only applies to the current logined user. If checked, it applies to all users. So if sudo is needed, the option should be checked. This option effects terminal but not terminator.

Swap Capslock and Esc

dconf write /org/gnome/desktop/input-sources/xkb-options “[‘caps:swapescape’]”

Backlight Issue

The following text is reproduced from Bug #1320659 Comment #9:

At the beginning, I have the following four problems:

  1. After every boot, the brightness is set to maximum.
  2. The brightness can’t be adjusted smoothly. Only 4 brightnesses can be achieved with Fn keys.
  3. After recovering from dimming, the brightness is set to maximum.
  4. The following error message is printed during the boot: [ 12.843633] thinkpad_acpi: Unsupported brightness interface, please contact ibm-acpi-devel@lists.sourceforge.net

The following workaround fixes 1 for me. http://askubuntu.com/questions/151651/brightness-is-reset-to-maximum-on-every-restart

I add “acpi_backlight=vendor” kernel parameter according to https://wiki.ubuntu.com/Kernel/Debugging/Backlight. This fixes 2 and 3 for me.

But 4 still exists.


I am using macbuntu. And I use unity-tweak-tool to adjust theme. For theme, I use Mbuntu-x. For icons, I use Mbuntu-osx.

Missing Data Time

Solution from http://itsfoss.com/fix-date-time-missing-menu-bar-ubuntu-1310/:

sudo apt-get install indicator-datetime
sudo dpkg-reconfigure --frontend noninteractive tzdata
sudo killall unity-panel-service


[INSTALL ORACLE JAVA 8 IN UBUNTU VIA PPA REPOSITORY [JDK8]] (http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html)

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo update-java-alternatives -s java-7-oracle

Choose a JDK:

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

How can I install Sun/Oracle’s proprietary Java JDK 6/7/8 or JRE?

MySQL 5.6 Installation


Gollum need ruby 1.9 or newer. Gollum is used by Github.

sudo apt-get install ruby
sudo apt-get install ruby-dev
sudo apt-get install libicu-dev
sudo gem install gollum


su -

Change the login shell:


Fix Locale Warning

How do I fix my locale issue?