2016年5月3日 星期二

使用Linux系統和自然人憑證線上報稅

財政部綜合所得稅電子結算申報繳稅系統

本系統用於:
Mac OSX(Safari 5.1以上)
Linux: Fedora 13 (FireFox 3.6以上);Ubuntu 11.10 (FireFox 3.6以上)

因為使用了 java 和 Firefox 的 addon 來達到跨平台的目的

所以一定要使用 Firefox 瀏覽器(google chrome 已經不支援 java-plugin 了)

但看起來和發行版本沒什麼關係,應該只是舉出比較常見的 Linux 系統而已

這次使用 64 位元 openSUSE Leap 42.1 完全可以正常報稅

Linux 使用者可以有一個方便的管道報稅了,真是可喜可賀



1. 首先你需要一台可以被 Linux 支援的晶片讀卡機

之前用的和這次的,都是在便利商店買的,所以被支援的機率應該蠻高的

插上讀卡機後

$lsusb
Bus 001 Device 004: ID 0bda:0169 Realtek Semiconductor Corp. Mass Storage Device
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB


多出這兩行,和之前使用的機型是使用相同的晶片

所以也可以被 pcsc-lite 支援

開啟終端機,用 root 執行 pcscd



2. java 支援

大部分的發行版本應該都已經搞定了

打開 firefox 在網址列輸入 about:plugins

看有沒有 java-plugin 或 icedtea-plugin

沒有的話,自己裝一個



3. 開始報稅

用 Firefox 開啟 https://rtn.tax.nat.gov.tw/ircweb/index.jsp


選擇使用自然人憑證IC卡登入

經過一連串警告之後

開始檢查 JVM plugin

請在右上角允許執行 IcedTea-Web



接下來會出現警告:大意是數位簽署沒有被受信任的來源確認之類的

身為一個政府機關連這都沒做好有點誇張

但不管如何,還是選擇 Yes 進行吧!

接著是登入畫面

輸入身份證號和密碼後

系統會提示您安裝中華電信自然人憑證plugin(HiPKIClient)

報稅系統是利用這個附加元件來存取您的讀卡機



然而...這仍是一個未受驗證的附加元件

而 Firefox 43 之後預設會停用並禁止安裝未經驗證的附加元件


還是一句話:政府機關加油好嗎?

有關附加元件的簽署,請參考 這裡

我們只好先由 about:config 來修改設定,暫時來安裝這個附加元件



找到 xpinstall.signatures.required 點兩下

將 true 改成 false



然後安裝 HiPKIClient

重新啟動 Firefox 後,重新登入

即可進入線上報稅的主畫面



選擇2.就可以利用自然人憑證下載所得資料

不用一筆一筆輸入

這邊有一個小bug:點選4.會出現警告畫面,畫面中誤將下載資料列在1.


下載所得資料後,基本上就是每頁檢查,修改,

就一直下一頁,就OK了

完整的詳細步驟畫面,請直接看相簿


線上報稅步驟圖解

中間有一段錯誤是因為我原本的讀卡機讀不到卡片,所以又去買了一台新的...

最後加一張圖,請這兩個單位加油一點


2016年5月1日 星期日

Can't use baloosearch for Chinese characters

I have some pictures named "快照##.png" (that means screenshot)

in my Pictures folder (see fig 1),

but search with dolphin shows no results (see fig 2).

And search png, you can find these pictures (see fig 3),

so these files were indexed !

fig 1. Pictures Folder

fig 2 Search with Chinese characters shows nothing

fig 3 Search "png" will show these files


In https://bugs.kde.org/show_bug.cgi?id=333037

Cjacker in comment 25 had some patches for this,

I rebuild baloo5 packages with these patches in my obs home project:

home:swyear:baloo5

before upstream fix this problem,

it's a temporitary workaround for Chinese search in plasma5.

At last, I can search the Chinese characters (see fig 4,5,6).

fig 4. Search in dolphin with Chinese characters


fig 5. Search in start menu


fig 6. Search in krunner


The patched baloo5 packages can be found in

http://download.opensuse.org/repositories/home:/swyear:/baloo5/

After installing these packages, run "balooctl disable" then "balooctl enable"in terminal,

wait some minutes for the file indexing.

When it's done, your baloosearch can use Chinese characters to search.

Baloo also affects Desktop search and Krunner (Alt+F2), you can see in fig 5, 6.

Before patching baloo,

Desktop search and Krunner shows nothing when using Chinese characters to search.



But there's problems when searching Applications.

When search "edit", (see fig 7)

you can see some results in Applications (應用程式)and Desktop search (桌面搜尋),

And some applications are named with "編輯" (that means "edit").

But search "編輯",you can't find these applications,

only Desktop search got the results. (see fig 8)

fig 7. Search "edit"

fig 8. Search "編輯"




2016年4月29日 星期五

Installing shutter

Shutter is a feature-rich screenshot tool, home page: http://shutter-project.org/

shutter is not in Leap 42.1 standard repository,

so you have to install it by adding repositories manually.


#zypper ar obs://X11:Utilities x11
#zypper ar obs://devel:languages:perl perl-dev
#zypper ref
#zypper in shutter


if you want to use 1 click install,

open this link with firefox.







2016年4月22日 星期五

Event Calendar

今日發現了一個KDE桌面元件 Event Calendar,可以顯示google行事曆,感覺不錯用

















可用來替代原本的數位時鐘/行事曆