Thursday, August 20, 2015

Eclipse rendering issues on Fedora 22 Mate

Mate is your best mate in VM Fedora

I've learned the hard way that using modern, 3D-accelerated, effects-blazing desktop environments inside VirtualBox Linux guests is not something one could hope to result in any semblance of speed. I cannot help but wonder if that is a very unusual use-case, because is seldom covered by any of the mandatory Linux news articles praising the latest iteration of Gnome3, KDE5 or even Cinnamon. Anyway, when I decided to try out the latest Fedora, I was happy to notice the official Mate spin is available for download. As the blurb on the linked page says, Mate aims at high productivity and performance (and aging, nostalgic, GTK2 crowd), although you can switch to the built-in Compiz window manager to get some bling from it. I would stick to the default, simple, but very usable and fast, Marco window manager. Even with Virtual Box's haphazard support for graphics acceleration in Linux guests, it would work nicely on my trusty i5.
Things went well, Fedora 22 Mate was installed and fully updated inside the bleeding edge Virtual Box (5.0.2), together with guest additions. The Fedora graphical installer still makes no sense whatsoever, unless you were born on a planet where GUI designers always had key confirmation buttons like Ok and Done tucked away in top corners of their forms, but at least it worked ok with all-default settings. Installing Fedora without having to analyze the latest rage in its default partitioning scheme is a major benefit of using a virtual machine. Had this been a bare metal, or, even worse, a not-so-bare metal (i.e. with some OSes already installed on it) installation, I'd have spent much more time on research. I still remember the time when Fedora 2 happily munched up the MBR of my work PC when I was trying to set up a dual-boot with Windows.

So far, so good. The desktop was fast and responsive, and, after the Virtual Box guest additions were added, resized properly on the fly, together with the VM window. I wanted to do some C/C++ development, so after pulling in and compiling some stuff in command line, I decided to install Eclipse. Now that is one package I cannot help but have love-hate relationship with. On the one hand, it is hugely powerful, with plugins supporting many programming languages and code sharing and maintenance aspects, flexible remote execution and debugging, etc. It was adopted and adapted for use by many commercial vendors (see, for example, this one). In a lot of ways it is a de-facto standard, especially in the field of cross-platform IDEs. On the other hand, it is sometimes insanely slow, difficult to properly configure, subject to arbitrary vanishing of previously working plugins, can bleed memory like a stuck pig (and lasts about as much, when it happens) and is frustratingly prone to errors in configuration files caused by improper shutdowns. I guess that with great power comes great respons... quirkiness and this is where virtual machines come into play. Once you set up Eclipse (and the rest of the development environment) just the way you like it, you can make a copy of the VM and share it with other developers, knowing that it will work on their boxes without much/any additional begging and hair-tearing.

..or is it?

Fedora 22 comes with Eclipse 4.5 (Mars), a brand new edition that I have never used until now. Much to my dismay, I have discovered that it now grows fur when massaged.
You can read that last sentence again, until it sinks in. I'll wait.
Still not convinced? Ok, let me illustrate the point: 

Furry fonts as featured in Eclipse 4.5 Mars on Fedora 22 Mate










Notice the blurry/bold fonts in Project Explorer and Outline windows, the the left and right? No, it's not a feature. Well, a furry feature perhaps. Here's the zoomed up version:

In all of their furry glory





To top it off, the fonts aren't like this (furry) when you start the application. It only happened when I scrolled up and down the Project Explorer window a few times. The more I scrolled, the.. furrier they got. Doing something that would repaint the window, like sizing or moving around, got rid of the effect temporarily.
At this point, the look on my face could have been, pretty accurately, described as o.O -- I am used to various idiosyncrasies of fresh Linux distributions, but I must admit that seeing text rendered and then re-rendered over itself with slight offset when scrolling through a common tree-view control is new. After a while, I sighed and resigned myself to watching the fleeting fun furry fonts until the next update hit. Surely, people have been complaining about this? Onwards and upwards! I went on to install a Mercurial version control plugin for Eclipse. Since it is not, apparently, in any of the official repositories, I would have to add it directly through Eclipse, and it turned out that Eclipse now has a cool new feature called the Marketplace to help with the, sometimes cumbersome, process of adding new plugins directly into Eclipse. The Marketplace, itself, is in the repositories, and it's called eclipse-mpc (really?), so one short command and a few prompts later:

dnf install eclipse-mpc

..we should be in business! Restarting Eclipse and going to Help/Eclipse Marketplace opens up a new marketplace window that promptly proceeds to pull newest plugin data from their servers... and then does nothing.

No plugins listed, not even a single furry font worth of them

Um, ok. Now this is frustrating. I've had my own share of problems with Eclipse accessing the web through firewalls and proxies, but I don't think this is one such case: it seemed to read the pages ok (a progress bar showed it downloading the info), and the old, manual ways of adding plugins still kinda works, even though it needs the Internet access too.
Thinking it might be a rendering issue (again), since it was clearly broken in this version after all, I went to google spree, which rewarded me with this gem. Apparently, people were having similar issues (but not completely the same, check out the gallery of attachments to that bug report for extra hilarity) for more than a year. Now, nowhere does it mention the Mate desktop environment, but the workaround proposed in comment #21 suddenly made a lot of sense. It proposed adding an obscure Eclipse startup setting in eclipse.ini file (located at /usr/lib64/eclipse/eclipse.ini on 64-bit Fedora 22) which apparently forces the use of GTK version 2 by the launcher:

--launcher.GTK_version
2
 
Mate is GTK2-based, with GTK3 support still experimental, which is why that rang a bell. Honestly, I have no idea if this is definitely related to the choice of Mate as a desktop environment, and I'm not installing Gnome3 desktop, just to see if the case could be repeated there, too. Having said that, I figure people would actually report this a lot, if it were happening in the default Fedora 22 Workstation setup, which uses Gnome3. It also has something to do with the version of Eclipse, since people that did complain about it in that bugzilla thread mentioned that it came about after upgrading to Eclipse Mars 4.5 It might be that Mars simply changed the default for GTK version from 2 to 3, and it broke some setups.
The workaround helped in my case, both with the furry fonts (or lack thereof), and the Marketplace finally shone in all of its glory:

Now with actual items!




 

No comments:

Post a Comment