2016年1月30日

m3安裝記事

1.下載ubuntu mate img
2.使用dd或是磁碟寫入工具做成sd,並調整硬碟分割區成16GB
3.改成中文語系
nano /etc/default/locale
LANG="zh_TW.UTF-8"

多媒套件
sudo apt-get install ubuntu-restricted-extras

4.安裝vim和升級
apt-get update
apt-get install vim
apt-get install firefox-locale-zh-hant
apt-get dist-upgrade

5.重新開機

6.安裝fcitx
apt-get install fcitx-table-cangjie5 fcitx-chewing fcitx-config-common fcitx-config-gtk fcitx-table-boshiamy

7.安裝軟體中心
apt-get install software-center

8.安裝audacity
apt-get install audacity
apt-get install lame libmp3lame0
 
9.調整cache到記憶體
vim /etc/fstab
加入下列字串
tmpfs           /home/pi/.cache tmpfs   size=200M       0       0

10.安裝gimp
apt-get install gimp gimp-plugin-registry

11.安裝imagination
apt-get install imagination

12.軟體中心安裝Gnash SWF
  apt-get install gnash

13.安裝kdemlive openshot kolourpaint4
apt-get install kdenlive openshot
apt-get install kde-l10n-zhtw

14.安裝tweak
wget https://launchpadlibrarian.net/173353757/ubuntu-tweak_0.8.7-1~trusty2_all.deb
dpkg -i ubuntu-tweak_0.8.7-1~trusty2_all.deb
apt-get -f install

15. 安裝 tuxpaint
apt-get install tuxpaint tuxpaint-config

16.安裝gedit
apt-get install gedit

17.安裝java
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
####apt-get install openjdk-8-jdk
sudo apt-get install oracle-java8-installer
 
18.安裝sweethome3d
apt-get install sweethome3d

19.安裝shutter
apt-get install shutter

20建立捷徑
ln -s ./Downloads 下載
ln -s ./Videos 影片
ln -s ./Pictures 圖片
ln -s ./Documents 文件
ln -s ./Music 音樂
ln -s ./Desktop 桌面

21.安裝ffmulticonverter
sudo add-apt-repository ppa:anton+/photo-video-apps
sudo apt-get update
sudo apt-get install ffmulticonverter


解壓縮
apt-get install unoconv unrar unzip p7zip p7zip-rar


jkiwi 有問題


調gpu
https://github.com/ssvb/xf86-video-fbturbo/wiki/Installation

sudo apt-get install git build-essential xorg-dev xutils-dev x11proto-dri2-dev
sudo apt-get install libltdl-dev libtool automake libdrm-dev
 
writer標點符號工具列
wget http://extensions.libreoffice.org/extension-center/add-chinese-punctuation-marks-toolbar-for-writer/ChinesePunctuationTw-1.0.1/1.0.1/chinesepunctuationtw-1.0.1.oxt
使用libreoffice 開啟

 
教育部標準楷書
wget http://ws.moe.edu.tw/Download.ashx?u=C099358C81D4876C5303003B8BD1CBF5A0106AD29D0342C96EB319AE2D6BDEB4EE0A878EF0A975885123826EAED0A11E0A2D8896A8BF0F1A69DF0E3360DB8EC215CFA272AC758C9C05ACF7BDBD0DCE2A&n=B7AC7BE682935BF19B6FCA6E2E979468&icon=..rar
 cp edukai-3.ttf /usr/share/fonts/truetype/
 
 安裝libreoffice-base
apt-get install libreoffice-base 
 
文泉正黑體和
 
 
apt-get install gtk-theme-config gtk-theme-switch 
 
無線網路測試正常 105.02.02
聲音未聽到


apt-get install awesfx

apt-get install inkscape
下載子忠的mo檔
https://drive.google.com/file/d/0B8MclADHBn8eNlYtZ3BkdEZKT1U/view
放到 /usr/share/locale-langpack/zh_TW/LC_MESSAGES/ 資料夾下

調校ctrl alt + backspace登出
sudo dpkg-reconfigure keyboard-configuration 

 
apt-get dist-upgrade後音源孔正常了
gimp裝不起來
apt-get install krita
下載中文化檔案.mo 
http://www.krita.url.tw/localization.html



2016年1月23日

改良的設備(motoduino car)

使用了arduino設備,自己覺得有些小心地方要改,要廠商做需要長久時間,剛好3D印表機到位,自己畫了圖,改了以下地方。
1.底板座:arduino底座無保護措施,常容易造成短路或是數字亂跑(用紙板也可以)。
https://tinkercad.com/things/3ELU4gShXg4


2.外接電池座盒:外接電池如何固定在車架上?用魔鬼粘,還是會脫落,做個盒子來放吧。
https://tinkercad.com/things/0x9dtIGP8u3
3.車子後輸:在控制車子時常有人反應,馬力不好控制,容易偏,看了一下有可能是後輸是萬向輸,有一定的啟動偏移力。改成滾珠輪子會好些,到五金行買了按摩用的設備,平均一個珠子不到十元,弄個底座來用。
https://tinkercad.com/things/h0Dqz0fgjfd


https://www.tinkercad.com/things/gWHnFGXyTPK-tires

4.步進馬達轉盤:老師想把原來轉盤的孔數改成6個或是8個。
https://tinkercad.com/things/bKBnaKLf0qH



2016年1月21日

xmind輸出成pdf(分割)

做了一個族譜,不多大約要80張A4的紙,接起來這麼長,xmind輸出成pdf要付費,找了用印表機列印成pdf的dopdf程式,它又可以分割列印,一口氣輸出80張,完成任務。不錯用,記錄一下。
參考文章:
https://briian.com/7091/dopdf.html

2016年1月6日

bpi當媒體主機

我的bpi正式服役了。它取代L480主機在學校川堂定時播放影片。這樣我又多一台主機可以使用空間也多出來了。耗電量從40瓦降到6瓦。

做法很簡單,使用crontab定時啟動一支sh,sh內容是播放固定資料夾內所有媒體檔案。
smplayer是不錯的媒體播放程式,它有全螢幕,也有播放結束後自動關閉程式功能。我用到的參數有:
   -no-close-at-end: 主視窗在檔案或播放清單結束後不關閉。
   -fullscreen: 視訊將會在全螢幕模式播放
crontab內容:(編輯crontab)
crontab -e
0 7 * * * /home/edu/mysmplayer.sh
10 7 * * * /home/edu/mysmplayer.sh
21 7 * * * /home/edu/mysmplayer.sh
30 7 * * * /home/edu/mysmplayer.sh
0 16 * * * /home/edu/mysmplayer.sh
10 16 * * * /home/edu/mysmplayer.sh

我為了確保smplayer有確實關掉,加上了killall smplayer指令

mysmplayer.sh內容為:
#!/bin/bash
m_w=`date '+%w'`
set -x
/usr/bin/xhost +localhost
DISPLAY=:0.0
export DISPLAY
LANG=zh_TW.utf8
export LANG

if [ $m_w -eq 1 ]; then
/usr/bin/smplayer -fullscreen  -close-at-end /home/edu/Video/*.*
killall smplayer
exit 0
fi
if [ $m_w -eq 2 ]; then
/usr/bin/smplayer -fullscreen -close-at-end /home/edu/Video/*.*
killall smplayer
exit 0
fi
if [ $m_w -eq 3 ]; then
/usr/bin/smplayer -fullscreen  -close-at-end /home/edu/Video/*.*
killall smplayer
exit 0
fi
if [ $m_w -eq 4 ]; then
/usr/bin/smplayer -fullscreen  -close-at-end /home/edu/Video/*.*
killall smplayer
exit 0
fi
if [ $m_w -eq 5 ]; then
/usr/bin/smplayer -fullscreen  -close-at-end /home/edu/Video/*.*
killall smplayer
exit 0
fi
這樣可以設定成每天播放不同資料夾中的媒體。

2016年1月5日

bpi for17吋螢幕

有人反應bpi在17 19吋螢幕上顯示有問題,需要到20吋以上才可以看,找了答案一段時間,今天測試成功。關鍵在一個開機檔案的一個參數(在第一分割區中)。
我把參數貼出來
自動偵測螢幕最少720p
disp.screen0_output_mode=EDID:1280x720p50
把螢幕固定在
disp.screen0_output_mode=4


感覺上讓系統自動偵測比較好,但自動偵測後進入linux是無法再改變解析度,如果是20吋以上螢幕,解析度會高達1280x1024,字很小是不適合學生的。

詳細設定可以參考下列網址:
http://linux-sunxi.org/Display

下圖是用bpi m1 在17吋螢幕(右上角有螢幕型號L480配發的螢幕) 的畫面