Register an AppImage as a desktop application in Linux

Refer: https://dev.to/tqbit/how-to-register-an-appimage-as-a-desktop-application-in-linux-31c7

The Scenario:

You have an .AppImage file and would like to treat it like an installed Linux app.

The solution:

Create a custom .desktop file

For this article, I'll use the following constraints:

  • Register the Electron.js app Marktext on an Ubuntu 20.04 distro
  • Use this icon from icon-library.com or some other place

Let's do it.

NOTE: You might have to use sudo commands to access files in the /bin and /use directories

  • Download the .AppImage file and an icon you would like to register it with
  • Move the .AppImage file to the path /bin, e.g. sudo mv ~/Downloads/Marktext.AppImage /bin/
  • Make it executable with sudo chmod +x /bin/Marktext.AppImage
  • Save the icon under /use/share/icons/custom/markdown.png e.g. sudo mkdir --parents /use/share/icons/custom && sudo mv ~/Downloads/markdown.png /use/share/icons/custom/
  • Create a .desktop file under ~/.local/share/applications/marktext.desktop
  • Paste the following content into it:
[Desktop Entry]
Name=Image Name                           # NAME YOUR IMAGE HERE
Comment=What this program does            # COMMENT ABOUT USAGE
Exec=/bin/marktext-x86_64.AppImage        # REPLACE WITH YOUR .AppImage
Terminal=false
Type=Application
Icon=/usr/share/icons/custom/markdown.png # REPLACE WITH YOUR ICON
Categories=Utility                        # SET THE CATEGORY, CAN HAVE MULTIPLE ENTIRES SEPARAGED BY ;
MimeType=text/markdown;                   # SET MimeType
Keywords=marktext;markdown;               # ADD SEARCHABLE KEYWORDS
StartupWMClass=filename.AppImage          # USE PROGRAM BINARY NAME HERE
Actions=NewWindow;

That should do it. Try pressing the Super key now and search for the app.

Ubuntu 22.04 Network Connection Has Question Mark Through it

Refer: https://www.ucartz.com/clients/index.php?rp=/knowledgebase/1406/Network-icon-shows-question-mark-in-Ubuntu-18.04.html

This Question Mark means the internal connectivity test fails and instead of a network icon, there is a question mark. Apparently, there are no network issues, but that question mark is annoying.

How to turn it off:
Go to Settings > Privacy > Connectivity Checking

Set it OFF. (Then, restart your WiFi connection)

Ubuntu Battery Saver TLP and Slimbook

Refer: https://ubuntuhandbook.org/index.php/2020/06/improve-battery-life-ubuntu-20-04-lts/
Refer: https://www.omgubuntu.co.uk/2021/10/slimbook-battery-4-released

How to Install TLP in Ubuntu 20.04

Simply open terminal either from application menu or by pressing Ctrl+Alt+T on keyboard. When terminal opens, run command:

sudo apt install tlp

Install Slimbook Battery from its official PPA

Run following commands in terminal one by one in terminal:

sudo add-apt-repository ppa:slimbook/slimbook
sudo apt update
sudo apt install slimbookbattery

Remove Slimbook and TLP

sudo add-apt-repository --remove ppa:slimbook/slimbook
sudo apt remove --autoremove slimbookbattery
sudo apt remove --autoremove tlp

Install VMWare Tools

From Ubuntu 20.04, need to reinstall from the terminal

sudo apt-get autoremove open-vm-tools
sudo apt-get autoremove open-vm-tools-desktop
sudo apet-get update
sudo apt-get install open-vm-tools
sudo apt-get install open-vm-tools-desktop
reboot

After the reboot copy/paste and drag/drop will work!

NOTE: If you are having troubles with the clipboard working between the host and guest, shut everything down, include the VMWare application and then restart everything.

Ubuntu 22.04

Note: You will need to be OFF the VPN

Refer: https://installati.one/ubuntu/22.04/open-vm-tools-dev/

Install open-vm-tools-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install open-vm-tools-dev using apt-get by running the following command:

sudo apt-get -y install open-vm-tools-dev

Install open-vm-tools-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install open-vm-tools-dev using apt by running the following command:

sudo apt -y install open-vm-tools-dev