顯示具有 ubuntu 標籤的文章。 顯示所有文章
顯示具有 ubuntu 標籤的文章。 顯示所有文章

2013年1月28日 星期一

remove all .svn folders

當拿到一整包source code 但不想要有保留裡面的.svn folders的話
可以用以下command 把folder裡面(包含所有sub-folders)的.svn folder通通delete
find /path/to/target/folder -type d -name '.svn' -exec rm -rf {} \;

2012年12月19日 星期三

[ubuntu] 將使用者加入某個group

$ sudo usermod -a -G GROUP-NAME UserName

2012年12月18日 星期二

讓ubuntu也能auto sync Box.com的資料

由於買了sony的手機 於是有了50G的Box可以免費使用(比dropbox的空間多好多) 但是偏偏他提供的client工具並沒有給linux的 但是網路上就是有人有辦法讓ubuntu也能在local端使用Box.com並且自動的同步
廢話不多說, 步驟如下
一. $ sudo apt-get install davfs2 $ sudo chmod u+s /sbin/mount.davfs $ sudo usermod -a -G davfs your-ubuntu-user-account $ sudo vim /etc/fstab 將下行貼上去 (記得要將your-ubuntu-user-account換成你自己的account name) https://www.box.com/dav /home/your-ubuntu-user-account/box.com davfs rw,user,noauto 0 0 $ cd ~ $ mkdir box.com $ mount box.com/ 然後就會提示你要輸入你的box user account (full email) 和 password 另外如果不想要每次都輸入帳號密碼, 可以多做以下動作 $ sudo vim /etc/davfs2/secrets 打入這行內容 https://www.box.com/dav box-user-account box-password 這樣做之後就可以設定成auto mount, 也就是將/etc/fstab的內容從noauto 改成 auto reference: http://dev.modmancer.com/index.php/2011/12/17/access-box-com-box-net-from-your-ubuntu/

2011年3月12日 星期六

[轉]Use uart(rs-232) with putty in ubuntu

http://ed32.blogspot.com/2010/01/ubuntuputty.html
在Linux底下,通常都是使用 minicom 來做uart(rs-232)端的通訊工具,不過使用 Putty 也可以達到一樣的功能。

另外putty也有提供ssh的連線功能,非常的簡單直覺,應該都沒什問題,所以就不說了。

我這次是在 VMware 裡面用實體com port 作連線。

【設定】
先把實體 com port mapping 到 vm,如果你是用usb-to-serial cable的話,應該可以跳過。

1. 選 Use physical port on the host



















2. 用的是 com1



















3. 加好了

















【下載】

1. 抓一下 putty.exe
view source
print?
1 $ wget http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
2. 作一個 software link,等等 putty 用的是 com1,也就是實體的 /dev/ttyS0。
view source
print?
1 $ ln -s /dev/ttyS0 ~/.wine/dosdevices/com1
3. 補充#2,如果是 usb-to-serial cable的話,應該是
view source
print?
1 $ln –s /dev/ttyUSB0 ~/.wine/dosdevices/com1
其中的ttyUSB*,應該針對你的裝置號碼自行更改。
4. 看看#3的結果,會發現有了一個com1
view source
print?
1 $ ls ~/.wine/dosdevices/
2 c: com1 d:: e:: z:

【啟動】

1. 使用下面指令,用 wine 帶起putty
view source
print?
1 $ wine putty.exe
2. 設一下相對於Target的Baudrate,我的是 com1/57600














3. 連線成功,Tx/Rx 進來出去都OK。















【設定】

1. Implicit CR in every LF,把LF延伸成 \r\n


















2. 若有存檔需求,按照你的需求勾選。


2010年5月28日 星期五

(轉載)Ubuntu 10.04 換成 sun-java-jdk 的步驟

ref: http://blog.cheyingwu.tw/index.php/2010/05/02/ubuntu-10-04-switch-to-sun-jdk/

話說沒讀 release notes 中地雷的人還蠻多的,我也是其中之一
在 ubuntu 10.04 預設是 openjdk 要換成 sun-java-jdk 也不是很難
首先先要加入 repository
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
然後安裝 sun-jdk
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
然後手動切換成 sun-jdk
sudo update-java-alternatives -s java-6-sun
這樣就可以換成 sun-jdk 了
話說沒讀 release notes 中地雷的人還蠻多的,我也是其中之一
在 ubuntu 10.04 預設是 openjdk 要換成 sun-java-jdk 也不是很難
首先先要加入 repository
sudo add-apt-repository 『deb http://archive.canonical.com/ lucid partner』
然後安裝 sun-jdk
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
然後手動切換成 sun-jdk
sudo update-java-alternatives -s java-6-sun
這樣就可以換成 sun-jdk 了

=========================================
順道一題,由於想要在ubuntu上安裝android的開發套件
所以需要安裝eclipse and ADT
之前第一次安裝的ubuntu是32位元版,沒碰到什麽問題
後來第二次安裝ubuntu時選擇安裝64位元版本, 結果在安裝ADT確遇到問題了(這邊有提供解法 http://developer.android.com/sdk/installing.html#troubleshooting)
為了省去麻煩, 建議還是安裝32位元版的ubuntu就好
不然後續可能要多作一些額外處理才能正常使用android開發環境

補充:要安裝Android開發套件,安裝完eclipse之後還要確定有安裝Eclipse Java development tools (JDT), 之後才能安裝ADT

2010年5月27日 星期四

Thinkpad Trackpoint Scrolling in ubuntu 10.04

轉錄 (http://psung.blogspot.com/2010/04/thinkpad-trackpoint-scrolling-in-ubuntu.html)

Thinkpad TrackPoint Scrolling in Ubuntu Lucid/10.04

Another Ubuntu release, another set of X.org shakeups.
Some things in X changed in Lucid (xorg 1:7.5+5 and higher), breaking existing Thinkpad TrackPoint scrolling configurations that modify files in /etc/hal/fdi/policy (like those you may have seen in this previous post). You can use gpointing-device-settings to apply the same policy, but I found that even that stops working after a suspend/resume cycle.
Samson Yeung pointed out to me the following fix which can be applied on Ubuntu Lucid/10.04:
Create a new file /usr/lib/X11/xorg.conf.d/20-thinkpad.conf with the following contents:
Section "InputClass"
    Identifier "Trackpoint Wheel Emulation"
    MatchProduct "TrackPoint"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "2"
    Option "Emulate3Buttons" "false"
    Option "XAxisMapping" "6 7"
    Option "YAxisMapping" "4 5"
EndSection
Then restart X.
This configuration seems to be general enough that it works for both Thinkpad laptops with TrackPoints and the Thinkpad TrackPoint keyboard.
Source: instructions derived from these instructions by Samson Yeung. Thanks, Samson!

2010年5月25日 星期二

ubuntu熱鍵

Ctrl + N New 開新檔案
Ctrl + O Open 開啟舊檔
Ctrl + A Select all 全選
Ctrl + X Cut 剪下
Ctrl + C Copy 複製
Ctrl + V Paste 貼上
Ctrl + Z Undo 重來、上一步
Ctrl + Y Redo 復原(與上一 步相反功能)
Ctrl + S Save 儲存
Ctrl + W Close 關閉檔案
Ctrl + Q Quit 離開程式
Alt + Tab
切換視窗
Alt + Shift+Tab
反向切換視窗
Alt + Space
視窗控制選單
(與在視窗標題列案滑鼠右鍵同功能)
Alt + Print Screen
擷取目前視窗畫面
Ctrl + Alt + d
全部視窗最小化
Alt + F1
應用程式下拉選單
alt + 滑鼠左鍵
可以移動視窗
alt + 滑鼠中鍵
可以resize視窗
Ctrl + Alt + right arrow
切換桌面
Ctrl + Alt + left arrow
切換桌面
Ctrl + Alt + up arrow
切換桌面
Ctrl + Alt + down arrow
切換桌面
Ctrl + Alt + F1 = 跳到文字模式1(virtual terminals)
Ctrl + Alt + F2(F3)(F4)(F5)(F6) = 跳到文字模式2~6
Ctrl + Alt + F7 = 回到桌面
Ctrl + Alt + Backspace 跳出桌面,進入登入畫面

2010年5月24日 星期一

How to disable touchpad on ubuntu 9.10/10.04


If you want to disable your touchpad on Ubuntu 9.10/10.04 then issue the following commnad once:
gconftool-2 --type boolean --set /desktop/gnome/peripherals/mouse/touchpad_enabled false
Then to disable the touchpad issue the following command:
synclient TouchpadOff=1
This command is just active for the session so when you reboot your machine you will have to issue it again.  What I have done is to add it to my Startup Programs.  You will find Startup Programs under System|Preferences|Startup Applications.