Add mono runtime to “Open With” menu in Ubuntu 14.04

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:
    [Desktop Entry]
    Version=1.0
    Encoding=UTF-8
    Name=Mono Runtime
    GenericName=.Net Runtime
    Comment=Execute .NET applications
    Exec=mono %F
    TryExec=mono
    Icon=monodevelop
    StartupNotify=true
    Terminal=false
    Type=Application
    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;
    Categories=GNOME;GTK;Development;IDE;
    X-GNOME-Bugzilla-Bugzilla=Ximian
    X-GNOME-Bugzilla-Product=Mono runtime
    X-GNOME-Bugzilla-OtherBinaries=mono

Now go to your executable, right-click it and see the mono runtime application option appear:

monoruntime

Advertisements

Make a Raspbian SD card for Raspberry Pi under Ubuntu, the easy way

Fast & easy way to setup the Raspbian OS for Raspberry PI.

  1.  Get a 4Gb or higher SD card
  2. Download Raspbian: here
  3. Insert your SD card in your Ubuntu 14.04 system and open the Disks tools (“schijven” in Dutch)

    Schermafdruk van 2014-07-19 20:17:54

  4. Select your SD Card, next go to the upper right corner and click the ‘More Actions’ button. Next select the ‘Restore Disk Image…” menu option.

    Schermafdruk van 2014-07-19 20:20:10

  5. The menu underneath appears, now select your downloaded image file (unzip it first if it’s zipped):

    Schermafdruk van 2014-07-19 20:20:39

  6. You can ignore the message that tells you that your disk image is smaller than the target device, upon first usage you’ll get the menu option to adjust the disk to the total size of the SD card. Press ‘Start restoring…’ and wait for the process to finish.

That’s it, enjoy your Raspbian Pi  setup!

Dell L502x Optimus support on Ubuntu 14.04

The Dell XPS L502x is a hybrid graphics portable from few years back (2011?). It came with Windows 7 by default and as we all know Optimus technology (switching between the low-end Intel HD3000 graphics engine and mid-end NVIDIA GeForce engine) is working more or less flawless on the Windows OS. On Linux however things have not been so great, users had to fiddle around with the Bumblebee package which eventually would or wouldn’t work, plus if you wanted to use the power profile one had to run the application by adding the ‘optirun’ command (ex: optirun glxspheres).

More recently NVIDIA has done some improvement on their behalf into supporting Optimus by deploying the nvidia-prime package. And as of Ubuntu 14.04 this is also available in the LTS release, however in my experience it was not working… Running the ‘nvidia-settings’ command gave me a “PRIME: is it supported? no”-message. So how did I fix it?

Well first open “Software & updates”, go to the last tab that is about hardware drivers and install the Nouveau display driver. Newt open a terminal and run following commands:

sudo apt-get purge bumblebee*
sudo apt-get purge nvidia-*

Now reboot. When you’re logged in again, open the same drivers tab of the “Software & updates” window you’ve opened previously, and now again install the NVIDIA binary driver (nvidia-331-updates). Afterwards check if all necessary packages have been uinstalled, so run following commands:

sudo apt-get install nvidia-settings
sudo apt-get install nvidia-prime

If all went well during the driver install running both these commands should not install any extra packages. Now reboot again. When logged again, run again ‘nvidia-settings’ in a terminal, now you should see the following message: “PRIME: is it supported? yes”.

Schermafdruk van 2014-04-30 12:21:30

One year with Ubuntu Linux

If we define a year by it being 365 days long, “one year with Ubuntu Linux” might actually be a lot closer to “one and half years with Ubuntu Linux”, or even “two years with Ubuntu Linux”. The fact is that I can hardly remember when exactly I did my last disk format and re-partitioning. Neither is there something as an exact date at which I switched from Windows to Linux, it was more like a very smooth transition in which I slowly became more used to using Ubuntu and actually started using it for daily use. In the end I don’t regret starting to use Ubuntu, in fact I still use it as my daily operating system. But is it than so much better than Windows? Well, maybe not, I presume it depends on who asks the question. But let me first tell you how I came thus far.

In Windows 7 era I was using the Microsoft OS for daily work.  On the dual partitioned disk there was also a very small partition of my disk which had Ubuntu (12.04?) installed on it but I used it only to try to know Linux a little bit better. Enter Windows 8, after trying Win8 in a virtual machine I wanted to get used to it and changed it in for Windows 7. However, me, as many others, I didn’t like the new way of working in Win8. I remember the first time wanting to shut down the system but not finding the power off button, big mistake Microsoft. And so Ubuntu came to get installed on a bigger partition, and I noticed more or less from this point that Ubuntu had a lot more desktop feel than Win8 had in the beginning. So, I starting using Ubuntu a lot more from this point. The downside of moving to Linux is that a lot of popular software does not have Linux compatible binaries and so the search for replacement software started. In the beginning I had to sometimes plan my work I wanted to do: do some of the stuff on Linux, and for the software that works only on Windows reboot and boot into Win8. But as you move on you get to know the Linux alternatives for Windows software, although not always as good as the real deal in many situations you can perfectly move along. Moving further in time I’m now at a point where it can take weeks or even months before I find myself back in the Windows environment. I no longer depend on it. So you may ask, was it worth all the trouble?

Well, as I said before, Ubuntu really has a nice desktop feeling. Quick launch icons on the left, perfect for not using to much vertical space on wide screens. A kind of start button that after you use it you can just type the name of the application and launch it. The software center allows you to easily install new software. Also my password is being asked which means not everyone is able to install new software on my machine even if I’m already logged in. Dragging a window to the side of the screen will also make it full screen, or half screen depending on which side you dragged it. Oh yes, and it’s free. Although many of these handy features listed here can also be found in the Microsoft OS, this means Ubuntu is not really poorer on the “useful desktop tricks” side of things. Furthermore it is really stable when it comes down to resuming from sleep and also installing updates hardly ever requires a reboot. Updates or always installed while you’re using the machine, it is doing this in the background and so you hardly notice it happening. Remember how it works on Win8, updates often take a lot of time when shutting down or rebooting the machine because MS just can’t update some processes while they’re running.

But there are also some drawbacks. First of all: hardware support. Although 2014 looks to be a very good year for desktop Linux, hardware drivers are not always working as good as their Microsoft alternatives are. For example, on my portable there is no way I can get the seconds display output working. Secondly, software: although there are free alternatives for Photoshop and Autocad, they do not always work as good as the real deal does. Even though I use GIMP every now and then, I’m still a lot more productive in Photoshop than I would be in GIMP. Third: games. Linux and gaming have not the best relationship. It’s only since the efforts made by Valve that now more and more A titles are being ported to Linux. As I said, 2014 might be the year of change for Linux. Quatro: using the terminal. The terminal itself is not so bad, still I can not believe it sometimes that for running some binaries I still need to open a terminal and run the ./whatever command. Or, you need to install something but it involves copying some commands found on the internet into the terminal and execute them before you can actually proceed. Why is it not always just click-and-play as it is with Windows?  Although this can sometimes get really annoying, it’s often not a Ubuntu thing. What can Canonical do about AMD not wanting to support some of their hardware for Linux users? Why would Adobe want to bring Linux compatible binaries of Photoshop if 99% of their users will probable still be on Windows/MAC? Often the lack of support is a commercial thing, so for 2015 I guess we don’t need to expect any miracles to happen as far as Linux support goes. On the other hand, since I first tried Ubuntu I can see slow progress everywhere and knowing that Ubuntu is already a very decent replacement for Windows I think I’ll stay a the Ubuntu side for another year. Maybe two.