11/13/2012 - 4:04 PM

Kubuntu setup for PC

Kubuntu setup for PC

Kubuntu Setup For PC

This article is about how to install a Kubuntu on the computer, and something that makes it better to use.

The contents is ordered by importance, so it's recommend to read and practice in sequence.

.. contents::


1. Download kubuntu 12.04.

2. Make a start-up usb disk.

3. Install step by step.

   - Choose English as the language to make life easier.

   - It's better to mount ``/`` and ``/home`` seperately

Basic softwares

1. Update software sources::

       sudo kate /etc/apt/sources.list

   Copy contents below [1]_::

       deb precise main restricted universe multiverse
       deb precise-security main restricted universe multiverse
       deb precise-updates main restricted universe multiverse
       deb precise-proposed main restricted universe multiverse
       deb precise-backports main restricted universe multiverse
       deb-src precise main restricted universe multiverse
       deb-src precise-security main restricted universe multiverse
       deb-src precise-updates main restricted universe multiverse
       deb-src precise-proposed main restricted universe multiverse
       deb-src precise-backports main restricted universe multiverse

   .. [1] from:

   Save and exit, then execute::

       sudo apt-get update

2. Install softwares::

       sudo apt-get install build-essential

       sudo apt-get install vim

       sudo apt-get install zsh

       sudo apt-get install git-core tig qgit

       sudo apt-get install pidgin

       sudo apt-get install yakuake

       sudo apt-get install unzip

       sudo apt-get install shutter

       sudo apt-get install conky feh

       sudo apt-get install moc cmus

       sudo apt-get install xclip

       sudo apt-get install curl

   .. MountManager

      Seems noneed since kubuntu has a built-in tool in System Settings

   .. should write in python development: sudo apt-get install ipython bpython


System Settings
Open **System Settings** in Application Launcher

- Locale

  Install language packages by prompt

  Country/Region & Language → Date & Time

  + Long date format: *YYYY-MM-DD, WEEKDAY*

  + Short date format: *YY-MM-DD*

- Shortcuts and Gestures

  + Custom Shortcuts

    =======  =======
    konsole  Alt + S
    =======  =======

  + Global Keyboard Shortcuts

    =====================  =========================  ============
    KWin                   Switch to Desktop n        Meta + n
    KWin                   Show Desktop               Meta + D
    KWin                   Show Desktop Grid          Meta + W
    KWin                   Walk Through Desktop List  Meta + tab
    KWin                   Keep Window Above Others   Meta + T
    KWin                   Max Window                 Alt + F1
    KWin                   Max Window Vertically      Alt + F2
    Run Command Interface  Run Command                Meta + Space
    =====================  =========================  ============

- Workspace Appearance

  + Desktop Theme:

    - Big-Blue

    - Caledonia

    - Fushigi

    - Helium One

    - Opaquity

    - Oxygen

    - Wave

  + Splash Screen

    - Caledonia-KSplash

- Window Behavior

  + Task Switcher

    Main → Effect → Layout based switcher

- Input Devices

  + Keyboard

    Advanced → ☑ Swap Ctrl and Caps Lock

- Power Management

  + Energy Saving Settings

    Adjust ``Display Brightness`` in ``On AC Power`` to change default screen brightness

- Removable Devices

  Configure disk D to be automounted

- Startup and Shutdown

  + Autostart

  + Session Management

    Change session behavior in ``On Login``

- Desktop Effects

  Deactivate effects to improve UI performance.

- Application Appearance

  Disable Oxygen Animations:

  Style → Applications → Widget style → Configure → Show advanced.. → Animations → Uncheck "Enable animations"

Open **Muon Update Manager** in Application Launcher

Menu → Settings → Configure Muon Update Manager → uncheck ``Distribution upgrades``


Hide unused entries on the left

Hide right side panel


Set shortcuts

- tab switch

- full screen

Command-line Configs


Setup ssh::

    cd ~/.ssh
    ssh-keygen -t rsa -C ""

Go to and add new key from the content of ````.




    git clone
    cd dotfiles -i


Add tango colorscheme to konsole ::

    cp tango.colorscheme ~/.kde/share/apps/konsole


    Now colorscheme file folder may be at ``/usr/share/kde4/apps/konsole``



    cp conky/conkyrc ~/.conkyrc
    cp conky/ ~/.kde/Autostart


Start editing::

    sudo visudo

To make shell variable ``http_proxy`` effective for sudo.

after ``Defaults env_reset``, add line::

    Defaults env_keep = "http_proxy ftp_proxy"


Open(or create) ``~/.ssh/config``


    Host dev
        Port 22000
        User foo

If the host need private key file, which is normally added after option ``-i``, add ``IdentityFile``


    Host dev
        IdentityFile ~/.ssh/dev.example.key


Two places to add script or application entry for autostart

- ``~/.config/autostart``

- ``~/.kde/Autostart``



    UUID=2A72A99A72A96AF1 /media/D ntfs-3g users 0 0

3rd Party Softwares

Sometimes a proxy is needed if the source is blocked in your current network environment.


    export http_proxy="http://user:password@address:port"
    sudo apt-get update


1. Preparation::

    sudo apt-get build-dep fcitx

2. Install all relevant modules


2.5 Run ``qtconfig-qt4``, and set fcitx as the default method

3. ``~/.xprofile`` could be created to ensure::

    export XMODIFIERS=@im=fcitx
    export GTK_IM_MODULE=fcitx
    export QT_IM_MODULE=fcitx

4. Execute::

    im-switch -s fcitx -z all_ALL

5. Panel Tool Box → Add Widgets

   add ``Input Method Panel`` to panel and configure it.


Setup key with::

    wget -q -O - | sudo apt-key add -

Setup repository with::

    sudo sh -c 'echo "deb stable main" >> /etc/apt/sources.list.d/google.list'

Setup package with::

    sudo apt-get update
    sudo apt-get install <package name>

*<package name>* could be:

- google-chrome-stable

- google-chrome-unstable

- google-chrome-beta


1. Download

2. Install `Package Control <>`_

   ``Ctrl + \``` to open the console, and paste

    import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen(''+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'


    If error always occurs, use code from

3. Install Packages

   - Git

   - SublimeCodeIntel

   - SublimeLinter

   - Terminal

   - Theme - Nil

   - Theme - Phoenix

   - Theme - Soda

   - Tomorrow Color Schemes

   - VintageE

4. Settings

   **Settings - User**::

        "color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
        "default_line_ending": "unix",
        "ensure_newline_at_eof_on_save": true,
        "font_size": 11,
        "rulers": [80, 120],
        "soda_classic_tabs": false,
        "theme": "Soda Light.sublime-theme",
        "translate_tabs_to_spaces": true,
        "trim_trailing_white_space_on_save": true

   **SublimeCodeIntel - Settings - User**::

        "codeintel_live": false

   **SublimeLinter - Settings - User**::

        "sublimelinter": "load-save"

5. Add some textmate colorschemes


    git clone

   Copy the folder to ``~/.config/sublime-text-2/Packages``

   *Another colorscheme called `carlcalderon
   <>`_ is also pretty good*

6. Application Entry & Command

   create a symbolic link of sublime::

    sudo ln -s /place/of/sublime/executable /usr/local/bin/sublime

   right click the ``Application Launcher`` and choose ``Edit Applications``

   add a new entry, using icons from `github <>`_

   or create a file named ``sublime.desktop``::

    [Desktop Entry]
    Name=Sublime Text 2
    # Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
    # From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
    GenericName=Text Editor

    Icon=/usr/lib/Sublime Text 2/Icon/48x48/sublime_text.png

    [NewWindow Shortcut Group]
    Name=New Window
    Exec=sublime -n

   and copy it to ``/usr/share/applications``






sudo apt-get install nginx

sudo apt-get install redis-server



    sudo apt-get install python-software-properties
    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get update
    sudo apt-get install nodejs npm



    sudo apt-key adv --keyserver --recv 7F0CEB10
    sudo sh -c 'echo "deb dist 10gen " > /etc/apt/sources.list.d/10gen.list'
    sudo apt-get update
    sudo apt-get install mongodb-10gen


    sudo update-rc.d -f nginx disable
    sudo update-rc.d -f redis-server disable



    sudo apt-get install mysql-server

modify /etc/mysql/my.cnf::

        default-character-set = utf8
        character-set-server = utf8
        default-character-set = utf8


    $ sudo service mysql restart

install tool bundle `MySQL Workbench <>`_

See another gist: