How to install Mono on Linux Mint

I'm using the excellent password manager KeePass version 2.x on Windows to manage all my accounts and information. When I checked the Linux download page, I noticed that only KeePass 1.x was available for Linux which was a problem as the key file that I used could not be loaded in that version.

The developer of KeePass suggested to use Mono to run KeePass 2.x and so my journey began to install Mono on Linux Mint.

My first stop was the installation instructions page on the Mono website. It displays information for various Linux flavors including Ubuntu, Debian and derivatives.

First thing to do was get the Mono Project GPG signing key and the package repository which has to be done from the Terminal interface.

You can launch a Terminal window from the quick launch area or by opening menu first and selecting Terminal from it.

Run the following commands one after the other:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update

The next thing you need to do after running the commands above is to install the mono-complete package.

synaptic

Here is how you do that:

  1. Open the Menu, search for Synaptic and open the Synaptic Package Manager afterwards.
  2. Once it has been loaded, search for mono-complete.
  3. You should get one result only.
  4. Right-click on it and select mark for installation.
  5. Once done, click on apply to run the installation on your system.
  6. You will receive a prompt detailing all changes that the installation will make to the system and files in the process. Click apply to proceed with the installation.
  7. If everything goes well, Mono should be installed in the end on your system.

Since I wanted to run the Windows program KeePass 2.x on Linux Mint, I used it to test if Mono was working properly on the system.

mono complete

I downloaded and extracted the latest portable KeePass 2.x version from the official website and opened the folder afterwards on the system. A right-click inside the folder allowed me to open a terminal there.

All that was left to do was run mono KeePass.exe to see if it works. What can I say, it did.

Tip: One issue that I ran into when executing the command was that I typed only lower case characters which resulted in a not found error. I remembered that case was important on Linux and used uppercase characters where needed.

Now that KeePass is running, I can try and get other Windows programs to run on Linux as well. I'm not sure how well that will work if at all, but I'll report my findings here on this site.

Summary
Article Name
How to install Mono on Linux Mint
Description
Find out how to install Mono on Linux Mint to run Windows programs on your Linux system.
Author
Please share this article

Facebooktwittergoogle_plusredditlinkedinmail



Responses to How to install Mono on Linux Mint

  1. Sven March 28, 2015 at 12:29 pm #

    You are on Mint? Why didn't you try the PPa
    https://launchpad.net/~jtaylor/+archive/ubuntu/keepass

    As for Mono, isn't it in the repo? Usually, when installing an app that requires Mono your package manager will install it automagically.

    • Martin Brinkmann March 28, 2015 at 1:09 pm #

      I checked the official KeePass site and it suggested Mono so that is what I did. I followed the installation guide on the Mono website as well, there are probably other ways to do that but it worked for me and that's fine right now.

      • Sven March 28, 2015 at 1:36 pm #

        Sure, speaking Perl there is always Tim Toady, but some are easier and more comfortable :)

        On Linux always check your distros Repo first, it should at least offer you KeyPass 2.25 (that's what is in the official Ubuntu Repo for Trusty which is the mother distro of Mint, so I doubt that Mint offers you something older) it's not the latest version but should be functional. Same for Mono, it should be available through official repos. If you want something newer search for a PPA, that one is linked on KeyPass download site under unofficial Packages for Ubuntu, but on Mint you can use about everything that works for Ubuntu.

        People always expect Linux ways to be complicated but often they are not.

      • Martin Brinkmann March 28, 2015 at 1:44 pm #

        Sven thanks, I'm only getting used to this and I'm sure it will take a while until I discover best practices for stuff :)

  2. Dan March 28, 2015 at 3:03 pm #

    That's odd, I found keepass2 in Synaptic, and I didn't have to add a PPA. It's been awhile so I don't know if it included Mono when I installed it.

    • Joseph March 28, 2015 at 3:40 pm #

      I am using MInt KDE and keepass2 is definately in Synaptic which is the same pacakge manger accross Mint distros

    • Anonymous March 28, 2015 at 4:10 pm #

      Yeah, KeePass2 (2.25 on Trusty, so Rebecca should have the same cause they use the same sources) is available via repo in Synaptic. Only the latest version of KeePass2 (2.8) needs to be installed via PPA. It will not include Mono but will install the required Mono dependencies if they are not present on your system already..

      Linux-verse language explanation:
      Trusty: Ubuntu 14.04 LTS "Trusty Tahr"
      Rebecca: Linux Mint 17.1 "Rebecca" (based on Trusty)
      Synaptic: a Package Manager
      Mono: that's .NET in Open Source and platform-independent

  3. theMike March 28, 2015 at 3:14 pm #

    Linux users like to throw around Linux-verse language and many people give up on Linux because of it.

    PPA stands for personal package archives. It allows us to install the latest version of any software in Linux Mint or Ubuntu from launchpad by adding to repository.

    A repository is a collection of software for a linux distribution.

    • DonGateley March 28, 2015 at 6:43 pm #

      Thank you, theMike. You seem to know how much that is appreciated.

      • theMike March 29, 2015 at 3:01 am #

        Don I see it in the forums a lot. A first time user (fck the word newbie) asks a question and the Linuxsteins answer is to run 50 lines of code in the terminal then type in a few lines of korean backwards add the dashes and switch your time zone over to match your mother blood alcohol content and it should work. The firstimer asks what the terminal is and you're all the sudden not worth their time.
        Kind of like a typical neowin thread except without all the whining and childish insults

  4. EasyPeasy March 28, 2015 at 5:57 pm #

    Step 1. Open Software Manager (does the same thing as synaptic in a newbie friendly way) from menu.
    Step 2. Search for Keepass2
    Step 3. Click Install button

    It automatically finds and installs all the mono bits and pieces you need along with it. Haven't used the software myself to see if it works but that seems to be all you need to do. Forget external websites, signing kees, terminals and PPAs.

    • harryg June 29, 2015 at 7:45 pm #

      Sorry, no keypass in SW manager or synaptic. I'm running Linux Mint Cinnamon 17 32-bit. I have to install mono because irfanview won't install under wine (can't find mfc42.dll and one other error which I forget). Even if I copy a good version of the .dll into the wine /windows/system32 folder, I still get the not found error. But that's another story.

      We'll see what happens with mono. I run several windoze apps (all legal copies): Word 97 (because I have a ton of macros that I don't wish to re-write in LibreOffice's experimental macro language), heidisql (which is a tad easier and more convenient than phpmyadmin), and of course, irfanview.

      I also run Word97 in VirtualBox, where I also run the other winapps I need. It's just a hassle to keep switching in and out of the virtual system.

      -harry

  5. Karl March 28, 2015 at 6:33 pm #

    Martin, lots of devs will give you the repositories to install from. In terminal, you'll typically use:
    sudo add-apt-repository then sudo apt-get update then sudo apt-get install . Repositories also serve the function of feeding your updater program updates. Another way to install, besides the Synaptic interface, is an app called App Grid. I use it a lot. It offers a lot of programs to install.

    Here's a list of maintenance programs to help you clean your kernel - I usually run them before I shut down or as needed):
    Bleachbit (like CCleaner)
    Ubuntu Tweak (especially janitor mode - After uninstalling with sudo apt-get remove , it basically takes care of following up with sudo apt-get purge/autoremove/autoclean.
    Winidows Killer (part of Cairo Dock - IMHO, the best dock) - an icon on the dock to click on to then click on a frozen app window. Serves the purpose of typing "xkill" in the start --> search box.
    Aptik for doing super system backups!
    TimeShift - resembles Windows' system restore.
    Gparted for partitioning or checking partitions.
    Grub Customizer - allows you to customize Linux's dual-boot menu! Very good program!

    If you need any other apps for different activities, let me know, Martin! I'll be happy to help you!

    • Martin Brinkmann March 28, 2015 at 10:50 pm #

      Thanks Karl, I'll definitely get into that and will ask you if I need anything in particular.

  6. Joseph March 28, 2015 at 6:41 pm #

    The link below is the 'Easy Linux Tips Project' to help you get on your way. Hope it helps.

    Cheers!
    https://sites.google.com/site/easylinuxtipsproject/

    • Martin Brinkmann March 28, 2015 at 10:49 pm #

      Thanks Joseph, I will check it out ;)

    • NiHouMa April 3, 2015 at 8:19 pm #

      The link mentioned by Joseph is very good aspecial for Linux newbies. It's written by Pjotr and he has a Twitter account; @linuxtip

  7. hugh March 28, 2015 at 9:47 pm #

    Hi Martin,

    What desktop flavour of Mint did you install?
    Cinnamon? MATE? KDE? Xfce?

    The Desktop chosen often affects the way that help/advice is given any queries you have.
    In general you should stick to the official way of installing alien programs from outside the repos.
    Installing an application that doesn't appear in a distros repositories can sometimes break the installation.
    It is a trivial matter to re-install for a seasoned linuxer - better to avoid having to do that at all, as it is time consuming.

    Best wishes,

    Hugh

    • Martin Brinkmann March 28, 2015 at 10:49 pm #

      Thank Hugh, I'm still learning and if the installation breaks, I just re-install it completely, no big deal at this point.

      • theMike March 29, 2015 at 1:56 am #

        it'll break a lot, don't get discouraged. at least reinstalling and updating linux takes less than an hour compared to windows that can take a weekend.

      • Sven March 29, 2015 at 1:06 pm #

        Linux will only break, if you break it. That usually happens, when people are messing around with elevated user rights without having the slightest idea what they are doing. And many things are fixable if you know how but if people don't even know what they did it's hard to search for solutions. That sure can happen, once, if it happens more than once, you didn't learn the lesson.

        Also the use of any "advanced system tools" (often known in similar form from Windows) is highly NOT recommended, in particular not to beginners. They can cause serious damage if you don't know what you are doing And if you know what you are doing you can pretty often get along without them.

      • theMike March 29, 2015 at 3:27 pm #

        Martin, see Sven's response? This is typical of the Linux forums and who people usually just give up on it.

  8. mikef90000 March 28, 2015 at 10:37 pm #

    Hello Martin and welcome to Linux Mint!
    An alternative way to install software from the repositories is to use the Software Manager. SM provides a higher level 'application' view rather than just packages as Synaptic does; it is more suitable for users new to Linux.
    Searching in SM gave me both keepass2 and keepassx, the latter being a build that does not require Mono.
    TTFN, Mike

    • Martin Brinkmann March 28, 2015 at 10:47 pm #

      Thanks Mike, I will check that out.

      • theMike March 29, 2015 at 3:08 am #

        noobslab is a good place to read about and find new updates

        http://www.noobslab.com/

      • interstellar March 29, 2015 at 5:45 am #

        Martin,
        .... follow mikef90000's advice, (see above),
        Just use
        the Software Manager in Linux Mint!

        It's simple & quick!
        And it just works...

    • DonGateley March 29, 2015 at 6:06 am #

      Does that only work for Linux Mint or can Software Manage be used generally on other distributions?

      • interstellar March 30, 2015 at 2:29 am #

        Don,

        Yes, other Linux distributions
        also have "Software Mgrs",
        (sometimes under a different name).

        For ex:
        ---------
        my Ubuntu Linux calls it:
        "Ubuntu Software Center".

        It's really secure & easy to install/uninstall software,
        ....even fun!

        Check it out:
        https://apps.ubuntu.com/cat/
        "Ubuntu Software Center lets you browse and install thousands of free and paid applications available for Ubuntu. You can view available software by category, ...etc".

      • mikef90000 March 30, 2015 at 4:49 am #

        The LM Software Manager may be derived from the similar Ubuntu Software Centre. IIRC the Ubuntu SC was ported upstream to Debian. Most Debian desktop oriented distros have an SC, not sure about Fedora, OpenSuse, etc.

      • DonGateley March 30, 2015 at 8:34 am #

        Thanks for the answers. I'm sure there are user friendly installers for each platform. What I was looking for was one that I could get comfortable with and install it on any distribution I might want to use in the future. A generic, agnostic Software Manager, so to speak.

      • Sven March 31, 2015 at 11:06 am #

        "What I was looking for was one that I could get comfortable with and install it on any distribution I might want to use in the future."

        That will most likely not exist because some systems will always be different which is the nature of Linux. With Synaptic you have a Package Manager that can at least deal with deb and rpm packages and by that cover a large variety of different distros based on Debian/Ubuntu and Red Heat/Fedora or OpenSUSE. I don't know about others that have this feature but it might be possible, deb and rpm are different but not that different.

        But then the drawback is that it is a GTK+ application so bad for desktops not based on GTK at all (like KDE) should run but will have a lot of dependencies.

    • Dan March 29, 2015 at 12:40 pm #

      The developer of Keepass2 does not like the security of KeepassX, specifically its low default iteration count for stretching the encryption key. Keepass2 strongly encourage the "1 second delay" test to determine the iteration count (in modern Intel processors with AES-NI, it could be over a million).

      Also, I haven't tested KeepassX in a long long time, does it support KDBX/2.xx databases?

      • NiHouMa April 3, 2015 at 8:26 pm #

        KeePassX does not support the KeePass 2.x (.kdbx) password database format currently.
        However, you can create an export in KeePass 1.x database format (.kdb) from KeePass 2.x,
        which KeePassX can read (and use as the native password database).

      • Thrawn April 23, 2015 at 2:49 am #

        KeepassX comes with a configurable iteration count (in fact, it's the only option in Database Settings) with a button for determining the 1-second delay. I don't see the problem?

Leave a Reply