MPDK


Pages

Showing posts with label ubuntu-system. Show all posts
Showing posts with label ubuntu-system. Show all posts

Oct 30, 2009

BT for ubuntu9.10

Finally!!! New ubuntu is coming!!!
File name:ubuntu-9.10-desktop-i386.iso
Code:755414d98029f86ec36e8b4ad8e38ce26e10210a

The download URL

Have fun on ubuntu!!!

Oct 21, 2009

A little audio tool for listening studentclassroom

#!/bin/bash
# Program:
#     This program help me to listen studentclassrom.
# Histor:
# 2009/10/21      MPDK     First release
PATH=/bin: /sbin: /usr/bin: /usr/sbin: /usr/local/bin: /usr/local/sbin: ~/bin:
export PATH
read -p "please choose the day you want to listen:" day
mplayer mms://air.hihit.net/studio/${day}ba.wma

Sep 14, 2009

How to change the input mode?

im-switch -s XXX
The XXX means your mode's name!!!

Sep 2, 2009

How to install a new fonts on ubuntu?

We take LiHei Pro, a Mac font, for example, you can download the font here. Next, you have to turn on your terminal and order the following commands:
cd /path at where you download
tar -zxvf LiHeiProPC.ttf.tar.gz
sudo mv ExtractFile /usr/share/fonts/truetype/
sudo fc-cache -f -v
Welcome to use the beautiful fonts.

There is a shell script helping you to get and install freemacfonts(this is safe. Don't worried). Next, run it.
cd /path at where you download
chmod 755 newfonts.sh
Welcome to use the fonts although it is not so much beautiful.

Aug 27, 2009

How to add a new face or script for your gnome desktop.

Most of rookies don't know hot to add a new face or script for their Gnome desktop. Therefore, they think the KDE desktop is more excel then Gnome desktop. However, this is a stereotype. Gnome is very well-designed without not so friendly as KDE. Whatever, we come back to the topic of this article. How to add a new face or script for your gnome desktop. Actually, it is quite easy. First, you have to download the themes package. There are some webs that I often visit.
http://abstract.desktopnexus.com/
http://www.gnome-look.org/
And then, unzip to ~/.icon/. Finally, right-click on the desktop and keyin "B". Use your theme!!!

My sources list

Without the sources creating by lazyscript, I add some sources as following

#the source of 2.6.30up!
deb http://archive.ubuntu.com/ubuntu/ karmic main restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted multiverse
# deb http://cz.archive.ubuntu.com/ubuntu jaunty main multivederse
By the upgrading kernel from 2.6.28 to 2.6.31, there are so many problem over there. For example, wireless can not be drove. Using the source, it may help you complete your kernel such that your kernel may be stable.
#the firefox upgrade to 3.5 and 3.6
# deb http://ppa.launchpad.net/fta/ppa/ubuntu jaunty main
# deb-src http://ppa.launchpad.net/fta/ppa/ubuntu jaunty main
I was a firefox user in the past, but now I'm not. Whatever, this source can help you to upgrade  your firefox version.
#the google-chrome source
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
 Welcome to the newest and most popular web browser, chromium, the open-source version of google chrome. But, The detail introduction was post in the past article, and please read yourself.
#a beautiful theme source
deb http://ppa.launchpad.net/bisigi/ppa/ubuntu jaunty main
I find it in Ubnutu 正體中文網 which share by a geek.

Aug 25, 2009

How to change the kernel on ubuntu

In the past time upgrading your kernel was a hung task. However, debian packages currectly make linux life much easier.
Go to here, and download the kernel package you need.
http://kernel.ubuntu.com/~kernel-ppa/mainline/
All you need to download the following deb and install package by package.
1. linux-hearders-<version> _all.deb
2. linux-hearders-<version>_i386.deb (or "amd64" is a matter of your computer)
3. linux-image-<version>_i386.edb (similarly above)
4. linux-source-<version>_all.deb (Not necessary)
After all, edit your sources.list by adding the following source


#the source of 2.6.30up!
deb http://tw.archive.ubuntu.com/ubuntu/ karmic main restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ karmic main restricted multiverse
This can help you renew your kernel version to a more stable version. Moreover, It can fix some problem in the original version.
Delete the old kernel! This can help you to optimize your system such that your OS is quickly, stable and lightweight. In my way, it's a stupid way. If you have a better way, please tell me.
First, I run the synaptic package manager, and search
linux-
Then I find the lower version and do complete removal. That's it.

Chromium, an open-source project providing the code for google chrome

Today, I am going to introduce Chromium, an open-source project providing the google chrome, which you can say it is a linux chrome.
The speed of chromium is more quick then firefox. Moreover, this web browser is more stable and friendly then firefox. If you think the firefox is a big monster, the chromium may be a rabbit. The following commands tell you howto install this browser and able to use flash player.
edit the source in your sources.list
sudo gedit /etc/apt/sources.list
Add the following source in
#the google-chrome source
deb http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
Then type the command to install the browser
sudo aptitude install chromium-browser chromium-browser-l10n
The first package is the main program of chromium, and the second one is the language package.
Don't forget to update and upgrade after installing something.
If you start to use the chromium now, you will fail to play flash player. So, how to enable the flash support for chromium?
Now, you need to install flash using the following command
sudo aptitude install flashplugin-nonfree (I guess you have installed it.)
And then, use the follwing command

sudo cp /usr/lib/flashplugin-installer/libflashplayer.so /usr/lib/chromium-browser/plugins
Now, you can run the chromium browser using the following command from terminal

chromium-browser --enable-plugins

Aug 9, 2009

How to drive your sound?

I have try so much time to try to drive my sound ware on Compaq CQ40.
But, you know the sound drive is so hard and uncomfortable. And, the following way is my experience and hope to make you have a short cut.
1. You must to be make sure your card specs, and all you have to do is to type
lspci | grep Audio
at your terminal.
2. If you want to know what kind of snd_model on you have model on, you can type
lsmod | grep snd
3. To get the other information you may be need, you also can type
"lshw -c multimedia"
"aplay -l"
"cat /proc/asound/cards"
"cat /proc/asound/card0/codec#* | grep Codec"
Although, there are many ways to help you get your computer's information, but I feel the best way is to use alsa-info.sh which is a really powerful shell script.

4. How to google? Keyword is your sound card name. But, the important is to add your OS-name. In spite of this, the net-note and material always can not help you, but confuse you. Even worse is those method that will lead you into a wrong area like removing soft lead to affect other function which is normal at begin. More worse, it will lead you to reignite your OS. Therefore, when you follow the web's advice please thinks it again. Does it make sense?

5.My experience tell me, we did not need to install or remove any program or software. All we have to do is to correct the text
/etc/modporbe.d/alsa-base(.conf)
First, to make sure what your card "codec" is. You can type
cat /proc/asound/card0/codec#* | grep Codec
And then, you need to search the Codec name in the text
/usr/share/doc/alsa-base/drivers/ALSA-Configuration.txt.gz
Note that there are many kind of Codec perhaps. So, pleas try much times.

6. Finally, You maybe can find your codec, maybe not. If it really find, you need to add
options model=????? (????? is the value listed in ALSA-Configuration.tet)
at the end of /etc/modprbe.d/alsa-base(.conf). And then, reboot. Hope you enjoy your music life.

Conclusion:
To put on your sound drive is always luck and god-given if you are success. Because there are too much variable to affect your sound drive, soft, options and support-or-not are included. Having a saying that new thing is not necessarily a good thing.

alsa-info.sh

This is a shell script that can create an information about your computer's program data, driver data, hardware data which is all about your sound hardware.
http://git.alsa-project.org/?p=alsa-driver.git;a=blob_plain;f=utils/alsa-info.sh

Jul 5, 2009

Firefox speed by up to 45%.

The Firefox version which comes in Ubuntu has Pango enabled by default. Pango is a font smoothing library which decreases Firefox speed by up to 45%.

But don’t just take my word for it. Check out some complaints from other people regarding Pango.

To disable Pango in Ubuntu, edit either your .bashrc or .bash_profile file located in your home folder (those are hidden files, so make sure you press Ctrl + H to see them), and add this line:
export MOZ_DISABLE_PANGO=1
Then re-source:
source .bashrc 
or
source .bash_profile
And restart Firefox.

Please note that this fix affects the default, packaged installation of Firefox on Ubuntu installations. If you’ve upgraded your Firefox install manually, it does not have Pango.

[credits: phyx, dreamlogic]

Jun 15, 2009

How to joint a new NO_PUBKEY in Ubuntu?

We just import a command

" sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com NO_PUBKEY"

and renew again.

That will be sucseed.

May 31, 2009

/tmp 設到 RadmDisk (tmpfs) 的方法 --轉錄自ubuntu正體中文網

一、前言:

Ubuntu 預設就會將電腦一半的記憶體掛載為 /dev/shm
/dev/shm 即是 windows系統中常說的 RamDisk

RamDisk 有很多用途,比如:
將軟體弄到 RamDisk 執行,速度將會飛快
或者編譯程式時,在 RamDisk 編譯,速度超快

當然的, /tmp 若乾脆設到 RamDisk 裡面去,不僅是速度加快,還具有減少讀寫硬碟的效果(假如你的電腦是用 SSD 固態硬碟的話)

※ 註:/dev/shm 不完全是 RamDisk,若它使用超過電腦一半以上的 RAM,就會開始吃 SWAP。另外它沒用到的部份,會自動釋放出來給系統使用。


二、將 /tmp 設到 RamDisk (tmpfs) 的方法

基本上只要打以下指令,就能將 /tmp 綁定到 /dev/shm
mkdir /dev/shm/tmp
chmod 1777 /dev/shm/tmp
mount --bind /dev/shm/tmp /tmp

※ 註:為何是用 mount --bind 綁定,而不是 ln -s 軟連結,原因是 /tmp 目錄,系統不給刪除。

不過每次開機都要打指令才能用,這樣是行不通的,必須讓它開機時自動執行,才會方便。

1.
用文書編輯器,建立 /etc/init.d/ramtmp.sh
內容如下:
#!/bin/sh
# RamDisk tmp
PATH=/sbin:/bin:/usr/bin:/usr/sbin

mkdir /dev/shm/tmp
chmod 1777 /dev/shm/tmp
mount --bind /dev/shm/tmp /tmp


2.
將此檔改權限為 755,使其可執行
終端機下的話,如下操作:(或是用視窗改也行)
sudo chmod 755 /etc/init.d/ramtmp.sh


3.
在 /etc/rcS.d 中,建立相關軟連結(捷徑),使其一開機就執行

以下指令僅能終端機操作
cd /etc/rcS.d
sudo ln -s ../init.d/ramtmp.sh S50ramtmp.sh


大功告成!重開機生效。

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

三、說明
若想瞭解以上操作程序,是幹什麼,以及為什麼這麼做,
請看說明:

Linux 開機服務載入順序為:
 1. BIOS
 2. MBR
 3. Linux Loader
 4. Kernel, init (取得 run-level)
 5. /etc/rc.d/
 6. /etc/modules.conf
 7. /etc/rc.d/rc[0-6].d
 8. /etc/rc.d/rc.local

轉錄自ubuntu正體中文網,由jay所撰寫之教學。
http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=60937#threadtop
換句話說,寫入 rc.local 是行不通的,因為在那之前就啟動 x-window 了,而啟動 X 時會寫入一些東東到 /tmp,此時就會出錯,導致啟動失敗。

那麼到底該寫在哪裡好呢?
答案是 /etc/rcS.d

/etc/rcS.d 這個目錄中的檔案,開機時會被自動執行。另外它有一個特點:只有大寫 S 開頭的檔案名稱才會被執行,且多半都是採用軟連結(捷徑)的方式,連結到 /etc/init.d 目錄中的執行檔。(詳情請見該目錄中 README 英文說明)

S開頭後面的號碼,則代表執行的優先順序,由低至高依序執行,不一定是50可以隨高興更改,但要注意其它程序的優先問題,ramtmp.sh 需在 X11 啟動前執行,在 tmpfs 掛載後才執行。因此觀察後 S50 是比較恰當的。

四、參考資料:
-----------------------
tmp 掛到 tempfs 的方法:(這篇後半部份,不適合 Ubutnu)
http://phorum.study-area.org/index.php?action=printpage;topic=47984.0

酷學園,針對 rc (啟動批次檔)結構和 rcconf 的討論:
http://phorum.study-area.org/index.php?action=printpage;topic=47984.0