Considering donating if you found my post helpful 😊
When I was on Ubuntu 20-04, installing Mono would also create a right-click menu where I can run .exe with just mouse clicks. But somehow on Arch, there is none.
Notes
- If you are using root as user, you may omit sudo from commands.
- Use your favourite editor. Here I use nano.
- Configurations and icon used in this guide were taken from Ubuntu installation.
- I am using KDE Plasma desktop environment in this guide, but this tutorial should work on any DE.
Solution
There are multiple steps need to be done in order to achieve the goal.
Install Mono
If you haven’t installed Mono yet, you can run
$ sudo pacman -S mono
You can read ArchWiki if you are interested in the details.
Create required files
In order to get the menu, Mono must be registered as a desktop app. Ubuntu installation does this automatically, but not Arch.
Create first file, and paste the content provided below the command.
$ sudo nano /usr/share/applications/mono-runtime-common.desktop
[Desktop Entry] Name=Mono Runtime Exec=mono Terminal=false Type=Application Icon=mono-runtime-common MimeType=application/x-ms-dos-executable; NoDisplay=true
Create second file, also paste the content provided below the command
$ sudo nano /usr/share/applications/mono-runtime-terminal.desktop
[Desktop Entry] Name=Mono Runtime (Terminal) Exec=mono Terminal=true Type=Application Icon=mono-runtime-common MimeType=application/x-ms-dos-executable; NoDisplay=true
Install Mono icon
Without this, Mono in right-click menu would still appear but without an icon. To get a proper icon, download and install specified file to your system
$ sudo wget -O /usr/share/pixmaps/mono-runtime-common.png https://i.postimg.cc/VzbGHCZt/image.png?dl=1
Considering donating if you found my post helpful 😊