After installing the mono package and monodevelop IDE you may want to easily execute your mono executable. If you have wine installed, executables may be executed through Wine, or maybe Ubuntu is opening your application with some other sort default application like the file archiver… And then you right-click the application but mono is not in the “Open with” menu… Here is how we can add the mono runtime to the file right-click “Open with” menu!
- Navigate to /usr/share/applications. Create the monoRuntime.desktop file:
sudo touch monoRuntime.desktop
- Edit the file:
sudo vim monoRuntime.desktop
- Enter following content and save+exit vim:
Comment=Execute .NET applications
Now go to your executable, right-click it and see the mono runtime application option appear: