Search Unity

[GUIDE] How to use Monodevelop as default IDE under Ubuntu

Discussion in 'Linux' started by Nanity, Nov 10, 2016.

  1. Nanity

    Nanity

    Joined:
    Jul 6, 2012
    Posts:
    148
    I couldn't select the Unity version of MD as default in the "Open with..." dialog to open C# files. The MD version from the repos is unusable as well, because it does not accept a file parameter (%F) while opening.

    Three possible fixes:
    • The Ubuntu packaging team could compile the stock MD with other settings, so that it is actually usable.
    • The Unity Editor Linux team fixes the /usr/share/applications/unity-monodevelop.desktop in a way that the application shows up under the "Open with..." dialog. I did not succeed to fix this myself.
    • Create a user file under ~/.local/share/applications/unity-monodevelop.desktop with the following content:
    Code (Gnome):
    1. [Desktop Entry]
    2. Version=0.0.0f0
    3. Name=MonoDevelop (Unity)
    4. Exec=/opt/Unity/MonoDevelop/bin/monodevelop %F
    5. Icon=unity-monodevelop
    6. Terminal=false
    7. Type=Application
    8. MimeType=text/x-csharp;application/x-mds;application/x-mdp;application/x-cmbx;application/x-prjx;application/x-csproj;application/x-vbproj;application/x-sln;application/x-aspx;text/xml;application/xhtml+xml;text/html;text/plain;
    9. Categories=Development;IDE;Application;
    Notes:
    • The file permissions should be set to executable.
    • The paramteres "Exec", "Type" and "MimeType" parameters are the most crucial ones.
    • Exec requires the %F placeholder
    • MimeType is 1:1 copy of the default repo monodevelop.desktop

    The download sizes could be decreased if Unity used the default MD installation, are there any major reasons why this isn't the case?
     
    Last edited: Nov 10, 2016
  2. Deleted User

    Deleted User

    Guest

    Hi,

    I'd like to make use of your guide but I don't understand what to do. Could you please explain further this part of it:

    Thank you! :)
     
  3. Nanity

    Nanity

    Joined:
    Jul 6, 2012
    Posts:
    148
    Do you want to know how to create the text file or do you want the content to be explained?

    Creating the file is easy. Just run this, paste the code from above and press save. Does not require special rights.
    Code (Bash):
    1. gedit ~/.local/share/applications/unity-monodevelop.desktop
     
    Deleted User likes this.