- Write ~/.local/share/applications/xyz.desktop
- Run update-desktop-database
There are quite many websites how to write .desktop eg https://devicetests.com/add-custom-app-launchers-ubuntu-dock or https://fostips.com/add-app-start-menu-ubuntu-linux/ .
For example, in my case, I needed to have log files openable by less -R, hence I needed to do:
lessR.sh
cat <<EOM > ~/.local/share/applications/less-R.desktop
# Put to .local/share/applications/less-R.desktop
[Desktop Entry]
Name=less -R
Comment=less with ansi sequence interpreted
Exec=less -R %F
Type=Application
MimeType=text/plain;
Categories=Utility;
Terminal=true
EOM
update-desktop-database
It took 5 years to my issue resolved, by my own...
アプリケーションを追加する(ログファイルをダブルクリック時にless -R
で開けるようにする)