2016年9月25日 星期日

kubuntu 16.04 install on ThinkPad x240


  • 原先的版本是 kubuntu 14.04 , 這次的升級會從的kde 4 升到 kde 5 ,在桌面視窗的變動會蠻大的。
  • 由於保留了家目錄,所以所以直接把使用 unetbootin 做的 USB 重灌,很快就完成了。




狀況

  1. 升級後遇到 gcin 沒辦法正常使用嘸蝦米,最後改成 ibus
  2. chrome 使用雙指滾動時會亂跳。
    (不確定是OS 的問題還是CHROME 的問題)
  3. 系統的”休眠”按鍵在第一次更新後就消失了…
    改使用”設定硬體快捷鍵”來解決這個問題,要休眠時就直接按電源鍵。
  4. 無線網路有時會在還顯示連線時,就沒辦法上網了。
    (需要重新斷線,再連線才能解決)
  5. 有時候休眠回來後,桌面特效會失效。
    第一次發生之後,通過修改kwin config 檔,解決這個問題。之後有再遇到幾次,在config 檔沒問題的情況下,replace kwin 就可以了

狀況1

  • install ibus , change default im
sudo apt-get install ibus
sudo apt-get install ibus-table
im-config -n ibus
  • change xinputrc
~/.xinputrc
run_im ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus
export CLUTTER_IM_MODULE=xim
export SVN_EDITOR=vim
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT4_IM_MODULE=ibus
export XDG_RUNTIME_DIR=/run/user/1000
export GTK_IM_MODULE=xim
export LC_TIME=zh_TW.UTF-8
  • install liu
cd ~/boshiamy-ibus
./ibus-install-boshiamy.sh
ibus-install-boshiamy.sh
... 
# 修改官方腳本內的路徑
impath=/usr/share/ibus-table
#impath=/usr/share/ibus
...
  • reboot 之後就可以用 ctrl+space 切換輸入法來使用了。

狀況2

  • 狀況2 目前還是沒有解決,只是想在這邊備份一下之前微調 touch pad 的設定檔。
    /usr/share/X11/xorg.conf.d/52-thinkpad.conf

Section "InputClass"
  Identifier "Fixing clickpad buttons"
  MatchDriver "synaptics"

  # Use the top area of the trackpad as mouse buttons.
  # The meaning of these eight values are:
  # Right button: left, right, top, bottom
  # Middle button: left, right, top, bottom
  MatchIsTouchpad "on"
  Option "SoftButtonAreas" "60% 0 0 7% 40% 60% 0 7%"

  # Don't use the top of the trackpad for mouse movement
  Option "AreaTopEdge" "7%"
EndSection

狀況3

  • 確認 kwinrc 設定檔內 OpenGLIsUnsafe 選項是否設定為 false
  • 如果在 ~/.kde/share/config/ 下也有kwinrc 設得把它裡面的設定也一起改掉、或是刪除。(雖然這一版不是用KDE4,不確有沒有直接影響
~/.config/kwinrc
[Compositing]
OpenGLIsUnsafe=false

[Desktops]
Number=4
Rows=2

[Effect-CoverSwitch]
TabBox=false
TabBoxAlternative=false
... ...

狀況5

  • replace kwin 的指令
    不過這個在測試 kwin config 檔時比較好用,如果是 kwin 當掉時,直接使用kill 掉kwin, 再用 alt+f2 叫出快捷列,打kwin 比較好。不會再console 下跳一堆訊息。
kwin_x11 --replace

 
 

2016年3月8日 星期二

nginx mp4 module


  • 因為預設沒有載入,所以需要自行增加compile option
    --with-http_mp4_module
    
  • nginx conf
## type 1
location /video/ {
    mp4;
    mp4_buffer_size       4M;
    mp4_max_buffer_size   10M;
    mp4_limit_rate        on;
    mp4_limit_rate_after  30s;
}

## type 2
location ~ .mp4$ {
mp4;
mp4_buffer_size 4M;
mp4_max_buffer_size 10M;
}
  • ref: