Dolphin 右鍵選單

產生資料夾「~/.kde/share/kde4/services/ServiceMenus/」

執行

$ mkdir ~/.kde/share/kde4/services/ServiceMenus/ -p

切換資料夾「~/.kde/share/kde4/services/ServiceMenus/」

執行

$ cd ~/.kde/share/kde4/services/ServiceMenus/

建立檔案「~/.kde/share/kde4/services/ServiceMenus/atom.desktop」

執行

$ vi atom.desktop

填入下面的「內容」。

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Actions=OpenWithAtom;
X-KDE-Priority=TopLevel

[Desktop Action OpenWithAtom]
Name=Open with Atom
Icon=atom
Exec=atom %F

寫成「Shell Script」

上面的步驟可以簡單的寫成下面的「Shell Script」。

#!/bin/sh

Service_Dir=~/.kde/share/kde4/services/ServiceMenus/
mkdir $Service_Dir -p
cd $Service_Dir
wget -c https://foreachsam.github.io/book-editor-atom/book/resource/integration/atom.desktop

簡化步驟

所以只要執行下面這行指令,就可以完成上面的所有步驟了。

$ wget -qO- https://foreachsam.github.io/book-editor-atom/book/resource/integration/atom-install.sh | sh

或是

$ curl -o- https://foreachsam.github.io/book-editor-atom/book/resource/integration/atom-install.sh | sh

以上參考「nvm」的安裝指令。

或是

$ curl -sS https://foreachsam.github.io/book-editor-atom/book/resource/integration/atom-install.sh | sh

以上參考「composer」的安裝指令。