Thursday, November 8, 2007

Vim logo, vim.svg vim.png


I didn't find a good-look logo for VIM, so I changed the original one a little bit.

It's a red flower on green leaf.
keywords: gvim logo. gvim.png

svg file:
can not be attached. leave comments here.

Wednesday, October 17, 2007

Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card

HP Compaq Presario F730

Solution

http://ubuntuforums.org/showthread.php?t=405990

Sunday, September 16, 2007

Microphone does not work in Skype?

My laptop is Thinkpad T60, using Ubuntu 7.04.

What's more, both arecord and Sound recorder do not work. Double click the volumn icon in notification area. Open Edit->Preference and check Capture. You will find the Capture is muted in Recording tab. Uncheck it. Now it works! Have fun!!

Monday, August 27, 2007

Making a backup of the partition entries

Making a backup of the partition entries

We will save all the partitions entries (both primary and logicial ones which appear in the extended partition). In this example, we'll be assuming that hda (the first IDE hard disk) is to be backed up.

First, we will save the MBR with DD (GNU convert and copy)
# cd /root
# mkdir partition-backup
# cd partition-backup
# dd if=/dev/hda of=backup-hda.mbr count=1 bs=512



It will produce a very small, but very important file: 512 bytes of data. Now, we will save entries of the extended partitions:
# sfdisk -d /dev/hda > backup-hda.sf


sfdisk is a tool provided with the util-linux package.

IMPORTANT: You should now put these files somewhere safe - copy them to a floppy disk (and take a copy of it!), or burn them onto a CD. Keep these files safe. Do not leave them on your hard drive - if there is a problem with th drive, you may not be able to access these files, and while your partition images won't be wortheless, it will certainly be a lot harder to restore your data.
[edit]
Restoring partition entries from the backup

Be careful, restoring is a dangerous action - it can destroy data! First, we will restore the Master Boot Record:
# dd if=backup-hda.mbr of=/dev/hda


Then, here is how to restore extended partitions entries:
# sfdisk /dev/hda < backup-hda.sf


# # dd if= sda-mbr.bin of=/dev/sdX bs=1 count=64 skip=446 seek=446


To finish, you will have to reboot your computer.

Sunday, August 26, 2007

Do you hate ubuntu's color and themes

Honestly, I don't like it. That's why I did not start it for a long time.

But, we can change it. I like blue as on Fedora. So, let's do a little work to make it eye-candy.

1. Login theme
download this theme, which is best in gnome-look site :
http://www.gnome-look.org/content/show.php/macbuntu?content=64266
Open
Start->System->Administration->Login Window
click local tab, add the themes you just downloaded.
Don't close now, change the background color to dark blue, just under the themes.

2. Splash theme
Splash is just a picture. Choose whatever you like in
Start->System->Preference->Splash Screen
I like this one


3.gnome themes and icons
Actually, I like the MacOS theme.
http://www.gnome-look.org/content/show.php/MacOS-X+Aqua+Theme?content=13548


Probably you notice the laucher bar on the right, it looks nice. How to get it? Install gdesklets and search the widget startbar. Good luck

Alias in Linux

Are you tired with long command when you install package by apt-get. There are ways to make it easy.

Yes, use alias in your .bashrc file.

here are some of my .bashrc :

--------------------------------------



1 # .bashrc
2
3 # Source global definitions
4 if [ -f /etc/bashrc ]; then
5 . /etc/bashrc
6 fi
7
8 alias pg='ps -A |grep '
9 alias df='df -h'
10 alias du='du -h'
11 alias ls='ls --color=always'
12 alias lt='ls -lt'
13 alias ll='ls -l'
14 alias l.='ls -d .*'
15 alias mn='matlab -nodesktop'
16 alias mn7='matlab7 -nodesktop'
17 alias pp='ps -e -o pid,ppid,command'
18 alias gi='gvim'
19 alias rg='rpm -qa |grep '
20 alias lc='locate '
21 alias as='apt-cache search'
22 alias ai='sudo apt-get install '
23
24 # User specific aliases and functions
25 export PATH=$PATH:/sbin/:~/bin:/usr/local/texlive/2005/bin/i386-linux
26 if [ -f /etc/bashrc ]; then
27 . /etc/bashrc
28 fi
29 PS1="[\u: \w]$ "
30 #export LC_ALL="zh_CN.GB18030"
31
32 LC_CTYPE="zh_CN.UTF-8"
33 #export LANG="zh_CN.GB18030"
34 #export LANGUAGE=zh_CN.GB18030:zh_CN.GB2312:zh_CN
35 #export LC_CTYPE=zh_TW.UTF-8
36 #export XMODIFIERS=@im=SCIM
37 #export GTK_IM_MODULE=scim-bridge
38 #export QT_IM_MODULE=scim-bridge #使 SCIM 能够输入中文
39 #export XMODIFIERS=@im=scim
40 xset -b
41
42 export PATH=$PATH:/home/kekegg/SBW/bin
43 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/kekegg/SBW/lib"
44
45 export SBW_HOME="/home/kekegg/SBW"
46 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"/usr/local/lib":"/usr/local/Matlab74/bin/glnx86/":"/usr/local/Matlab74/sys/os/glnx86/":"/usr/lib/":"/usr/local/lib/"
47
48 if [ -f /etc/bash_completion ]; then
49 . /etc/bash_completion
50 fi

Thinkpad Second hard drive adapter

When you want to backup your files regularly, or you want to install many systems, you may need more space on hard disk. Backup can be done on USB storage, while it's not so convenient. If you are using Thinkpad laptop, there is a better solution.

That is, removing your DVD drive and inserting another hard disk. Of course u need a bay adapter. Search eBay. U will find it.
Caution : there are two kinds of adapter, for sata and hdd.

Why this method? The second hard disk is as fast as the first one because they have the same type PCI bus.