Tag: Ubuntu


Posted by – October 12, 2010



sudo apt-get install xpdf-chinese-simplified xpdf-chinese-traditional

如果仍然中文乱码的话,需要安装poppler-data, 并且删除/etc/fonts/conf.d/49-sansserif.conf
sudo apt-get install poppler-data
sudo cp /etc/fonts/conf.d/49-sansserif.conf /etc/fonts/conf.d/49-sansserif.conf.bak
sudo rm /etc/fonts/conf.d/49-sansserif.conf



安装Foxit Reader for desktop Linux

Foxit Reader is a free PDF document viewer for the Linux platform. 提供一个deb包很方便。
FoxitReader_1.0-1_i386.deb [3.25 MiB]


Posted by – October 10, 2010

Linux下也有类似PQ Magic一样的图形化分区管理工具,他的名字叫gparted:
sudo apt-get install gparted

sudo without enter password

Posted by – October 10, 2010


%admin ALL=(ALL)ALL


kde desktop applet info

Posted by – October 7, 2010

1. kwriteconfig – Write KConfig entries (for use in shell scripts):

2.  kreadconfig – Read KConfig entries (for use in shell scripts)

3.  kde desktop applet src file locaiton:
This file recorder .desktop file location, groups info, etc…
We can change desktop files position by mouse on KDE Desktop, below file will record it…
the program kdeinit4: plasma-desktop [kdeinit]  recorde the poistion to file below.

/home/<userName>/.kde/share/config/plasma-desktop-appletsrc: ( below is a entry of firefox.desktop in this file)
geometry=46,391.745912850909,78.7183612323325,87.2540871490914                  (x,y)=46,391.745912850909, icon size=(78.7183612323325, 87.2540871490914)-(x,y)


4. /usr/bin/startkde auto start when new user login Kde X window.

5. plasma-desktop

Rename Ubuntu box name

Posted by – September 14, 2010

On terminal:
$ sudo vi /etc/hosts
$ sudo vi /etc/hostname
$ reboot

Refers to:

install ubuntu 10.10 on hard disk using iso file

Posted by – September 13, 2010

To install Ubuntu on hard disk using iso file:

1. Download ubuntu iso file to a disk partition(e.g.: /dev/sda3) root(/) dir which NOT the partition will install Ubuntu.

cd /
wget -c http://cdimage.ubuntu.com/daily-live/current/maverick-desktop-i386.iso

2. Only extract vmlinuz and initrd.lz from iso file the casper dir to the root(/) dir the iso file downloaded.
3. Reboot the box and enter into grub:


Once rebooted, when see the grub list, enter ‘c’ to enter into grub.
4. Type below grub commands to install Ubuntu from hard disk:

root (hd0,3)
kernel /vmlinuz   boot=casper    iso-scan/filename=/maverick-desktop-i386.iso ro quiet splash locale=zh_CN.UTF-8
initd    /initrd.lz

4. Once enter into the new system, installing ubuntu by clicking the icon on your desktop, and follow the tips to finish installation.

1. You can renmae iso file for short.
2. You can remove the locale parameter from the kernel( if not work, use ‘linux‘ instead) command.


Ubuntu mount permanently

Posted by – September 9, 2010

Ubuntu mount permanently: ( if not root, use sudo before each command below)
1. mkfs.ext3 or mkfs.ext4 your device like below:

[code lang=”bash”]mkfs.ext3 /dev/sda4

2. Modify /etc/fstab, and append below line to the file:

[bash]/dev/sda4    /home/freespace    ext3    default,noatime    0     0

3. reboot your box:


Using more /etc/fstab to see more info about how to add entry to fstab file see below:

root@JinLab:~/sda4# more /etc/fstab

# /etc/fstab: static file system information.
# Use ‘blkid -o value -s UUID’ to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda2 during installation
UUID=c1bc5ff4-157b-4e33-a30f-12e5691d77d0 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda1 during installation
UUID=69230e89-79fa-4bca-a37f-ce9461c31129 none            swap    sw              0       0

# /root/sda4 on /dev/sda4
UUID=2dbba927-0fb3-4ad0-97f0-9887364e5edc /root/sda4       ext3 defaults,noatime 0    0

Chm viewer on Ubuntun

Posted by – September 1, 2010

xchm: Compiled HTML Help (CHM) file viewer for X
To get it:
sudo apt-get install xchm

To search chm relates info:
sudo aptitude search chm

design: sign a Debian changes and dsc file pair using GPG/PGP

Posted by – August 1, 2010

On Ubuntu there are at least two methods to sign a debian changes & dsc file pair using PGP:
Enter into source codes dir, and type below each one commands:
1.sudo dpkg-buildpackage -sa -k$GPG_KEY

note: sign the pair during building package.

2. Two steps below:
1). sudo dpkg-buildpackage -sa
2). sudo debsign -k$GPG_KEY *.changes

note: sign the pair AFTER build package.

Vim on Debian

Posted by – July 7, 2010

The default vim configuration file locations on Debian/Ubuntu.

jin@jin-u10:/home/jin$ more  /etc/vim/vimrc
” All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
” /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
” you can find below.  If you wish to change any of those settings, you should
” do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
” everytime an upgrade of the vim packages is performed.  It is recommended to
” make changes after sourcing debian.vim since it alters the value of the
” ‘compatible’ option.

” This line should not be removed as it ensures that various options are
” properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim

” Uncomment the next line to make Vim more Vi-compatible
” NOTE: debian.vim sets ‘nocompatible’.  Setting ‘compatible’ changes numerous
” options, so any other options should be set AFTER setting ‘compatible’.
“set compatible

” Vim5 and later versions support syntax highlighting. Uncommenting the
” following enables syntax highlighting by default.
if has(“syntax”)
syntax on

” If using a dark background within the editing area and syntax highlighting
” turn on this option as well
“set background=dark

” Uncomment the following to have Vim jump to the last position when
” reopening a file
“if has(“autocmd”)
”  au BufReadPost * if line(“‘\””) > 1 && line(“‘\””) <= line(“$”) | exe “normal! g’\”” | endif

” Uncomment the following to have Vim load indentation rules and plugins
” according to the detected filetype.
if has(“autocmd”)
filetype plugin indent on

” The following are commented out as they cause vim to behave a lot
” differently from regular Vi. They are highly recommended though.
set showcmd        ” Show (partial) command in status line.
“set showmatch        ” Show matching brackets.
“set ignorecase        ” Do case insensitive matching
set smartcase        ” Do smart case matching
“set incsearch        ” Incremental search
“set autowrite        ” Automatically save before commands like :next and :make
“set hidden             ” Hide buffers when they are abandoned
set mouse=a        ” Enable mouse usage (all modes)
set hls            ” Highlight search

” Source a global configuration file if available
if filereadable(“/etc/vim/vimrc.local”)
source /etc/vim/vimrc.local