Bumping this, because I found a universal way to install Electrum as a desktop launcher, that works in all distributions and window managers.
The python bundle of Electrum you can download on electrum.org has a file inside it called
electrum.desktop. I have slightly edited this file to make it display an entry only for Electrum mainnet and testnet. The original file had a submenu for an entry that launches testnet, but I prefer to put the mainnet and testnet entries side by side.
electrum.desktop:
# If you want Electrum to appear in a Linux app launcher ("start menu"), install this by doing:
# sudo desktop-file-install electrum.desktop
[Desktop Entry]
Comment=Lightweight Bitcoin Client
Exec=sh -c "/home/ubuntu/Electrum-4.0.3/run_electrum %u"
GenericName[en_US]=Bitcoin Wallet
GenericName=Bitcoin Wallet
Icon=electrum
Name[en_US]=Electrum Bitcoin Wallet
Name=Electrum Bitcoin Wallet
Categories=Finance;Network;
StartupNotify=true
StartupWMClass=electrum
Terminal=false
Type=Application
MimeType=x-scheme-handler/bitcoin;
electrum_testnet.desktop (I created this):
# If you want Electrum to appear in a Linux app launcher ("start menu"), install this by doing:
# sudo desktop-file-install electrum_testnet.desktop
[Desktop Entry]
Comment=Lightweight Bitcoin Client (Testnet)
Exec=sh -c "/home/ubuntu/Electrum-4.0.3/run_electrum --testnet %u"
GenericName[en_US]=Bitcoin Wallet (Testnet)
GenericName=Bitcoin Wallet (Testnet)
Icon=electrum
Name[en_US]=Electrum Bitcoin Wallet (Testnet)
Name=Electrum Bitcoin Wallet (Testnet)
Categories=Finance;Network;
StartupNotify=true
StartupWMClass=electrum
Terminal=false
Type=Application
MimeType=x-scheme-handler/bitcoin;
Change the paths of /home/ubuntu/Electrum-4.0.3 in Exec directive to the path your Electrum installation is located.Save these two files. Now by runnning
desktop-file-install with each of these files, one at a time, you get two entries in your Applications menu, Activities, right-click context menu, top bar or however your desktop environment displays applications, one located in
Network > Electrum Bitcoin Wallet and
Network > Electrum Bitcoin Wallet (Testnet). Instead of Network it might also be located in the Finance category, it depends on the desktop environment.
I can easily make a desktop entry for regtest, but I'm not sure if you need to be able to pass arguments to it on the command line to make it work the way you want it to.