2019年7月15日

Mint 18.2:fcitx 輸入法無法選字

在 Mint 18 中,若要使用 wine (PlayOnLinux) + line (windows版),使用 ibus 輸入法會衝突而無法輸入文字。改用 fcitx 輸入法可以解決這個問題。

但重灌 Mint 18.2 時,卻無法出現候選字視窗 (像這樣)



這時可以用停用 Kimpanel 套件,到 Synaptic 去移除 fcitx-module-kimpanel 即可

2019年7月14日

linux 測硬碟速度指令 hdparm

ubuntu/Mint 下預裝有測硬碟速度指令 hdparm。其用法,例如:

sudo hdparm -Tt /dev/sda
可以測 sda 硬碟速度。

我的 WD 2TB 3.5吋碟,測試結果:

#sudo hdparm -Tt /dev/sda

/dev/sda:  Timing cached reads:   7406 MB in  2.00 seconds = 3704.50 MB/sec
 Timing buffered disk reads: 374 MB in  3.01 seconds = 124.27 MB/sec


我的 128G SSD碟,測試結果:

#sudo hdparm -Tt /dev/sdb

/dev/sdb:  Timing cached reads:   7466 MB in  2.00 seconds = 3734.90 MB/sec
 Timing buffered disk reads: 800 MB in  3.00 seconds = 266.45 MB/sec

===2020/12/28===
A-Data model: SX8200PNP 碟, 測試結果:
/dev/nvme0n1p3: Timing cached reads:   20314 MB in  2.00 seconds = 10168.51 MB/sec Timing buffered disk reads: 8342 MB in  3.00 seconds = 2780.22 MB/sec

2019年6月13日

google drive 同步工具:grive


Grive 指令工具,可以讓Google 雲端硬碟跟本機硬碟中的檔案同步

==grive 2.0的安裝==

用 PPA,參見 Grive2
在 terminal 中下指令:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install grive
 或從 github 自行下載 compile (see grive2)

==grive 的使用參數==

source: http://blog.ilc.edu.tw/blog/index.php?op=printView&articleId=649021&blogId=25793

-v 列出 grive 版本
$ /usr/local/bin/grive -v
grive version 0.5.1-dev Jun 30 2016 13:33:47

-a 取得授權碼
$ /usr/local/bin/grive -a

-p 要同步的根目錄,同步到 Google Drive 後,呈現的就是 /home/t850008/Google 目錄下的檔案及目錄
$ /usr/local/bin/grive -p /home/t850008/Google

-s 單一子目錄同步
$ /usr/local/bin/grive -s /home/t850008/Google/123

-V 詳細模式,啟用比正常更多的訊息
$ /usr/local/bin/grive -p /home/t850008/Google -V
config file name "/home/t850008/Google/.grive"
Reading local directories
file .grive_state is ignored by grive
file .grive is ignored by grive
Reading remote server file list
file "/home/t850008/Google/格式工廠 format factory 3.8.0.0 中文免安裝版.exe" is already in sync
Synchronizing files
sync "/home/t850008/Google" already in sync
sync "/home/t850008/Google/pCloud_Windows_3.2.4.exe" deleted in remote. deleting local
sync "/home/t850008/Google/格式工廠 format factory 3.8.0.0 中文免安裝版.exe" already in sync
change stamp is set to 14
Finished!

-l 設定輸入的 log 檔的檔案名稱

-f 強制
$ /usr/local/bin/grive -p /home/t850008/Google -f

-u 不從 Google Drive 下載檔案, 只上傳本地端有改變的檔案
$ /usr/local/bin/grive -p /home/t850008/Google -u

-n 只下載 Google Drive 有改變且已存在本地端的檔案,也會上傳本地端的檔案到 Google Drive
$ /usr/local/bin/grive -p /home/t850008/Google -n

--dry-run 只偵測哪些檔案要處理,並不實際做檔案的上傳或下載
$ /usr/local/bin/grive -p /home/t850008/Google --dry-run

--ignore 使用 Perl 常規表示式來過濾一些不處理的目錄(針對相對應目錄處理)

-U 限制上傳的速度  kbytes per second
-D 限制下載的速度  kbytes per second

==grive -h==

~ $ grive -h
Grive options:
  -h [ --help ]               Produce help message
  -v [ --version ]            Display Grive version
  -a [ --auth ]               Request authorization token
  -i [ --id ] arg             Authentication ID
  -e [ --secret ] arg         Authentication secret
  -p [ --path ] arg           Path to working copy root
  -s [ --dir ] arg            Single subdirectory to sync
  -V [ --verbose ]            Verbose mode. Enable more messages than normal.
  --log-http arg              Log all HTTP responses in this file for
                              debugging.
  --new-rev                   Create new revisions in server for updated files.
  -d [ --debug ]              Enable debug level messages. Implies -v.
  -l [ --log ] arg            Set log output filename.
  -f [ --force ]              Force grive to always download a file from Google
                              Drive instead of uploading it.
  -u [ --upload-only ]        Do not download anything from Google Drive, only
                              upload local changes
  -n [ --no-remote-new ]      Download only files that are changed in Google
                              Drive and already exist locally
  --dry-run                   Only detect which files need to be
                              uploaded/downloaded, without actually performing
                              them.
  -U [ --upload-speed ] arg   Limit upload speed in kbytes per second
  -D [ --download-speed ] arg Limit download speed in kbytes per second
  -P [ --progress-bar ]       Enable progress bar for upload/download of files

 

2019年5月21日

移除不必要的字形, Mint 18.2

只留下中日韓英4種語文

移除...像是
Tlwg 泰語系
Lohit 古印語
samyak 印語
kacst 阿語系
padauk 緬語
gargi 印加語
Kalapi 印語
gubbi 印語
Khmer 高棉
Kannada 印語
navilu 古印語
Tibetan 藏文
SMC 馬來文
Bengali 孟加拉文
Punjabi 旁遮普文
。。。(哇,好多呀...)

徹底移除以下套件的指令:


sudo apt-get -y --purge autoremove fonts-beng fonts-beng-extra fonts-deva fonts-deva-extra fonts-gargi fonts-gubbi fonts-gujr fonts-gujr-extra fonts-guru fonts-guru-extra fonts-indic fonts-kacst fonts-kacst-one fonts-kalapi fonts-khmeros-core fonts-knda fonts-lao fonts-lklug-sinhala fonts-lohit-beng-assamese fonts-lohit-beng-bengali fonts-lohit-deva fonts-lohit-gujr fonts-lohit-guru fonts-lohit-knda fonts-lohit-mlym fonts-lohit-orya fonts-lohit-taml fonts-lohit-taml-classical fonts-lohit-telu fonts-mlym fonts-nakula fonts-navilu fonts-noto fonts-noto-hinted fonts-noto-unhinted fonts-orya fonts-orya-extra fonts-pagul fonts-sahadeva fonts-samyak-deva fonts-samyak-gujr fonts-samyak-mlym fonts-samyak-taml fonts-sarai fonts-sil-abyssinica fonts-sil-padauk fonts-smc fonts-taml fonts-telu fonts-telu-extra fonts-thai-tlwg fonts-tibetan-machine fonts-tlwg-garuda fonts-tlwg-garuda-ttf fonts-tlwg-kinnari fonts-tlwg-kinnari-ttf fonts-tlwg-laksaman fonts-tlwg-laksaman-ttf fonts-tlwg-loma fonts-tlwg-loma-ttf fonts-tlwg-mono fonts-tlwg-mono-ttf fonts-tlwg-norasi fonts-tlwg-norasi-ttf fonts-tlwg-purisa fonts-tlwg-purisa-ttf fonts-tlwg-sawasdee fonts-tlwg-sawasdee-ttf fonts-tlwg-typewriter fonts-tlwg-typewriter-ttf fonts-tlwg-typist fonts-tlwg-typist-ttf fonts-tlwg-typo fonts-tlwg-typo-ttf fonts-tlwg-umpush fonts-tlwg-umpush-ttf fonts-tlwg-waree fonts-tlwg-waree-ttf

徹底移除了以下套件:

fonts-beng
fonts-beng-extra
fonts-deva
fonts-deva-extra
fonts-gargi
fonts-gubbi
fonts-gujr
fonts-gujr-extra
fonts-guru
fonts-guru-extra
fonts-indic
fonts-kacst
fonts-kacst-one
fonts-kalapi
fonts-khmeros-core
fonts-knda
fonts-lao
fonts-lklug-sinhala
fonts-lohit-beng-assamese
fonts-lohit-beng-bengali
fonts-lohit-deva
fonts-lohit-gujr
fonts-lohit-guru
fonts-lohit-knda
fonts-lohit-mlym
fonts-lohit-orya
fonts-lohit-taml
fonts-lohit-taml-classical
fonts-lohit-telu
fonts-mlym
fonts-nakula
fonts-navilu
fonts-noto
fonts-noto-hinted
fonts-noto-unhinted
fonts-orya
fonts-orya-extra
fonts-pagul
fonts-sahadeva
fonts-samyak-deva
fonts-samyak-gujr
fonts-samyak-mlym
fonts-samyak-taml
fonts-sarai
fonts-sil-abyssinica
fonts-sil-padauk
fonts-smc
fonts-taml
fonts-telu
fonts-telu-extra
fonts-thai-tlwg
fonts-tibetan-machine
fonts-tlwg-garuda
fonts-tlwg-garuda-ttf
fonts-tlwg-kinnari
fonts-tlwg-kinnari-ttf
fonts-tlwg-laksaman
fonts-tlwg-laksaman-ttf
fonts-tlwg-loma
fonts-tlwg-loma-ttf
fonts-tlwg-mono
fonts-tlwg-mono-ttf
fonts-tlwg-norasi
fonts-tlwg-norasi-ttf
fonts-tlwg-purisa
fonts-tlwg-purisa-ttf
fonts-tlwg-sawasdee
fonts-tlwg-sawasdee-ttf
fonts-tlwg-typewriter
fonts-tlwg-typewriter-ttf
fonts-tlwg-typist
fonts-tlwg-typist-ttf
fonts-tlwg-typo
fonts-tlwg-typo-ttf
fonts-tlwg-umpush
fonts-tlwg-umpush-ttf
fonts-tlwg-waree
fonts-tlwg-waree-ttf

2019年5月19日

讓 linux 終端機輸出英文

linux 的 DM 視窗管理壞掉,往往要按 ctrl+alt+ F1 開啟 終端機下指令,但指令輸出的訊息還是中文,變成亂碼無法辨識。

此時,只要下指令:

export LC_ALL=C

就可以暫時回到英文的 output 了。

2019年5月15日

Mint 18 復原桌面 panel 設定

不小心把 Mint 18 xfce4 的桌面 panel 弄壞了,不是預裝的 Whisker 選單,而是變成 xfce 的原始樣子,找了半天 google,都沒有滿意的答案和做法。

後來姑且亂試:
1. 隨便創建一個新 user1, 登入後發覺是預裝的畫面 (太棒了)
2. 先將自己的桌面 panel 設定備份,例如將

/home/我的帳號/.config/xfce4/

改名成 /home/我的帳號/.config/xfce40/

再將 user1 的桌面 panel 設定複製到自己的目錄下:

   sudo cp -R /home/user1/.config/xfce4/ /home/我的帳號/.config/xfce4/

最後不要忘了將 /home/我的帳號/.config/xfce4/ 這個子目錄改變擁有者,否則你做任何更動,都會回到原點...。請下指令:

      sudo chown  我的帳號:我的帳號 -R  /home/我的帳號/.config/xfce4/

登出,再登入,OK。回到最原始預裝的 whisker 選單了。。。








2019年4月29日

Ubuntu 16.04.5 LTS 的 DNS 更新


在虛擬機中,想更新套件
 sudo apt-get update
得到以下訊息"

錯誤:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
  暫時無法解析 'security.ubuntu.com'
錯誤:2 http://tw.archive.ubuntu.com/ubuntu xenial InRelease
  暫時無法解析 'tw.archive.ubuntu.com'
錯誤:3 http://tw.archive.ubuntu.com/ubuntu xenial-updates InRelease
  暫時無法解析 'tw.archive.ubuntu.com'
錯誤:4 http://tw.archive.ubuntu.com/ubuntu xenial-backports InRelease
  暫時無法解析 'tw.archive.ubuntu.com'
正在讀取套件清單... 完成


應該是 DNS 設置問題,在 ubuntu 12 之後,dns 設計改成由 resolvconf 控制,修改方式是編輯這個檔:

sudo vim /etc/resolvconf/resolv.conf.d/tail

加入一行:

nameserver 8.8.8.8

再重新啟動 resolvconf 即可

sudo resolvconf -u