Ubuntu setup note

This is the notes taken when I installed and configured the Ubuntu 6.06LTS (Dapper).

Useful references:

 

  1. duo core

    system->adminitrator->synaptic

    search for "smp kernel", then choose the "linux-686-smp"

  2. check for sound card

    system->preference->sound

    see if there is something listed under "default sound card"

  3. screen resolution

    if u r happy with what you've got, skip this. otherwise, check the following:

    • System->preference->screen resolution
    • if it doesn't have what you've got, check the spec of your laptop and
        find out the graphic card on your laptop.
    • then search for "ubuntu dapper graphic card your_card_name", and see
        what people recommend
    • I have Intel Graphics Media Accelerator 950, I need to install the package
        915resolution and followed
        http://xoomer.alice.it/sam_psy/soft/ubuntu_install.html

  4. make totem to work

    Follow Ubuntu Documentation, Restricted Formats:

    Note:

  5. install mplayer package
    • install mplayer, mozilla-mplayer via synaptic
    • install mozplugger, which is a plugin for Mozilla (Firefox) to
        'glue' Mozilla to almost any application.
    • To use mplayer to watch ntdtv streaming, do the following:

        # Open Firefox, type "about:config" (no quotes) in the address window,
          and click enter.
        # Right click on the window and choose <New>, then <String> from
          the pop-up menu that appears.
        # In the first pop-up box, enter: "network.protocol-handler.app.mms"
          (no quotes, and it might just be easier to cut 'n paste this into the box).
        # In the next pop-up box enter the path to mplayer (e.g. "/usr/bin/mplayer").
        # Now, click in the main window again but choose <New> <Boolean>
        # In the first pop-up box, enter: "network.protocol-handler.external.mms"
        # In the second pop-up select <True>.

  6. speed up dns lookup
    • if you notice that dns lookup takes a long time, try follow this page:

        # open firefox and type 'about:config' in the address bar (without the quotes). Now 'ipv6' (again no quotes) in the filter. You'll see a line beginning 'network.dns.disableIPv6. Right (or double) click on 'false' to turn it to 'true'. Close firefox and reopen it.

      (extracted from
      http://www.ubuntuforums.org/showthread.php?p=1371594)

  7. install keychain package

    * to configure, make sure that you have your ssh key generated first. Then
    add the following lines into your .bash_profile

    keychain id_rsa

    Add the following lines into your .bashrc file:

    [[ -f $HOME/.keychain/$HOSTNAME-sh ]] && source $HOME/.keychain/$HOSTNAME-sh
    [[ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]] && \
            source $HOME/.keychain/$HOSTNAME-sh-gpg

    Add the following lines (as sudo) into your /etc/profile:

    [[ -f $HOME/.bash_profile ]] && sourc $HOME/.bash_profile

  8. make a fancy prompt

    open .bashrc, and change the line that sets PS1 to this

    PS1='\A ${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\[\033[01;35m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

  9. setup SCIM

    follow https://help.ubuntu.com/community/SCIM

    also need these:
    # sudo apt-get install libapt-pkg-perl scim-qtimm
    before running
    # im-switch -z en_US.UTF-8 -s scim
    (replace en_US.UTF-8 with the locale you are using)

    then add this line to ~/.scim/global:
    /SupportedUnicodeLocales = en_US.UTF-8
    (replace en_US.UTF-8 with the locale you are using)

  10. set hostname

    open
    # gksudo network-admin
    then choose the 'General' tab, and change the hostname as desired.

  11. remove games menu

    I couldn't find ways to remove the game package without removing the desktop
    package. the only way i found is
    applications->accessories->alacarte menu editor

    then select "games", and uncheck every game application.

    this will remove the game menu.

  12. svn

    install subversion via synaptic

    also you may want to install the packages kdiff3 and tkdiff.

  13. disable touchpad

    if you are like me and got crazy about touchpad messing up my typing, follow
    this:
    http://www.beginningubuntu.com/dapper_tips.html#Turning_off_touchpad_tap...

  14. firewall and security

    install the packages via synaptic

      # firestarter
      # ethereal
      # nessus
      # nessusd

  15. extra fonts

    install
      # xfonts-intl-chinese
      # xfonts-intl-chinese-big
      # xfonts-intl-european
      # xfonts-intl-phonetic
      # gsfonts-x11
      # msttcorefonts
    then do
      # sudo fc-cache -f -v

  16. test the printer
    • connect the local printer. if it is connected to a USB, check "lsusb" to
        see if it is detected.
    • try to print a page, especially chinese (gb2312 code and utf8 code)
    • you may want to install the enscript, a2ps, and gnome-u2ps packages,
        which converts your text files
        to PostScript, HTML, RTF or Pretty-Print and stores generated output
        to a file or sends it directly to the printer.
  17. securing the wireless
    disable the wireless if you not using it.
  18. envioronment variables

    I was puzzled to noticed that neither /etc/profile nor $HOME/.bash_profile
    was loaded. According to articles on the net, it seems that debian is not
    doing it right. So the fix to this is to add the lines below into ~/.gnomerc:

      if [ -f etc/profile ]; then
        . /etc/profile
      fi

      if [ -f ~/.bash_profile ]; then
        . $HOME/.bash_profile
      fi

  19. install secway linux

    goto this page http://www.secway.fr/us/products/simpserver/download.php

    first you need to find out what version of libstdc++ you have:

      # dpkg -l |grep libstdc
    Then download the appropriate version.

    untar the package and move the entire directory to /usr/local

    Start /usr/local/simp/bin/simpserver before you start your gaim. Then configure
    your msn IM in gaim to use simpserver.

  20. learn desktop navigation

    bookmark this page and read it when you have time:

    http://www.gnome.org/learn/access-guide/2.14/

  21. setup reminder
    1. first, download a music. below pretend that you saved the file
        as $HOME/Desktop/SFRT.mp3
    2. then, type # crontab -e
    3. then enter the following 4 lines

      55 05 * * * mplayer $HOME/Desktop/SFRT.mp3 -really-quiet 2&>1 > /dev/null
      55 11 * * * mplayer $HOME/Desktop/SFRT.mp3 -really-quiet 2&>1 > /dev/null
      55 17 * * * mplayer $HOME/Desktop/SFRT.mp3 -really-quiet 2&>1 > /dev/null
      55 23 * * * mplayer $HOME/Desktop/SFRT.mp3 -really-quiet 2&>1 > /dev/null

        # if you are not in estern timezone, change the hour.
        # when daylight saving time is over, you need to manually adjust the crontab.

    4. quit crontab and you are set. To see what you've got in your crontab setup,
        type "crontab -l".
  22. usb hard drive
    1. connect the usb hard drive
    2. run # lsusb
        See if your hard drive is recognized
    3. run # sudo fdisk -l
        this will tell you the device name, such as /dev/sdb
    4. run # sudo fdisk /dev/sdb
        press "n" to create a new partition;
        press "1" to number the first partition;
        then press "p" to create a primary partition
        and finally assign the size you wish to this partition.
        Repeat this process for the second partition pressing "2" instead of "1".
        Press "t" to change the partition identification, (press L to see what
            there is. You will likely use "83");
        Then press "w" to exit saving changes to the disk
        and you will have your partitions ready to be formated.
        Afterwards, use mkfs -t ext3 /dev/sdb1 to format the first (Linux) partition.
    5. mount the new disk
        # sudo mkdir /data1
        # sudo mount /dev/sdb1 /data1
          (you will to repeat this everytime you connect the disk, so add an alias
           in your .aliases file: alias musb='sudo mount /dev/sdb1 /data1')
    6. check the new file system disk space usage:
        # fd -h
  23. install the make/gcc/g++ stuff
    • install
        sudo apt-get install build-essential manpages-dev autoconf automake
                     libtool flex bison gcc-doc g++ bison-doc libltdl3-dev
                     libtool-doc
                     sysstat
    • if I need java compiler, I may need to install "gcj", "the GNU compiler
        for Java.
  24. CD burner
    * install gnomebaker via synaptic
  25. setup bestcrypt

    Bestcrypt is a piece of junk, per my experience. It caused my harddrive
    to crash and I had to reformat the drives and reinstall the OS.

    If you absolute want to use bestcrypt, here is the Howto:

    * download bestcrypt for linux from http://www.jetico.com/download.htm

    * # tar zxf the_downloaded_file

    * # cd bcrypt
      # make
      if "make fails", reference the note below.

      # install libncurses5 and libncurses5-dev from synaptic
      # also check if you have installed the kernel-source packages
        (note: i first installed the wrong version of the kernel-source and
         had a hardtime compiling, until i removed the old version and installed
         the proper version.)
      # cd /usr/src
      # tar jxf linux-source-2.6.15.tar.bz2
      # ln -s linux-source-2.6.15 linux

    * back to you bcrypt directory, and try "make" again if u had to fix/install
      the kernel source package

      # sudo make install

    * now that you have installed bcrypt, you need to load it first:
      # sudo /etc/init.d/bcrypt start
        When I ran this cmd the first time, I got an error message
        $ sudo /etc/init.d/bcrypt start
        Initializing BestCrypt.
        touch: cannot touch `/var/lock/subsys/bcrypt': No such file or directory

        so I created the missing directory
        $ sudo mkdir /var/lock/subsys

    * now try the cmd "bctool"
      also run the script bc.sh to create the container for home directory
      and setup the encrypted home dir. Please read the script carefully,
      and change the SIZE, ALGO, FSTYPE, etc.

  26. setup email clients
    1. install mozilla-thuderbird and mozilla-thunderbird-enigmail
    2. setup your gpg keys
    3. start thunderbird, and add your accounts. check to see that you accounts
        work.
    4. below will move your emails to a seperate encrypted disk.
        (bestcrypt actually cause excess amount of disk usage and damaged my disk.
         So I stopped using it.)

        # quit thunderbird
        # sudo bctool -v new /var/data/mail.jbc -s 1G -a blowfish
        # sudo bctool format /var/data/mail.jbc -t ext3
        # sudo chown $USER:$USER /var/data/mail.jbc
        # sudo mkdir /var/mail2
        # sudo chown $USER:$USER /var/mail2
        # bctool mount /var/data/mail.jbc /var/mail2
        # cd /var/mail2

        # cd ~/.mozilla-thunderbird
        # locate the directory name for the thunderbird profile, something like
          xxxxxxxx.default
        # mv xxxxxxx.default /var/mail2/
        # ln -s /var/mail2/xxxxxxx.default

        # now restart your thunderbird and see all your accounts and emails are still
          there.

        # next time after your reboot, you shall first do
          bctool mount /var/data/mail.jbc /var/mail2
          before you start your thunderbird

    5. if you want to have the new mail icon in the system tray, checkout
        moztraybiff from
        http://moztraybiff.mozdev.org/releases.html
        (but I could not install it. It said my version did not match)
    6. you can read http://www.mozilla.org/support/thunderbird/faq for more FAQ.
  27. Add windows fonts

    Get some font files from a Windows box (windows/fonts/*.ttf) and copy them
    to ~/.fonts

  28. backup system
  29. handy utility packages:
    * tofrodos vim-gnome libwww-perl libcrypt-ssleay-perl perl-doc curl
      glibc-doc
      libgd-graph-perllibcompress-zlib-perl
      libxml-simple-perl

    * cpan CDB_File Encode::HanConvert Time::HiRes

      cpan CGI::Application HTML::Template CGI::Application::Plugin::AutoRunmode
           CGI::Application::Plugin::AutoRunmode::FileDelegate      
           CGI::Application::Plugin::ConfigAuto
           Number::Format Search::Binary Chart::Points
           CSS::Minifier JavaScript::Minifier

      apt-get install php5 php5-curl php5-gd php5-json
                      php5-mysql php5-mysqli mysql-server phpmyadmin
                      dbishell mailx php5-mcrypt
                      gftp nvu a2ps enscript
                     
                      gnome-photo-printer
                      gnochm (CHM reader)

  30. remaster ubuntu
    (this section to be completed)

    http://wiki.oss-watch.ac.uk/UbuntuDapper/Remaster
    https://help.ubuntu.com/community/LiveCDCustomization/6%2e06
    http://wiki.oss-watch.ac.uk/UbuntuDapper/Remaster
    http://files.akl.lt/Linux/Ubuntu/custom-dapper-livecd.htm
    http://uck.sourceforge.net/

  31. Truecrypt

    * make sure you have the kernel-header and kernel-source

    * download from http://www.truecrypt.org/downloads2.php

    * follow the "method 2" in http://ubuntuforums.org/showthread.php?t=199367

  32. disable ipv6

    If your network use older router/firmware, and you experience slow network
    dns lookup, you may try to disable ipv6. Follow
    http://ubuntuforums.org/showthread.php?t=265897&highlight=disabling+ipv6...

    The steps for disable ipv6 in the entire system, do

    1. Edit hosts - comment out ipv6 lines
    2. Modify etc/modprobe.d/alias
      alias net-pf-10 ipv6 off
      alias ipv6 off
    3. Modify etc/modprobe.d/blacklist
      blacklist ipv6
      3-alternlate. Some say you can also create a file in modprobe.d named blacklist-ipv6 and put the blacklist ipv6 line in the file for the same effect.

  33. openvpn

    install openvpn package. then follow admin's instruction.

    need liblzo-dev and libssl-dev

  34. Apache friend, zend framework, APC

    * download both lampp and lampp-devel package, and extract them into the same
      location of /opt/lampp

    * Download APC from pecl (http://pecl.php.net/package/APC),
      (read more in http://us2.php.net/apc),
      and follow the INSTALL file in the package, and do

      $ /opt/lampp/bin/phpize
      $ ./configure --enable-apc --enable-apc-mmap --with-apxs=/opt/lampp/bin/apxs --with-php-config=/opt/lampp/bin/php-config
      $ make
      $ sudo make install
      $ update php.ini to enable APC

  35. install Dia
    * install package libbtctl2 libbtctl2-dev libxml-parser-perl libpango1.0-dev
    * install libart libart2.0-dev libgtk2.0-dev
    * install libgdk-pixbuf2 libgdk-pixbuf2-dev
    * install libxslt1.1-dev
  36. install IEs4Linux
    * install winehp via apt-get or aptitude
    * wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
    * tar zxvf ies4linux-latest.tar.gz
    * cd ies4linux-*
    * ./ies4linux

      Reference http://www.tatanka.com.br/ies4linux/page/Installation:Ubuntu

  37. skype

    * download skype from skype.com's download site
    * install it
    * If invoking "skype" fails, then create an alias:
      alias skype='export LANG=c; QT_IM_MODULE=xim skype'
    * Invoke the skype via the alias above.

    The reason for the alias is to get around an incompatibility of the qt lib
    used by scim and the qt lib used by skype. When you invoke the skype using
    this alias, you cannot type Chinese directly into your skype chat window.

  38. vpnc - the Ubuntu's built-in cisco vpn client
    http://www.cs.umn.edu/help/offsite/vpn.php

    Under Applications menu, there is an "Add/Remove..." item. Click that
        to bring up a window for "Add/Remove Applications". Select each items in
        the left side bar to see the avaiable popular apps. Then select the
        ones you are interested in and click "Apply" button.

  39. Allow more locale support

    reference http://forum.ubuntu.org.cn/about59961.html&sid=11476e70129e0ca3e724def68...

    * edit /var/lib/locales/supported.d/zh
      make the file contain:
      zh_SG.UTF-8 UTF-8
      zh_HK.UTF-8 UTF-8
      zh_TW.UTF-8 UTF-8
      zh_CN.UTF-8 UTF-8
      zh_CN.GB2312 GB2312
      zh_CN.GBK GBK
      zh_CN.GB18030 GB18030
      zh_HK.Big5 Big5
      zh_TW.Big5 Big5
    * run "sudo locale-gen"

  40. fonts for wine-d apps
    Get some font files from a Windows box (windows/fonts/*.ttf) and copy them to ~/.wine/drive_c/windows/fonts
  41. Performance

    Improve Gnome performance:
    http://www.novell.com/documentation/nld/index.html?page=/documentation/n...

    To examine a process's memory usage, use "pmap pid"

    Reduce memory usage in Firefox:
    http://googlesystem.blogspot.com/2006/04/reduce-memory-usage-in-firefox....

  42. record/convert//stream audio and video

    aptitude install ffmpeg