2012年12月9日 星期日

ubuntu smbclient / smbfs / cifs-utils

smbclient : command line SMB Client
smbfs : a mountable SMB filesystem for Linux

安裝 smbclient 與 smbfs

  > sudo apt-get install smbclient smbfs cifs-utils


執行 smbclient 連上 Samba Server
範例為 192.168.1.100 / 分享目錄 share / 使用者 smb_user_name

  > smbclient -L //192.168.1.100/share/ -U smb_user_name

螢幕將出現類似下列訊息畫面,說明Samba Server

Enter smb_user_name's password: 

Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.3]

Sharename       Type      Comment
---------       ----      -------
IPC$            IPC       IPC Service (192.168.1.100 server (Samba, Ubuntu))
share           Disk      
print$          Disk      Printer Drivers

另外方式是將Samba Server的分享目錄,掛載(mount)在 /mnt/smb_path 檔案目錄下使用

> mkdir /mnt/smb_path
> mount -t smbfs -o username=smb_user_name,password=your_pass //192.168.1.100/share /mnt/smb_path

執行成功之後,就能直接存取 /mnt/smb_path 目錄下的檔案囉~

但 ubuntu 12.10 之後不再有 smbfs 套件,取得代之的是 cifs-utils 套件。

> mount -t cifs -o username=smb_user_name,password=your_pass //192.168.1.100/share /mnt/smb_path

#



2012年12月4日 星期二

Smart TV ? Android PC ? Google TV ? Apple TV ?


雖然Google TV已非新鮮事,但最近各大廠才陸續喊聲進軍Google TV,相信過不了多久,市面上賣電視的、賣螢幕的、賣電腦的、賣平板的、賣智慧手機的廠商都會沾上一些邊。

腦筋動得比較快的廠商,其實早已利用Android OS設計出 Mini PC  (Dongle Type)。便宜價格就能讓家裡的HDMI螢幕或電視機變身為Mini PC。

很快地,應用軟體和數位內容戰火就真的要延燒到家中的電視螢幕上了。

#

2012年11月6日 星期二

黑蘋果 Hackintosh Mac OS X Mountain Lion



  • Motherboard : Gigabyte Z77 D3H
  • CPU : Intel i7 3770
  • Memory : DDR3 1600 32GB Kingstone (8G*4) 
  • Video : MSI GTX650PE
  • SSD : Intel 330 120GB
  • OS : 購自 Apple App Store - Apple OS X Mountain Lion


* 參考網址:http://www.metamuse.net/2012/09/2012-osx-1082-pc.html

* Boot Loader : Chameleon-2.1-r2069
   參數: -v -x PCIRootUID=0

* 驅動程式 Kexts : 懶人包


  1. run Kext Utilityy

<install Network for GA-Z77-D3H motherboard>
  2. drag AtherosL1cEthernet.kext to Kext Utility window

<install Audio for GA-Z77-D3H motherboard>
  3. run VoodooPatcher and wait...
  4. run VoodooLoader Installer and wait ...

or

  3. drag VoodooHDA.kext to Kext Utility window
  4. drag appleHDADisabler.kext to Kext Utility window

<install nVidia GTX 650 driver>
  5. download from AMD offical site

#




2012年11月5日 星期一

60吋電視已經低於1000美元

60吋大尺寸面板的電視機零售價已經破盤低於1000美元(約新台幣3萬元)。

個人一直認為大尺寸面板的生意還真是不好賺。那麼一台可以讓全家人一起看、一起享受的電視機,價格卻跟一部高階智慧型手機差不多。說實在的還真是不值錢 XD

不過,從網路上搜尋到的一些資料試算,60吋以上的電視適合觀賞距離可能要2.6公尺以上。

以解析度1920 x 1080的面板為例:電視高度 h 公分 / 1080 * 3400 (常數。不曉得哪來的?)

看起來,家裡還要有相當空間才比較適合安裝60吋以上電視。

#

2012年10月16日 星期二

IT人員不可不知道明日 Mobile IT管理

智慧手機、平板等智慧終端滿街都是。目前企業內部IT管理仍著重在伺服器、個人電腦等日常作業IT設備管理,但可以預見 Mobile Devices 納入 IT 管理作業範疇也是不久的將來。


都是值得再深入研究的課題。

#

2012年9月4日 星期二

ubuntu 安裝 tesseract OCR 中文辨識


  1. 確認 precise universe 的套件部份加入 /etc/apt/sources.list 中
  2. 安裝 tesseract-ocr 套件
  3. 安裝 imagemagick 套件 (執行 convert指令將用上)
  4. 下載 tesseract 的繁/簡中OCR資料檔案,並解壓縮在 tessdata 目錄下


  5. /etc/apt/sources.list 中加入下列兩行:

       deb http://tw.archive.ubuntu.com/ubuntu precise universe
       deb-src http://tw.archive.ubuntu.com/ubuntu precise universe
    或是透過 add-apt-repository 
    > sudo add-apt-repository "deb http://tw.archive.ubuntu.com/ubuntu precise universe"

    > sudo apt-get update

    > sudo apt-get install tesseract-ocr

    > sudo apt-get install imagemagick

    > cd /usr/share/tesseract-ocr/tessdata

    > sudo wget http://tesseract-ocr.googlecode.com/files/chi_tra.traineddata.gz

    > sudo wget http://tesseract-ocr.googlecode.com/files/chi_sim.traineddata.gz

    > sudo gzip -f -d *.gz


  1. 利用 convert 將 PDF 或 PNG 等檔案,轉換成 depth:8 , type:Grayscale 半色調的 TIFF檔
  2. 執行 tesseract 進行 OCR 辨識。進行繁中OCR辨識,結果輸出至out.txt

    > cd /tmp
    ** PNG => TIFF ==(OCR)==> TEXT
    > convert source.png -type Grayscale -depth 8 out.tif
    > tesseract out.tif out.txt -l chi_tra
    或是
    ** PDF => TIFF ==(OCR)==> TEXT
    > convert -density 300 source.pdf -type Grayscale -depth 8 out.tif
    > tesseract out.tif out.txt -l chi_tra
    或是
    ** PDF => PPMs => TIFFs ==(OCR)==> TEXTs => TEXT
    > pdftoppm source.pdf -f 1 -l 10 -r 600 out
    > for i in *.ppm; do convert $i -type Grayscale -depth 8 ${i%.*}.tif; done
    > for i in *.tif; do tesseract $i ${i%.*}.txt -l chi_tra; done
    > cat *.txt > out.txt

補充:
  • convert 將 PDF 轉為 TIFF 時會耗費較多時間
  • tesseract 之參數 -l chi_tra (繁中辨識) , -l chi_sim (簡中辨識), -l eng (英文辨識;預設)
  • 結合 Hadoop Map Reduce 有很多影像應用服務可以玩了~

###

2012年9月2日 星期日

清除 ubuntu 舊版核心(kernel)

大致說明步驟如下:

  1. 確認目前系統正在使用的核心(kernel image)版本,萬一砍掉就不好玩了。
  2. 查詢目前已安裝的核心套件有哪些版本。
  3. 用apt-get purge移除掉舊版的核心及相關軟體套件。
實際操作:

> uname -a

Linux host 2.6.32-41-generic #94-Ubuntu SMP Fri Jul 6 16:51:39 UTC 2012 i686 i686 i386 GNU/Linux

> dpkg -l | grep linux-image

rc  linux-image-2.6.28-11-generic                 2.6.28-11.42                                    Linux kernel image for version 2.6.28 on x86/x86_64
rc  linux-image-2.6.28-15-generic                 2.6.28-15.52                                    Linux kernel image for version 2.6.28 on x86/x86_64
rc  linux-image-2.6.28-16-generic                 2.6.28-16.55                                    Linux kernel image for version 2.6.28 on x86/x86_64
rc  linux-image-2.6.31-14-generic                 2.6.31-14.48                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.31-15-generic                 2.6.31-15.50                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.31-16-generic                 2.6.31-16.53                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.31-17-generic                 2.6.31-17.54                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.31-19-generic                 2.6.31-19.56                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.31-20-generic                 2.6.31-20.58                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.31-21-generic                 2.6.31-21.59                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.31-22-generic                 2.6.31-22.60                                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.32-29-generic                 2.6.32-29.58                                    Linux kernel image for version 2.6.32 on x86/x86_64
rc  linux-image-2.6.32-30-generic                 2.6.32-30.59                                    Linux kernel image for version 2.6.32 on x86/x86_64
rc  linux-image-2.6.32-31-generic                 2.6.32-31.61                                    Linux kernel image for version 2.6.32 on x86/x86_64
rc  linux-image-2.6.32-32-generic                 2.6.32-32.62                                    Linux kernel image for version 2.6.32 on x86/x86_64
rc  linux-image-2.6.32-33-generic                 2.6.32-33.72                                    Linux kernel image for version 2.6.32 on x86/x86_64
ii  linux-image-2.6.32-34-generic                 2.6.32-34.77                                    Linux kernel image for version 2.6.32 on x86/x86_64
ii  linux-image-2.6.32-40-generic                 2.6.32-40.87                                    Linux kernel image for version 2.6.32 on x86/x86_64
ii  linux-image-2.6.32-41-generic                 2.6.32-41.94                                    Linux kernel image for version 2.6.32 on x86/x86_64
ii  linux-image-3.2.0-29-generic                  3.2.0-29.46                                     Linux kernel image for version 3.2.0 on 32 bit x86 SMP
ii  linux-image-generic                           3.2.0.29.31                                     Generic Linux kernel image

> apt-get -y purge linux-image-2.6.28-* linux-image-2.6.31-*

> apt-get -y autoremove

###