tonychou's posterous

tonychou's posterous

Tony Chou  //  TonyChou Walker
http://tonychou.blogspot.com/

Retaggr Profile

憂鬱 + 躁慮 = 老子(瘋猴子)

我?死皮賴臉的活著。

Sep 18 / 9:42pm

利用Eclipse產生 javadoc [JAVA]

收先必要工具

  1. Eclipse
  2. JDK

接下來就開始解說如何產生出java source的 doc了

1.首先點選project -> Generate JavaDoc

2.接下來會跳出這個視窗

3. 首先先設定Javadoc command 把他指定到你的JDK底下的bin裡面的javadoc.exe (DOC是利用這個執行檔產生出來的)

然後選擇你要產生的JAVA檔,這邊通常都直接把src打勾勾就好,因為src通常底下才是你寫的程式

下面有個Distination 指定你輸出目錄

好了 按 NEXT

4.這便預設就好 按 NEXT

5.這邊中間有個要注意的地方, 如果你是用UTF8編碼,請加上以下字串如圖上所示,要不然預設是MS950

-charset UTF-8 -encoding UTF-8

按 FINISH  就結束嚕,你就可以在你輸出目錄看到你產生的DOC,直接開啟index.html就可以看了

Filed under  //  eclipse   javadoc  
May 5 / 8:59pm

Useful Eclipse Plugins

記錄一下我常用的 Eclipse Plugin,好在換新版 Eclipse 時,還記得要裝哪些 Plugin。
我都直接抓Eclipse+WTP SDK,所以 WTP 和 GEF plugin 就不寫了。

因為還在整理,已忘了有裝哪些,所以會再持續更新。

我必用的 Plugin

Subclipse
Update Site: http://subclipse.tigris.org/update_1.6.x
Description: Subversion 版本控制工具。
Properties Editor (Resource Bundle Editor)
Update Site: http://propedit.sourceforge.jp/eclipse/updates/
Description: 編輯I18N .properties 用的Editor,編輯時可以用你的字元集(假設是zh_TW,即你在看和編輯時,都是中文呈現),存檔時他會自動轉成 unicode \uxxxx,但編輯時不會看起來是 \uxxxx (native2ascii)。
我習慣用這個。
JInto (Resource Bundle Editor)
Update Site: http://www.guh-software.de/eclipse/
Description: 編輯I18N .properties 用的Editor,一個頁面含全部語系的 .properties ,以 Table 方式呈現來填入,編輯時看起來一樣是對應的字元集,不會是 \uxxxx (native2ascii)。
這個功能較強大,所以我也裝,也因我裝了二個處理 .properties 的plugin,所以這個我都用 open with 方式來選擇用這個 plugin 開啟 .properties。
Implementors
Update Site: http://eclipse-tools.sourceforge.net/updates/
Description: 讓 Eclipse 可以追蹤 Concrete class method 的工具。
java editor 上,你可以點一個 class or method name,然後按右鍵選 Open Declaration 跳去看他的內容,但如果這個 class or method 是 interface,你跳過去看就沒意義,這個 plugin 就是讓你可以跳到實作 interface 的 concreate class 來觀看,只要點了之後,按右鍵選 Open Implementation 即可。
Lifesting
Download URL: http://www.blogjava.net/lifesting/archive/2008/04/11/192250.html
Description: 讓你可以將文件的原本編碼A轉成編碼B。
這在變更 Eclipse 工作區 charset encoding時很有用,可能原本是 MS950,在透過變更 Eclipse Preferences 後把 encoding 改 UTF-8,會讓原本有中文的檔都變亂碼。
用這個工具,你可以在未將工作區從 MS950 變更為 UTF-8 前,先用 Lifesting 來將文件轉成 UFT-8,再將工作區變更為 UTF-8 即可。
Maven2
Update Site: http://m2eclipse.sonatype.org/sites/m2e
Description: Maven - A software project management and comprehension tool。
比 Ant 強大的 framework,應該不能直接比,但ant 的功能,maven 都辦的到,而且很多 opensource 的 project 目前也都從 ant 改用 maven 來建置與管理。
而這個是 Maven Plugin for eclipse,讓我們可以不用下 command 的方式執行。
SpringIDE
Update Site: http://springide.org/updatesite/
Description: SpringIDE,讓你可以在 Eclipse 中以樹狀圖形來觀察 spring xml config 中的 bean reference 關係,且在 xml 中提供 auto complete 功能與檢查 xml 中設定 class 是否存在。
TestNG
Update Site: http://beust.com/eclipse
Description: TestNG。一個比 JUnit 強的Test Framework。可以用 Java Annotations 來設定,也可以用來跑 JUnit。
Mylyn
Update Site: http://download.eclipse.org/tools/mylyn/update/e3.3
Description: Mylyn,一個 Task Focus Development Tool。除了 local repository,也可和某些 Issue System 結合使用,如 JIRA,Bugzilla,Trac。
Mylyn Extras
Update Site: http://download.eclipse.org/tools/mylyn/update/extras
Description: Mylyn Extras:JIRA,Trac Connector 要從這裝。
CheckStyle
Update Site: http://eclipse-cs.sourceforge.net/update
Description: 編碼標準分析。
讓開發自動化:用 Eclipse 插件提高代碼質量
Coverlipse
Update Site: http://coverlipse.sf.net/update
Description: 測試代碼覆蓋率。
讓開發自動化:用 Eclipse 插件提高代碼質量
CPD
Update Site: http://pmd.sourceforge.net/eclipse
Description: 複製/粘貼檢驗。
讓開發自動化:用 Eclipse 插件提高代碼質量
JDepend
Update Site: http://andrei.gmxhome.de/eclipse
Description: 包依賴項分析。
讓開發自動化:用 Eclipse 插件提高代碼質量
此 update site 同時還有其他有用的 plugin,如下:
FileSync plugin
Extended VS Presentation plugin
Bytecode Outline plugin
AnyEdit plugin
http://andrei.gmxhome.de/eclipse.html
Metrics
Update Site: http://metrics.sourceforge.net/update
Description: 複雜度監控。
讓開發自動化:用 Eclipse 插件提高代碼質量
FindBugs
Update Site: http://findbugs.cs.umd.edu/eclipse
Description: FindBugs。
FindBugs:提高代碼質量
Fat Jar
Update Site: http://kurucz-grafika.de/fatjar
Description: 一個幫你把所有的 class 和引用的 jar 匯出成一個 jar 的工具。
http://fjep.sourceforge.net/
Eclipse HTTP Client (Http4E)
Update Site: http://www.ywebb.com/http4e/install/
Description: 一個一個可以製造 HTTP Calls 的 Eclipse GUI,對 Web Development, Web Services and Rest Services 好用的工具。
http://http4e.roussev.org/

我選用的 Plugin

Keytool
Update Site: http://keytool.sourceforge.net/update/
Description: Keytool is an Eclipse plugin that maintains keystores and certificates。
Groovy
Update Site: http://dist.codehaus.org/groovy/distributions/update/
Description: Plugin for compile and run groovy。
Android
Update Site: https://dl-ssl.google.com/android/eclipse/
Description: 開發 Google Phone 用的 Toolkit。
EclipseMe
Update Site: http://www.eclipseme.org/updates/
Description: 開發 Java ME 用的 Toolkit。
Visual Editor
Download URL: http://eclipse.org/vep
Description: Eclipse Visual Editor,一個視覺化的 AWT, Swing, SWT 編輯工具。
聽說 Netbeans 的 VE 比較強比較好用,不過我已習慣直接寫Swing Code 而沒用 VE,所以我也懶的試 Netbeans,也不想要開發過程一下子用 Netbeans 一下子用 Eclipse,不過 Eclipse VE 覺的小~~容易當,我都拿它來拉簡單的畫面測試用而已。
SQL Explorer
Update Site: http://eclipsesql.sourceforge.net/
Description: 可在 Eclipse 中連 DB 的 Tool。
AntView
Download URL: http://r2tech-eclipse.sourceforge.net/
Description: 可把 ant build file 圖形化顯示。
Eclipse Version Tree Plugin for CVS
Download URL: http://versiontree.sourceforge.net/
Description: 把CVS上文件的各版本以樹狀連結顯示變化。
QOLdap
Download URL: http://qoldap.sourceforge.net/
Description: Eclipse 中的 LDAP Browser。(尚未測試)
Apache Directory Studio
Update Site: http://directory.apache.org/studio/update/1.x/
Description: Eclipse 中的 LDAP Browser 和 Editor。(尚未測試)
Jode Decompiler
Update Site: http://www.technoetic.com/eclipse/update
Description: Eclipse下的Java decompiler。試用jdk1.5一直反組譯失敗,可能只能 jdk1.4 以前版本。
JavaFX
Update Site: http://download.java.net/general/openjfx/plugins/eclipse/site.xml
Description: JavaFX
Eclipse Regular Expression Tester
Update Site: http://brosinski.com/regex/update
Description: Regular Expression Tester,裝了沒測,不確定好不好用。
QuickREx
Download URL: http://sourceforge.net/projects/quickrex/
Description: 也是一種 Regular Expression Tester
QuickREx Doc
UniMod
Download URL: http://unimod.sourceforge.net/
Description: UniMod 是一個 Executable UML 的 Implement,不過我還沒時間試用。
Eclipse wiki Editor
Update Site: http://www.stateofflow.com/UpdateSite
Description: A powerful project documentation tool linking documentation to eclipse resources, web sites, bug tracking tools and other Wikis。(尚未測試)
http://eclipsewiki.sourceforge.net

Filed under  //  eclipse   plugins  
Apr 21 / 7:29am

[DataBase] 更改Oracle XE for Windows 的 HTTP port number?

第一個步驟:
  到開始功能表中,找到 Oracle Database 10g Express Edition / 執行 SQL 命令行,打開 SQL*Plus。然後在 SQL*Plus 下如以下輸入,xxxx 代表要輸入的 port number,比如 8088:


SQL*Plus: Release 10.2.0.1.0 - Production Copyright (c) 1982, 2005, Oracle. All rights reserved. SQL> connect system as sysdba;

輸入密碼: *****
已連線.

SQL> exec dbms_xdb.sethttpport(8088);

已順利完成 PL/SQL 程序.

SQL>exit

下達 exit 指令後,就會跳出 SQL*Plus 環境了。


第二個步驟:
  先找到你安裝 Oracle XE 的安裝目錄。預設值是 C:\oraclexe。如果你安裝時是接受預設值,那麼打開檔案總管,找到這個目錄下的 C:\oraclexe\app\oracle\product\10.2.0\server 這個目錄,打開來。你會發現在這個目錄下有六個網際網路捷徑:

第三步驟:
  我們要修改的是 Database_homepage 及 Online_help 這兩個網際網路捷徑。當你把滑鼠游標到其中一個時,按下右鍵->打開捷徑選單->選擇內容。打開內容對話方塊時;以Database_homepage 這個網際網路捷徑為例;在網頁文件頁籤中,URL 輸入方塊目前是http://127.0.0.1:8080/apex,請將它改成 http://127.0.0.1:xxxx/apex。這裡的 xxxx 就是剛才你更改的 HTTP port number,比如是 8088。然後按下確定鈕。

  同樣的方法修改 Online_help 網際網路捷徑,這樣就大功告成了。這樣你就可以直接使用開始功能表中的 Oracle Database 10g Express Edition / 移到資料庫首頁就可以跳到你的資料庫管理界面了。

Filed under  //  database   oracle  
Feb 25 / 12:54am

Speed up your i7500 Galaxy [Tips and Tricks]

All of these settings and tweaks have been tested on the latest 0.66 nightly -

Use at your own risk, I shouldn't be responsible for any brick. And anyway, best thing - Make a nandroid backup file before using all of these.

First of all, everyone should know what free memory means. Ofcourse every one know what it means duh' but, bleh whatever. tongue You just have to make sure your phone has 20 free memory in order to have faster speed and response. If the free memory comes down to 15m, the phone starts to lag. Our Galaxy wasn't given a satisfactory processor so we have to deal with it. Now, just follow my instructions in order to get a faster phone - smile And forgive me for my English too :\ Dad is playing music really loud right now I really can't concentrate on whatever I'm typing. tongue

Okay 2nd thing, follow what I'm telling you to do -

In GaospConf V2 -
Compcache - Enabled - 50000
Cpu Sampling - Perf
OC - Not Enabled, any of 'em.

In SetCpu -
Max - 710Mhz
Min - 566
Scaling - Performance

In CyanogenMod -
Compcache - Enabled
Jit - Disabled
Surf Dithering - Disabled
Lock home/messaging App - Disabled
VM Heap Size - 32m

App Killer - Advanced Task Killer

This config gives 35-45M free. Which is PRETTY impressive. The best option is to reboot your phone once a day, its the best way to free up memory! And also turn off Window Animations! OH YEAH, And also use ADW launcher by default, the opens applications much faster than ANY other Launcher! And it looks awesome too smile


Now, you also have to take care about your battery!

1.) The best way to save your battery life is by going to the Mobile networks settings on your device and selecting 2G network only, enable this whenever you are not using 3G network. There is a app names Toggle 2G in the market, its the best app to save battery power.
2.) Make sure your phone's Wi-Fi is off whenever it is not being used.
3.) Make sure your GPS is also off whenever not in use.
4.) Set your brightness level to the lowest possible, or select Automatic Brightness - Its the best way according to me. Although I put my phone at full brightness to enjoy my AMOLED screen.
5.) Use Task Managers like Advanced Task Killer, TasKiller or Advanced Task Manager in order to execute background apps. Background running apps actually take up a lot of your battery and also memory. So if you want performance and battery life both, use these. Task Managers themselves take a lot of memory, so remember to kill them too.
6.) Its best to use less widgets on the homescreen, they take up alot of memory.
7.) Don't use JIT, I think its useless, it may help some users but it takes up alot of battery so no point, it slows down the phone too.
8.) Use Dark Wallpapers, its better for the screen.
9.) DO NOT overcharge your phone, once its battery life is full, take it off! Overcharging REALLY eats up the Battery life.. of the .. battery :\
10.) Overclock your phone whenever you use it, if you don't use your phone that much, then leave the OC to 512 by SetCPU or any other Overclocking Widget.

smile

So, yeah.. This is it, I'll keep updating this post whenever I find something new, any doubts? Let me know.

- Arz

Last edited by arzbhatia (2010-10-11 06:32:27)

Samsung i7500 Galaxy - BLACK
Froyo 2.2 - BETA 3 - GAOSP
Gingerbread Theme Keyboard New Market

Filed under  //  android   i7500  
Sep 23 / 7:17pm

How to add undo / redo buttons to toolbar in Eclipse? - Stack Overflow

One way is to use custom plugin. In fact, such custom plugin doesn't need to do anything, only declare new toolbar contribution using existing undo/redo commands.

I've built such plugin for you: http://www.foglyn.com/misc/undoredo_1.0.0.jar. There is absolutely no code, only plugin.xml:

<?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.4"?><plugin>   <extension         point="org.eclipse.ui.menus">      <menuContribution          locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">         <toolbar               id="undoredo.toolbar">            <command                  commandId="org.eclipse.ui.edit.undo"                  id="undoredo.undo"                  style="push">            </command>            <command                  commandId="org.eclipse.ui.edit.redo"                  id="undoredo.redo"                  style="push">            </command>         </toolbar>      </menuContribution>   </extension></plugin>

And MANIFEST.MF:

Manifest-Version: 1.0Bundle-ManifestVersion: 2Bundle-Name: UndoredoBundle-SymbolicName: undoredo;singleton:=trueBundle-Version: 1.0.0Bundle-RequiredExecutionEnvironment: J2SE-1.5Require-Bundle: org.eclipse.ui

You can download it, and drop into your 'dropins' directory of Eclipse, restart, and you'll see Undo/Redo buttons on your toolbar.

Works for me in Eclipse 3.4 and Eclipse 3.5M7.

Filed under  //  eclipse  
Aug 9 / 8:08am

[ubuntu] Lenovo G450 Ubuntu 9.10 Wifi - Video - Ubuntu Forums

This Fix my wireless:

1) Open Synaptic Pacakage Manager, ensure all sources are marked.
2) connect to internet by cable
3) Refresh
4) Search for "bcmwl-kernel-source"
5) Mark for installation
6) Install it
7) Reboot computer

To install video package, just go to www.nvidia.com
and download the last stable package for linux, install it and voila!

Filed under  //  lenovo   ubuntu  
Jun 25 / 1:06am

[筆記] DD-WRT - Enable JFFS

  1. On the router web page click on Administration.
  2. Scroll down until you see JFFS2 Support section.
  3. Click Enable JFFS.
  4. Click Save.
  5. Wait couple seconds, then click Apply.
  6. Wait again. Go back to the Enable JFFS section, and enable Clean JFFS.
  7. Do not click "Save". Click Apply instead.
    The router formats the available space.
  8. Wait till you get the web-GUI back, then disable "Clean JFFS" again.
  9. Click "Save".
  10. It may be wise to Reboot the router, just to make sure


參考
http://www.dd-wrt.com/wiki/index.php/Jffs#Enable_JFFS:_Create_.2Fjffs

Filed under  //  dd-wrt   jffs  
Jun 5 / 8:59pm

Ubuntu 10.04 / Windows XP dual boot (using Grub2)

I recently installed Ubuntu 10.04 on my dual boot system and noticed that my boot options were changed. I typically have Windows XP as the default OS. Here are the steps that worked for me to get Windows XP as the default boot using Grub2.

During my initial Window XP install I had partitioned my hard drive into 3 partitions:

Code:
1 Partition 1: NTFS format (Windows XP installation) in Linux it is called /dev/sda1
2 Partition 2: NTFS format (Data for Windows XP) in Linux is is called /dev/sda5
3 Partition 3: Unformatted (I left this because I knew I wanted to install Linux)
This is how those partitions looked when booting to the Ubuntu installer (I used the Ubuntu installer to create the /swap and ext3 partitions on Partition 3 which was unformatted):


/dev/sda1 (Windows-XP OS NTFS)
/dev/sda5 (Windows-XP Data NTFS)
/swap
/dev/sda7 (Ubuntu 10.04 OS ext3)


After installation I noticed that Ubuntu was being booted by default. The default boot entries are created from the files in the /etc/grub.d/ directory. The files need to be executable (have a * at the end of the file name) to be included in the boot menu. To make a file executable type: sudo chmod +x <filename>

Code:
1 $> cd /etc/grub.d/
 2 $> ll
 3 total 56
 4 drwxr-xr-x   2 root root  4096 2010-05-11 21:35 ./
 5 drwxr-xr-x 130 root root 12288 2010-05-11 21:42 ../
 6 -rwxr-xr-x   1 root root  4444 2010-04-13 06:57 00_header*
 7 -rwxr-xr-x   1 root root  1416 2010-04-13 06:38 05_debian_theme*
 8 -rwxr-xr-x   1 root root  4594 2010-04-13 06:57 10_linux*
 9 -rwxr-xr-x   1 root root   918 2010-03-23 02:40 20_memtest86+*
10 -rwxr-xr-x   1 root root  6605 2010-04-13 06:57 30_os-prober*
11 -rwxr-xr-x   1 root root   214 2010-04-13 06:57 40_custom*
12 -rw-r--r--   1 root root   483 2010-04-13 06:57 README
I didn't want the memory tests to be on the boot menu so I removed the executable bit on 20_memtest86+. You could also disable the 30_os-prober since we are adding Windows XP manually but that is optional. I left that file active in case I screwed something up.

Code:
1 $> sudo chmod -x 20_memtest86+
I wanted Windows XP to stay at the top of the menu because with each kernel update it will get pushed further down the boot list. By naming the file with 06_... it gets sorted to the top of the boot list so when we edit /etc/default/grub we can set the default boot option to be 0 which is the top of the list.

Code:
1 $> sudo cp 40_custom 06_windowsxp
2 $> sudo vim 06_windowsxp
Then I copied the menuentry for Windows XP section of /boot/grub/grub.cfg into 06_windowsxp. The /etc/grub/grub.cfg file is auto-generated so it does no good to edit it directly. After editing, my 06_windowsxp file looked like this:

Code:
1 #!/bin/sh
 2 exec tail -n +3 $0
 3 # This file provides an easy way to add custom menu entries.  Simply type the
 4 # menu entries you want to add after this comment.  Be careful not to change
 5 # the 'exec tail' line above.
 6 
 7 # copied from /boot/grub/grub.cfg
 8 menuentry "Windows XP Professional x64 Edition (on /dev/sda1)" {
 9         insmod ntfs
10         set root='(hd0,1)'
11         search --no-floppy --fs-uuid --set 0060ff4060ff3acc
12         drivemap -s (hd0) ${root}
13         chainloader +1
14 }
Now I needed to ensure that we will always default to the 0th entry in the boot list. This is done by setting GRUB_DEFAULT to 0. Zero is the default value so you probably don't need to edit this. I also decreased the GRUB_TIMEOUT to 4 and increased the resolution GRUB_GFXMODE=1024x768 (both are optional).
Code:
1 $> cd /etc/default/
2 $> sudo vim grub
The resulting grub file should look similar to this (changes in bold):

Code:
1 # If you change this file, run 'update-grub' afterwards to update
 2 # /boot/grub/grub.cfg.
 3 
 4 GRUB_DEFAULT=0
 5 #GRUB_HIDDEN_TIMEOUT=0
 6 GRUB_HIDDEN_TIMEOUT_QUIET=true
 7 GRUB_TIMEOUT=4
 8 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
 9 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
10 GRUB_CMDLINE_LINUX=""
11 
12 # Uncomment to disable graphical terminal (grub-pc only)
13 #GRUB_TERMINAL=console
14 
15 # The resolution used on graphical terminal
16 # note that you can use only modes which your graphic card supports via VBE
17 # you can see them in real GRUB with the command `vbeinfo'
18 GRUB_GFXMODE=1024x768
19 
20 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
21 #GRUB_DISABLE_LINUX_UUID=true
22 
23 # Uncomment to disable generation of recovery mode menu entries
24 #GRUB_DISABLE_LINUX_RECOVERY="true"
25 
26 # Uncomment to get a beep at grub start
27 #GRUB_INIT_TUNE="480 440 1"
The final step is to run update-grub to write our changes into the /boot/grub/grub.cfg file.
Code:
1 $> sudo update-grub
2 Generating grub.cfg ...
3 Found linux image: /boot/vmlinuz-2.6.32-22-generic
4 Found initrd image: /boot/initrd.img-2.6.32-22-generic
5 Found linux image: /boot/vmlinuz-2.6.32-21-generic
6 Found initrd image: /boot/initrd.img-2.6.32-21-generic
7 Found Windows XP Professional x64 Edition on /dev/sda1
8 done
You can check that your changes worked by re-examining the /boot/grub/grub.cfg file.

May the force be with you...

Filed under  //  grub2   ubuntu   windows  
Apr 14 / 10:27pm

Minitube: YouTube Without Flash

Minitube is a native YouTube client that does not require the Flash Player. It's currently in a "Technology Preview" release but has come a long way since I first started using it a couple months back. Minitube aims to create a new TV-like experience by allowing you to type in a keyword and have an endless video stream of content play.

Minitube

I like using Minitube to watch or listen to videos while I work in Firefox. It's much lighter on resources than flash in Firefox/Chrome and I no longer have to worry about my browser crashing and losing data because I want to check out a link my buddy sent me or listen to Jermaine Stewart.

To install Minitube in Kamric or higher,
in a terminal type:

sudo add-apt-repository ppa:neversfelde/ppa
- to add the Minintube PPA and GPG Key

sudo apt-get update
- to update your repository

sudo apt-get install minitube phonon-backend-gstreamer
- to install Minitube and the photon backend to gstreamer

If you are using Ubuntu 9.04 Jaunty Jackalope or older you must add the Minitube PPA manually.

If your having problem with video playback, make sure you've installed the necessary codecs.

sudo apt-get install ubuntu-restricted-extras
- will take of of all your codec problems.

Filed under  //  minitube   ubuntu   youtube  
Apr 12 / 11:40am

Ubuntu 9.10 安裝最新版本 Nvidia Driver on ION 系統

參考: XBMCBuntu: Install "restricted drivers" if you have an NVIDIA or ATI/AMD GPU

Ubuntu's repository 並沒有放入最新的 Nvidia 驅動程式 (截至目前為止這邊的 Nvidia 驅動版本為 185),要下載最新版本的,那當然就要到 Nvidia 的儲庫 (repository)來找。

下列指令除了新增 Nvidia 儲庫外,同時也安裝了最新版本的驅動程式。

  • 新增 Nvidia 官方儲庫並搜尋最新釋出 (release)的版本。
    > sudo add-apt-repository ppa:nvidia-vdpau/ppa
    > sudo apt-get update
    > apt-cache search nvidia | grep source
  • 選擇欲安裝的釋出版本。目前最新釋出為 195,隨爾後搜尋到比之更高的版號改掉即可。
    > sudo apt-get install nvidia-195-kernel-source nvidia-glx-195 nvidia-settings mesa-utils libvdpau-dev
  • Generate an xorg.conf file
    sudo nvidia-xconfig -s --no-logo --force-generate --output-xconfig=/etc/X11/xorg.conf
  • Load the NVIDIA kernel module
    > sudo modprobe nvidia

重新啟動系統,至 Xwindow 桌面工作列,系統 → 管理 → Nvidia X Server Settings 查看驅動程式版本。截至目前為止 (02/23),最新釋出的版號為 195.36.03。

Filed under  //  nvidia   ubuntu