2008年2月16日 星期六

gedit plugins

Installation
Download both files and place them into ~/.gnome2/gedit/plugins. If the plugins directory does not exist, create it: mkdir -p ~/.gnome2/gedit/plugins

#已包裝好的plugins
sudo apt-get install gedit-plugins

#Find in Documents
Adds a side panel that allows you to search all open documents for a string. Uses grep. Download: http://www.psyguygames.com/FindInDocuments_plugin.tar.gz

#Line Tools Plugin
Provides useful line functionality to increase editing efficiency. Features include line duplication, bookmarking, and more! Gedit/LineToolsPlugin

#Class Browser
A class browser located in the side pane. Based on ctags, it supports a wide range of languages. Download: http://www.stambouliote.de/projects/gedit_plugins.html


-ctags-
sudo apt-get install exuberant-ctags gedit-plugins

mozilla plugins

1. image-zoom plug-in (to zoom images in a page):
sudo apt-get install mozilla-imagezoom
2. 新同文堂

3. sudo apt-get install sun-java6-plugin

Code::Blocks 暫時先安裝

其實一直以來都是用記事本加comand line..
今天才發現有這一套open source軟體可以用!!
聽說是linux的Dev C++吧!
這樣說也許不對xdxd 因為它好像是跨平台?!

google找了一下安裝方法: 原文
首先先確定已安裝gcc gdb

sudo apt-get install build-essential
sudo apt-get install gdb


1.add repositories
sudo vi /etc/apt/sources.list
加入

deb http://apt.wxwidgets.org/ gutsy-wx main
deb http://lgp203.free.fr/ubuntu/ gutsy universe

2. get the gpg key for the repos

wget -q http://lgp203.free.fr/public.key -O- | sudo apt-key add -
wget -q http://apt.wxwidgets.org/key.asc -O- | sudo apt-key add -

3. 開始安裝

sudo apt-get update
sudo apt-get install codeblocks
sudo apt-get install codeblocks-contrib # plug-in

註:若要開發 wxWidgets GUI 應用程式,下載 wxSmith plug-in(optional):
sudo apt-get install libwxsmithlib0
安裝contrib會自動帶入

vim相關

安裝vim後
修改(或建立) ~/.vimrc 增加一些好用的功能

我的 .vimrc檔備份

"顯示行號
set number
filetype on
"設定template
:colorscheme torte
syntax on
set autoindent
set smartindent
" \t 會以 4個空格代替
set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4
"顯示對應的括號
set showmatch

" 下面出現一列 bar.
set ls=2
set statusline=%<%f\ %m%=\ %h%r\ %-19([%p%%]\ %3l,%02c%03V%)%y
highlight StatusLine ctermfg=blue ctermbg=white

" 搜尋到的字加 hilight
" set hlsearch
set cindent

" :sp 開檔時, 上面會列出所有檔案
set wildmenu

" 可以用 {{{ }}} 縮排 Folded
set foldmethod=marker

" 會自動到最後離開的位置
if has("autocmd")
autocmd BufRead *.txt set tw=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif


大家來學VIM(一個歷久彌新的編輯器)

記一下大概的指令

fold的操作 - 我設定為{{{ }}}之間會fold起來
折疊的操作

zo 將游標所在處的折疊打開。open。
zc 將游標所在處已打開的內容再度折疊起來。close。
zr 將全文的所有折疊依層次通通打開。reduce。
zm 將全文已打開的折疊依層次通通再折疊起來。more。
zR 作用和 zr 同,但會打開含巢狀折疊(折疊中又還有折疊)的所有折疊。
zM 作用和 zm 同,但對於巢狀折疊亦有作用。
zi 這是個切換,是折疊與不折疊指令間的切換。
zn 打開全文的所有折疊。fold none。
zN 這是 zn 的相對指令,回復所有的折疊。

多檔開啟時
:n 編輯下一個檔案。
:N 編輯前一個檔案。

2008年2月15日 星期五

blogger變動參考網站

1.繼續閱讀
繼續閱讀懶人加強版

2. 最新文章
使用官方提供的功能。進入版面配置→範本→網頁元素→資訊提供,填入你的網址。
最新文章 http://網誌網址/feeds/posts/default

3. 最新回應
快速的在Blogger加入「最新文章」
裡的網站 功能~

Vista/win7 下安裝Ubuntu雙系統 用BCD當開機程式

[2010/03/24更新]
由於ubuntu 9.10版之後更改成grub2的開機程式
BCD需升級成 EasyBCD 2.0 beta
才能支援grub2的ubuntu

cited::
實地安裝時,你有可能使用ubuntu安裝程式來分割硬碟,結果到這一步時,無法把開機程式裝在該分區。此時你需要先退出安裝程式,然後"預先"分割好你的磁區再來安裝ubuntu。可先進入windows,使用它"系統管理"中的磁區管理,把磁區分割出來(可以不用給它路徑符號,另外,也可以用邏輯磁區)。


這篇寫的真的很詳細!!!還附上圖表!!可以直接閱讀~
Ubuntu 7.10 加 Windows Vista,超華麗雙重開機

一開始還很擔心用vista的東西當作開機程式會不會有問題…
因為一直以來都是用Grub~
但是作者說的說服我了...
如果Vista要重灌也比較方便
而且就我剛剛linux一直弄不好 重灌幾次...如果是用Grub 那我不是連windows都要重灌嗎.....

所以BCD真是好選擇XD 不過它是Vista/win7限定~

大致記錄一下步驟:
1.安裝Vista:應該不用再提,大家都會裝,或電腦出貨時就裝好了。
2.分割磁區給Ubuntu:大概10GB就夠了,想裝一堆軟體就留大一點。
開始--「電腦」上按右鍵選管理,然後在磁碟上按右鍵選「壓縮磁碟區」

3.安裝EasyBCD:管理Vista開機程式的好用小工具
4.備份Vista:天有不測風雲,人有旦夕手賤。 (我有還原光碟xd 這步就省略了)
5.安裝GRUB到Ubuntu磁區:最重要的步驟,千萬小心!
在最後的確認步驟中,按右下角的「Advanced」,把「用來安裝開裝程式的裝置」從(hd0)改成放Ubuntu的磁區。(我這次是sda6) 這會把Ubuntu的開機程式GRUB和Ubuntu放在一起

6.執行EasyBCD加入Ubuntu磁區,大功告成。

執行EasyBCD,在「Add/Remove Entries」>「Add an Entry」下,選Linux、GRUB和你安裝Ubuntu的磁區, 取個名字,設預設的os,倒數秒數 之類的
下次開機就會出現選單

2008年2月14日 星期四

software

1. PCMan X pure GTK+ 2
sudo apt-get install pcmanx-gtk2

2.GCIN 無蝦米 輸入法
參考
安裝 嘸蝦米輸入法 於 Debian/Ubuntu(GCIN)


step1: 安裝Gcin

apt-get install gcin im-switch
im-switch -s gcin
重新登入

step2: Gcin安裝成功並重登後,安裝 無蝦米 輸入法

wget http://edt1023.sayya.org/misc/noseeing-6.tar.gz #下載 無蝦米的 table
mkdir tmp; cd tmp
tar zxvf ../noseeing-6.tar.gz
mv noseeing.gtab ~/.gcin

# 以下可做可不做~把不必要的檔案刪掉
cd ..
rm -rf tmp
rm noseeing-6.tar.gz

重新登入, Gcin圖示按右鍵設定內定輸入法, 即可使用


3. 影片播放
SMPlayer

[2010/3/24更新 ]
參考https://help.ubuntu.com/community/Medibuntu

增加medibuntu的來源到下載中心裡。
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update


安裝w32codecc
sudo apt-get install w32codecs


=以下是舊寫=

參考Ubuntu 7.10 實用軟體 - Part 1 - w32codecs + SMPlayer

# 加入 medibuntu 的來源
sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update
#安裝codecs
sudo apt-get install w32codecs
#安裝播放器
到smplayer網站下載deb(如果之前沒裝mplayer要先裝)
可參考這篇
apt-get install mplayer mplayer-fonts mplayer-skin mozilla-mplayer smplayer
#設定編碼(系統沒有win32資料夾才可用,否則,複製codecs到其下)
ln -s /usr/lib/win32 /usr/lib/codecs

註:如果開了3D特效的..播放的影片會閃閃閃不停…要看時要先停止特效類- -
這好像是ATI顯卡的問題

* 讓 Mozilla/Firefox 支援播放影片
安裝 mozilla-mplayer 套件及安裝 codecs)
sudo apt-get install mozilla-mplayer
再重新啟動你的 mozilla/firefox,在網址列輸入 about:plugins 查是否正確安裝。


4.音樂播放
Audacious
安裝方法參考ubuntu網站

sudo apt-get install audacious
sudo apt-get install audacious-plugins audacious-plugins-extra #codec plugins


註:解決中文亂碼現象
在audacious上右鍵選擇「首選項」,在「播放列表」中,把標題格式改為「Custom",再把自定格式改為「%f」(不要引號)。

又註:
因為我大部分是中文歌~少部分日文~ (英文歌沒有問題)
直接在 preference裡播放列表 中 自動偵測 選擇 Taiwanese
就可以解決中文問題了~~~
只是有些日文標題會亂碼~還可以接受~!


plugins :
同步歌詞顯示
LyricZilla - Lyrics displaying plugin

sudo wget http://lyriczilla.googlecode.com/svn/trunk/package/lyriczilla.list -O /etc/apt/sources.list.d/lyriczilla.list

sudo apt-get update
sudo apt-get install lyriczilla
sudo apt-get install lyriczilla-plugin-audacious
(如果是用bmp 就改成 sudo apt-get install lyriczilla-plugin-bmp)

再到audacious 開啟plugins就可


5. 檔案管理程式
PCMan File Manager
可以直接更改為root權限~圖形化介面管理~

6. 解壓縮
7-zip

sudo apt-get install p7zip-full p7zip-rar


7. ftp client

sudo apt-get install filezilla filezilla-locales


8. pdf xchange-viewer
整理至nelson寫的文章
1) first get wine
2) download portable version http://www.docu-track.com/downloads/users/
3) tar it at ~/.wine/drive_c/Program Files/PDF XChange Viewer Portable
4) download the script
5) edit the script in line 23
change

appname='/home/nelson/.wine/drive_c/Program Files/PDF XChange Viewer Portable/PDFXCview.exe'

to your place
6) change script and move to /usr/bin

chmod a+x PDFXCview
sudo mv PDFXCview /usr/bin

7) 在wine裡手動增加PDFXCview的選單
Right click on menu bar -> Edit Menu -> Scroll down to Wine -> Select Add Menu

ATI顯卡驅動程式

昨天一安裝linux 螢幕就怪怪的..
重灌了兩次…
然後只要調一下 螢幕就變花俏版..........
查了一下也許是ati裝的驅動不對的關係
以下附上參考的網址
Ubuntu Gutsy Installation Guide - ATI 自己弄的官方wiki
不過照著method 2安裝後 第一次重新啟動完全無法進入x-windows
所以我就開始亂弄了...
先進入安全模式
直接再安裝一次driver

sudo sh ati-driver-installer-8-02-x86.x86_64.run
sudo aticonfig --initial
sudo reboot

結果就再重新啟動後!就可以了~現在還可以啟動compiz-fusion 之類的特效~~!!

以下是大概的步驟:

step:
1. 「系統>管理>軟體來源」,在「Ubuntu Software」和「Third-Party Software」下勾選所有項目,勾完按「Close」,然後按「Reload」更新軟體名單。
2. 過沒多久螢幕右上角應該會出現更新的訊息~這時候~就全部都給它安裝.....(懶人法)
3. 到官網下載最新的driver (記得先檢查顯卡支不支援)
4. 指令
Install necessary tools:
sudo apt-get update
sudo apt-get install build-essential fakeroot dh-make debhelper debconf libstdc++5 dkms

Create .deb packages:
sudo sh ati-driver-installer-8-02-x86.x86_64.run --buildpkg Ubuntu/gutsy
Blacklist old fglrx module from linux-restricted-modules:(Ubuntu/Gnome)
gksu gedit /etc/default/linux-restricted-modules-common
修改其中的一行,成為
DISABLED_MODULES="fglrx"

註註註(我沒有下列的檔案,所以不理它):
You may also need to edit the file (if it exists):
sudo gedit /etc/modprobe.d/blacklist-restricted
Put a # in front of the line "blacklist fglrx", if it is present.

Remove any old fglrx debs from /usr/src/:
sudo rm /usr/src/fglrx-kernel*.deb
Install .deb packages:
sudo dpkg -i xorg-driver-fglrx_8.455.2-0*.deb fglrx-kernel-source_8.455.2-0*.deb fglrx-amdcccle_8.455.2-0*.deb
sudo apt-get install -f

5. 重新啟動 以ubuntu安全模式啟動
執行

sudo sh ati-driver-installer-8-02-x86.x86_64.run
sudo aticonfig --initial
sudo reboot

6. 終於看到美美的視窗了.........

start!

因為買了新筆電~
又重新灌了ubuntu~
就趁這個機會把對ubuntu做的更新都盡量po在blog上~
下次重灌時就可以用了XDXD

我的電腦資訊:
ASUS F8P WHITE
LCD: 14.1" WXGA+ 鏡面TFT LCD / TFT LCD WXGA 1440*900
CPU: Intel Core 2 Dual T7500(2.2GHz)
L2 Cache: 4 MB

mb: Intel 965PM

ram: 2G DDR2 RAM

顯卡: ATI RADEON HD 2400 實體256MB