How to create appimage software shortcut on linux

First of all, let me describe my environment. I like to play around, so I installed 3 operating systems on my computer, namely ubuntu22.04, opensuse 15.5, and manjora. I usually use them interchangeably. These three systems use separate root partitions / and /root partitions respectively, but mount the same data partition /u01 (store data files and software, etc.)

These three operating systems are all installed with software that I usually use, such as libreoffice, typora, etc.

Before, it was necessary to install the deb version of the software on ubuntu, the rpm version of the software on opensuse, and the binary version of the software on manjaro.

Later, I found that many linux software have appimage version, which can run without installation. For example, navicat, and some software can run as long as it is decompressed, such as idea.

So, I started to abandon the rpm/deb version and download the appimage and binary compressed package instead, so as long as the .desktop file is created in /usr/share/applications according to the format, there will be a corresponding icon in the start menu, just open it Execution, very convenient.

In this way, there is no need to install deb/rpm/binary packages for the 3 systems separately. You only need to write the script, install the operating system, run the script, and create .desktop for the software respectively.

Most of the .desktop files are similar, with only two main items, one is the path of the program, and the other is the icon of the program. In order to have the same effect as the rpm/deb installation, I refer to the content of the .desktop file generated by the rpm/deb installation, and extract the original icon from the appimage. Write down the creation script below for your reference.

Divided into three parts, namely libreoffice, appimage software, binary compression package software.

Other common appimage version software

The previous article described the shortcut creation of libreoffice appimage is relatively complicated, and the creation of shortcuts for appimage of these software is much simpler

The software needs to be downloaded to the path in the script first. For the icon, you can use 7zip to open the appimage, and find the path where the icon file is placed in the script. You can also find it online yourself, and then use image editing software to edit it to 512x512 or 256x256 or 128x128.

Both ubuntu22.04/opensuse 15.5/manjaro passed the test

#QQ
cat > /usr/share/applications/qq.desktop <<EOF
[Desktop Entry]
Name=QQ
Exec=/u01/3.software/3.crossplatfrom/linuxqq_3.1.1-11223_x86_64.AppImage
Terminal=false
Type=Application
Icon=/u01/baiduyun/Temporary/ico/qq.png
StartupWMClass=QQ
Categories=Network;
Comment=QQ
EOF

#百度网盘
cat > /usr/share/applications/baidunetdisk.desktop <<EOF
[Desktop Entry]
Name=baidunetdisk
Name[zh_CN]=百度网盘
Exec=/u01/3.software/3.crossplatfrom/baidunetdisk/baidunetdisk-4.14.5.x86_64.AppImage --no-sandbox %U
Terminal=false
Type=Application
Icon=/u01/baiduyun/Temporary/ico/baidunetdisk.png
StartupWMClass=baidunetdisk
Comment=百度网盘
Comment[zh_CN]=百度网盘
Comment[zh_TW]=百度网盘
MimeType=x-scheme-handler/baiduyunguanjia;
Categories=Network;
EOF

#navicat16
cat > /usr/share/applications/navicat.desktop <<EOF
[Desktop Entry]
Type=Application
Name=Navicat Premium 16
GenericName=Database Development Tool
Icon=/u01/baiduyun/Temporary/ico/navicat16.png
Exec=/u01/3.software/2.dbtools/navicat/navicat16-premium-en.AppImage
Categories=Development;
Keywords=database;sql;
EOF

#Another-Redis-Desktop-Manager
cat > /usr/share/applications/ardm.desktop <<EOF
[Desktop Entry]
Terminal=false
Type=Application
Name=Redis
Comment=Another Redis Desktop Manager
Exec=/u01/3.software/2.dbtools/Another-Redis-Desktop-Manager/Another-Redis-Desktop-Manager.1.5.9.AppImage
Icon=/u01/baiduyun/Temporary/ico/another-redis-desktop-manager.png
EOF

#marktext
cat > /usr/share/applications/marktext.desktop <<EOF
[Desktop Entry]
Name=MarkText
Exec=/u01/3.software/3.crossplatfrom/note/marktext-x86_64.AppImage --no-sandbox %U
Terminal=false
Type=Application
Icon=/u01/baiduyun/Temporary/ico/marktext.png
StartupWMClass=marktext
X-AppImage-Version=0.17.1
Keywords=marktext;
Comment=A simple and elegant open-source markdown editor that focused on speed and usability.
MimeType=text/markdown;
Categories=Office;TextEditor;Utility;
EOF

Guess you like

Origin blog.csdn.net/weixin_44496870/article/details/131698138