samwhelp
samwhelp
And All ShowCase Error Occur On the Same Line # 訊息: 物件不支援此屬性或方法 行: 48 字元: 3 程式碼: 0 # URI: http://digitarald.de/project/fancyupload/3-0/showcase/single-file-button/ 訊息: 物件不支援此屬性或方法 行: 48 字元: 3 程式碼: 0 URI:...
I found Error Occur Main.as ExternalInterface.addCallback('stop', xStop); If Commnet this line, the error msg would not occur! //ExternalInterface.addCallback('stop', xStop); But I Still not Know Why?
I Fix Main.as ExternalInterface.addCallback('stop', xStop); To ExternalInterface.addCallback('toStop', xStop); The Error Would not Occur! :-) But Still Fix javasciprt code about (stop) 。
今天加入兩組便利操作的按鍵設定 * [Window Resize](https://github.com/samwhelp/vim-plugin-fit-key-with-space-vim#window-resize) * [Save](https://github.com/samwhelp/vim-plugin-fit-key-with-space-vim#save) 提供參考 報告完畢 :-)
執行 ``` sh $ im-config -n fcitx ``` 重開機或是重新登入,「輸入法框架」就會採用「fcitx」。 之前相關的討論可以參考 * https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=359064#forumpost359064 * https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=333556#forumpost333556 也可以執行下面指令,觀看相關的說明 * $ man [im-config](http://manpages.ubuntu.com/manpages/bionic/en/man8/im-config.8.html) * $ view /usr/share/doc/im-config/README.Debian.gz 可以對照專案裡面的寫法 * https://github.com/samwhelp/play-ubuntu-18.04-plan/blob/master/prototype/im-basic/fcitx-chewing/install.sh#L11 ================================================================================ 執行「im-config -n fcitx」,這個「設定值」會存在「~/.xinputrc」這個檔案。...
我猜測,您創造各個使用者的「$HOME/.config/fcitx/profile」, 可能是使用「sudo」或是「root帳號」來做這件事, 所以一開始「$HOME/.config/fcitx/profile 」的擁有者和群組應該是「root.root」, 我剛測試,當「fcitx」啟動的時候,這樣的情況下,好像就把舊去除, 然後產生新的「$HOME/.config/fcitx/profile」,並且該檔案的擁有者和群組就變成該使用者, 不過「[EnabledIMList=](https://github.com/samwhelp/play-ubuntu-18.04-plan/blob/master/prototype/im-basic/fcitx-chewing/config/set/profile#L17)」那一行,就不是您原先設定的了, 所以也就沒有「fcitx-keyboard-us:True,chewing:True」, 而是「fcitx-keyboard-us:True,chewing:False」。 所以我猜測,才會發生您說的狀況。 ``` 也曾經測試過把修改好的profile放到各個user的對應目錄去 可是user登入後,還是沒有啟動注音 ``` ================================================================================ 正常的狀況下 執行 ``` sh $ ls -al ~/.config/fcitx/profile ``` 顯示 ``` -rw------- 1 user user...
另外我想到還有一種情形, 就是「fcitx」已經執行了,然後這時候若直接修改「$HOME/.config/fcitx/profile」, 當重新啟動「fcitx」,我觀察到「fcitx」應該是會回寫「$HOME/.config/fcitx/profile」, 所以原本修改的內容,應該就會被蓋掉。 所以要直接修改「$HOME/.config/fcitx/profile」,應該要在「fcitx」沒有在執行的時候做這個動作。 另外根據 https://lazka.github.io/pgi-docs/index.html#Fcitx-1.0/classes/InputMethod.html#Fcitx.InputMethod.set_imlist 我寫了一個[範例](https://github.com/samwhelp/play-ubuntu-18.04-plan/tree/master/issue/fcitx-imlist/pygi-fcitx)「[fcitx-imlist.py](https://github.com/samwhelp/play-ubuntu-18.04-plan/blob/master/issue/fcitx-imlist/pygi-fcitx/fcitx-imlist.py)」 只要執行 ``` sh $ ./fcitx-imlist.py -e chewing ``` 就可以將「fcitx-chewing」加入「輸入法候選列表」。 更多詳細的用法,請參考「[README.md](https://github.com/samwhelp/play-ubuntu-18.04-plan/tree/master/issue/fcitx-imlist/pygi-fcitx)」。 其他的方式,還在研究中,若有心得,我會再貼上來 :-)
看起來應該還不需要改到原本的程式,只需要善用它原本提供的機制就可以了。 一樣可以直接修改「$HOME/.config/fcitx/profile」, 只是修改前,先停掉「fcitx」, 修改後,再啟動「fcitx」。 在寫「script」的時候,可以透過「[fcitx-remote](http://manpages.ubuntu.com/manpages/bionic/en/man1/fcitx.1.html)」這個指令來判斷「fcitx是否執行中」。 若「fcitx」正在執行中,則執行「fcitx-remote」回傳的「Exit Status」會是「0」, 若「fcitx」尚未執行,則執行「fcitx-remote」回傳的「Exit Status」會是「1」, 在寫「Shell Script」時,「Exit Status」可以透過「$?」得到, 例如: ``` sh fcitx-remote echo $? ``` 關於「Exit Status」之前有寫過一篇「[簡易教學](https://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=358884#forumpost358884)」可以參考。 另外我有寫一個「完整範例 - [install-fcitx-chewing](https://github.com/samwhelp/play-ubuntu-18.04-plan/tree/master/issue/fcitx-chewing/install-fcitx-chewing)」,也可以對照著參考。 關於「fcitx-remote」的用法,也可以參考「[/usr/bin/fcitx-autostart](https://github.com/fcitx/fcitx/blob/4.2.9.6/data/script/fcitx-autostart)」這個「Shell Script」。 ================================================================================ 如何透過指令設定「IMList」的方式我研究出來了, 目前研究出來的是透過「[gdbus](http://manpages.ubuntu.com/manpages/bionic/en/man1/gdbus.1.html)」這個指令,這個指令是來自於「[libglib2.0-bin](https://packages.ubuntu.com/bionic/libglib2.0-bin)」這個套件 [執行範例](https://github.com/samwhelp/play-ubuntu-18.04-plan/blob/master/issue/fcitx/dbus-command/IMList/IMList_Property_Set-gdbus.sh)如下...
補充一點,只要在fcitx尚未執行的情況下,修改「$HOME/.config/fcitx/profile」, 將「EnabledIMList」那一行修改如下 ``` EnabledIMList=fcitx-keyboard-us:True ``` 完整的「profile」可以參考「[這裡](https://github.com/samwhelp/play-ubuntu-18.04-plan/blob/master/issue/fcitx-chewing/install-fcitx-profile/profile#L17)」, 上面的修改完後,當「fcitx」啟動後,就會自動附加「chewing:True」和「cangjie5:True」 ``` sh EnabledIMList=fcitx-keyboard-us:True,chewing:True,cangjie5:True ``` 後面還有一長串附加的,我就不貼了。 注意:修改「profile」這個方式其實只要修改一次就行了,不需要每次登入都做這個動作。 因為剛剛有看到一篇「[文章](https://hexo.cowbay.org/2018/10/09/autostart-fcitx-and-enable-chewing/)」,猜測是您寫的紀錄。 提供另一個參考文章 https://blog.gtwang.org/linux/linux-useradd-command-tutorial-examples/ 供您參考,也許您有新的靈感,如何創造新的使用者。 ================================================================================ 至於您說的下面指令沒有作用, 我猜測您再執行下面的指令的時候,「fcitx」應該是在還沒有執行的狀態下,所以才沒有作用。 ``` sh $ gdbus call --session --dest org.fcitx.Fcitx --object-path /inputmethod...
一直要補充,一直忘了,剛又逛到這個頁面,就來補充下面的概念 有一種方式,就是在「[/etc/skel](https://github.com/samwhelp/system-modeling/tree/main/profile/main/overlay/etc/skel)」,放置您的設定檔, 當您創建新帳號的時候,有機制會將「/etc/skel」的檔案,複製到「該使用者」的「家目錄」。 這應該可以符合您原本想要的需求。