Skip to content
Print

One Wild Week with Ubuntu Linux

29
Oct
2007

As I mentioned in my last post, I managed to erase my hard drive and ruin my productivity for a week all in one fell swoop.  Since I didn’t have a Vista install disk handy, I had to make do with Ubuntu Linux for over a week while I waited for Microsoft to send me a replacement.  Obviously life doesn’t just pause and wait for my computer to catch up, so I was literally forced to use Linux on a daily basis for exactly the same things that I would normally use Windows.  This gave me quite a unique opportunity: A chance to test out an alternate OS under identical circumstances to its competitor.

Compiz

The first thing on my list to try was enabling Compiz.  Yes, I know it’s mostly eye-candy, but there’s also some very useful stuff in there.  3D compositing is extremely useful in a WS if for no other reason than the UI always feels sprightly and responsive, rather than a constant frustrating shade of low-performance.  For example, if you drag a window in vanilla Gnome, there’s repaint lag.  Imperceptible though it may be on most modern systems, it’s still there.  If you drag a Window with Compiz enabled, the lag virtually goes away.  Also, if a window stops responding, Compiz drops its color saturation (similar to Vista’s white overlay), whereas on a non-composited WS, the app would just freeze and stop painting.  Other Compiz treats like subtle shadows (which really help the eye to differentiate windows quickly), a slicker workspace switcher and a really nice expose clone all combine to produce a very competitive environment for those of us coming from the likes of Vista and Leopard.

The downside is it’s very difficult to get working.  As with all things Linux: if you want it done right, you have to do it yourself.  Actually, with Linux it’s more like: If you want it done, you have to do it yourself without documentation.  One of Ubuntu Gutsy Gibbon’s big selling points is that it’s so easy to get working out of the box.  One of the hot new features being pushed by Canonical is that Compiz is now enabled by default on installations.  This is supposed to mean that you don’t have to do anything to get it working.  Unfortunately, it didn’t work out of the box for me (I have an ATI video card).  The error message I got when trying to configure the “Desktop Effects” was utterly unhelpful, and I had to actually figure out for myself that I needed to manually install xserver-xgl (no documentation, no “helpful hints”, nothing).  Even then, it still took a manual kick-in-the-pants to actually get Compiz running for the first time.  And even then things still weren’t a hundred percent.  Setting changes took a logout/login to apply (without any notice).  Key combos conflicted and didn’t work half the time.  All in all, it was a mess.

The second thing was to try to get Eclipse, jEdit and gnome-terminal into a usable state so that I could actually do real work with them.  Fortunately, gnome-terminal is quite amenable to the effort.  I daresay it’s probably the most polished app on the whole OS; everyone should be using it!  So 30 seconds after I opened up gnome-terminal for the first time, I had disabled that oh-so-annoying terminal bell, set the colors to something a bit easier on the eyes and appended ~/.bin to my PATH.  I figured the next easiest would probably be Eclipse.  After all, Linux GTK is supposed to be SWT’s second most stable WS, and Eclipse itself has been running on Linux practically from version 1.0.  Unfortunately, it wasn’t quite so simple…

Eclipse

Oh I didn’t have any real trouble getting Eclipse to start on my Linux system, but starting was about all it could do for a while.  For one thing, it took me nearly three hours to get all of the Europa plugins I use installed again.  Granted, it might have something to do with the major fall release coinciding with the day I was trying to configure my setup, but OSU’s servers are faster than that.  I’m guessing there was something weird going on within the update manager that doesn’t normally happen on Windows (it usually takes me about 10 minutes to configure a fresh Eclipse install).  Once I had gotten everything installed, I tried to open up my old workspaces.  It was about this point that I started to run into trouble.

Everyone should know better than to try to open up a workspace from another system unmodified on a completely different one; especially when crossing OSes.  That’s not to say that I haven’t successfully performed such a procedure in the past, but I didn’t want to take any chances with another three hour wait.  I did the “right thing” and deleted the .metadata directory and open the workspace afresh.  First thing, I used the handy “Import Preferences” wizard to grab all of my saved syntax highlighting, font sizes and classpath variables from a previously exported .epf file.  I sucked the preferences into my workspace, looked around, and everything seemed dandy. 

At least, it did until I hit the “User Libraries” preference pane.  Here, Eclipse gave me an error (something about absolute paths and IClasspath) and refused to show the pane.  This was a situation where something was wrong with the underlying preference for the user libraries and Eclipse wasn’t even allowing me to dig in and fix it!  After messing around with the internal structure of the .metadata directory for an hour or so, trying to erase just that particular preference set, I gave up in disgust, deleted the .metadata directory and started again.

This time, I ran the .epf file through sed (one of the many advantages of once again having a Linux shell at my disposal) and got rid of all the “C:” instances throughout the file.  Eclipse seemed to like this a lot better, and actually deigned to show me the preference pane this time, without the annoying error.  I was able to change all of the paths for the libraries, and once again things compiled nicely.

Unfortunately, not every user is going to have the know-how to do what I did.  I hate to sound immodest, but I do have a bit more Eclipse experience than the average Joe trying to switch his environment from Windows to Linux (a common occurrence these days).  If a problem arising from a common operation leaves me scratching my head for over an hour, it’s probably something which should be addressed.  This sort of complete blocker of a problem which necessitates manual hacking of auto-generated files is really a big no-no.  I may have gotten it working in the end, but the point is that it wasn’t easy.  All it happened to be was yet another source of stress to load onto my already bursting plyurethane sphere.

Tools and the Environment

Ironically, configuring jEdit was a walk in the park, especially compared to Eclipse.  All I needed to do was download the .deb package from jedit.org, provide my user password, copy over my modified JAR (some things just can’t be fixed in the preferences) and away I went.  Ten minutes later I had all my favorite plugins installed and I was developing with pleasure random bash scripts on remote servers.  It still took a little Linux foo to get the warm start working, but compared to what I had been through with the Eclipse setup, it was a walk in the park.

After this, there were no more “big things” to get setup.  I had more-or-less everything I needed to be productive once more, so I turned my attention to the smaller things (yes, I do count 3D compisiting as a “big thing”).  My first task was to disable the track pad and enable center button scrolling on my ThinkPad.  As it turns out, center button scrolling is as easy as telling xserver to emulate a 3-button mouse.  Unfortunately, it seems that disabling the track pad was a bit more complex.  I discovered (to my surprise) that there is actually no way to do this in Linux itself.  I had to go into the BIOS and completely deactivate the device, just to keep it from randomly firing when I brushed it with my palm.

Here I also started to look into things like fonts.  Unfortunately, even installing the Windows fonts package didn’t improve the situation.  Linux has an excellent renderer if all you want to display is Monospace 10pt (which it renders quite nicely), but anything else looks terrible at low sizes and “not quite relaxing” when larger.  Unfortunately, fonts are like the wind: sometimes pleasant, sometimes annoying as hell, always unfixable. 

So I decided to set my sights on a more attainable goal and focused on the mouse acceleration curve.  Windows Vista has a very nice feature which adaptively adjusts the mouse curve based on speed, making the mouse more precise at low speeds and more responsive at high speeds.  This leads to a general feeling of greater ease in mousing.  You don’t really notice what a difference this makes until you try to wrestle the mouse from point A to point B on a system which doesn’t have such a nice curvature.

Anyway, adjusting the mouse curve seems like a pretty normal thing to want to do, right?  Linux is supposed to be an incredibly configurable operating system, so I figured I shouldn’t have a problem.  Well as it turns out, there is no way to do this in xserver.  I couldn’t find any tool, any how-to anywhere which gave instruction on how to rectify this glaring lack of control.  After wasting quite a bit of time Googling around and browsing “man xorg.conf”, I threw in the towel and decided to put up with the sore mouse-finger for a week.

Conclusion

Linux is great.  (what, not the conclusion you were expecting?)  I absolutely love Linux’s terminal, startup times (roughly 3x faster than Vista) and file systems (with ReiserFS managing /home, my perceived FS speeds were in the range of 2x better than NTFS on the same drive).  Unfortunately, Linux just doesn’t have what it takes to be a desktop operating system for the average user.  What I mean by this is it just takes too much manual tweaking and fussing to get things to work right.  As a developer, I may have the ability to fix little glitches that arise in my environment, but that doesn’t mean I have the time or inclination.  I want something that works…now; and I don’t want to lose hair over whether or not the graphical environment is even going to start on the next boot.  I guess it’s back to Vista for me!  *sigh*

Comments

  1. Acutally, the biggest problem I have with Eclipse on Linux is GTK. The spaces between list items are HUGE. Even on a higher resolution, I got about 25% less items on screen than on XP. Only after some very careful tweaking in ~/.gtkrc (and of course, hours of researching it on the net so gnome wouldn’t crash on me) was I able to reduce the gap to about 8 pixels, which is still outrageous, especially on a screen-estate hungry application as Eclipse.

    Kim Sullivan Monday, October 29, 2007 at 8:31 am
  2. Very insightful! I’ve noticed things like that throughout the Gnome/GTK+ layout, but they’re difficult to define, so I didn’t bother ranting about “imagining wasted space”. Given that Linux is probably most used on the desktop by developer-type people, I would think that more time would be devoted to optimizing screen-space.

    Daniel Spiewak Monday, October 29, 2007 at 10:13 am
  3. @Kim Sullivan, do you mind sharing your ~/.gtkrc tweaks? This wasted space annoys me as hell…

    Daniel Serodio Monday, October 29, 2007 at 10:59 am
  4. What a pitty ;-) (would you have expected another comment from a linux enthusiast? :-)
    Interesting to read the linux story from the other side of the trenches ;-) I Usually I have eclipse & Windows when I’m on a contract and Linux & Eclipse @ home. I do not experience the troubles you had but it might be that I’m already used to it and do not notice any more. The largest unsolved problem I had was to transfer projects under subversion control from one OS to the other. Almost impossible ‘en bloc’ without dopping svn-directories…

    Hope you’ll get back to linux some time :-)

    André Dietisheim Monday, October 29, 2007 at 12:07 pm
  5. Daniel,
    Could you share your recipe for getting compiz working on an ATI card?

    I’m using Ubuntu myself, and though I haven’t had any problems with Eclipse (or RSA), I’ve tried any number of times to get the 3D desktop on my T60 to no avail.

    Kim: totally agree with the spacing issues on GTK. The usual response I get for the complaint is that it’s not GTK, it’s the theme. Hard to find a skinny and pretty theme I guess.

    Todd

    Todd Chambery Monday, October 29, 2007 at 1:24 pm
  6. I don’t have Linux up anymore (back to Vista), but IIRC this is what I had to do:

    sudo apt-get install xserver-xgl
    sudo shutdown -r now
    < >
    compiz &

    Now you should be able to mess with the “Desktop Effects” preference and change what you want to see. I would also recommend that you install the Compiz Manager tool (can’t remember if that’s the actual name). This will add another preference pane entitled “Advanced Effects”, which you can then use to tune how you want Compiz to behave. Note that none of the changes to these settings will apply until *after* you logout and login again (or Ctrl+Alt+Backspace and login).

    Daniel Spiewak Monday, October 29, 2007 at 1:29 pm
  7. Here’s what I did to my ~/.gtkrc-2.0 file:

    style “my-default”
    {
    GtkTreeView::horizontal-separator = 0
    GtkTreeView::vertical-separator = 0
    }
    class “GtkTreeView” style “my-default”

    Note that applying the style specifically to GtkTreeView is important, I tried to use it on GtkWidget (like some themes do) and it destabilized the whole system (other parameters worked fine, though). There still seems to be a 4 pixel margin on both sides so you get 8 pixels space between two of them, but no amount of tweaking I did changed anything.

    Kim Sullivan Monday, October 29, 2007 at 3:55 pm
  8. > Linux GTK is supposed to be SWT’s second most stable WS,

    Daniel, none of the problems you describe with Eclipse have anything to do with SWT, so why imply that they do?

    Steve

    Steve Northover Monday, October 29, 2007 at 7:08 pm
  9. Sorry, Steve. Believe it or not, it didn’t even cross my mind that SWT was remotely responsible. :-) Eclipse Platform, yes. SWT, no. So, clarification for the uninitiated…

    SWT can only be as good as the underlying WS, and unfortunately GTK+ is a bit weak in some areas. It’s not SWT’s fault that the Eclipse UI on Gnome is inefficient and bulky (though, the huge CTabItems *could* be). My comment about “SWT’s second most stable WS” was actually intended to compliment SWT’s support of GTK+ from early on, not dis a very clever example of native encapsulation.

    Daniel Spiewak Monday, October 29, 2007 at 7:29 pm
  10. The other thing to do with Ubunutu is to go into the Preferences -> Appearance (Gutsy Gibbon), and change the desktop and application font sizes. They come at too high of a resolution…around 11 or 12 points, when they should be around 8 or 9 points. Adjusting the font sizes down to equivalent sizes seen in Windows will give you more screen realestate as well.

    So, I would agree it’s not SWT on GTK+ that is the issue, it’s more of the default settings that come with Ubuntu that are the issue.

    David Carver Tuesday, October 30, 2007 at 6:05 am
  11. Actually, if you lower the font sizes, they become completely unreadable. This I think is the root of one of the biggest problems with (and inhibitors to) desktop Linux.

    Daniel Spiewak Tuesday, October 30, 2007 at 7:42 am
  12. Hope you’ll think twice before switching to Vista again ;-)

    Anyway, I’ve always used eclipse under Linux without problems, but of course, linux might require a little startup (which is then more than repaid I guess).

    I’m currently using kubuntu, thus KDE using the kde style also for gtk applications, and eclipse looks nicer than with the standard gtk theme :-)

    Lorenzo Wednesday, October 31, 2007 at 6:14 am
  13. Because I want to have a Java 6 version handy as well (which doesn’t run on OSX Leopard), I installed Ubuntu’s latest on a spare laptop (Dell Inspiron 9300, ATI radeon mobile 300). All went well, until I decided to install the restriced ATI driver. Got me so much into trouble that I decided to re-install and just stick with the open source driver :-) .

    Eelco Hillenius Thursday, November 1, 2007 at 1:43 pm
  14. That’s odd, because I installed the ATI restricted driver with no trouble whatsoever. I’m not sure which card I have though – maybe Radeon 9000 or something like that. I do know that with my old laptop, the firegl driver didn’t work right, so I had to always stick with ati or vesa (neither of which are properly accelerated).

    As a sidebar to users of recently released ATI cards (I don’t think yours qualifies, Eelco), ATI has actually released the long-promised open-source drivers for their cards. I don’t think they’re in the Ubuntu repositories yet, but you could compile and install them by hand (not too challenging with xserver modules).

    Daniel Spiewak Thursday, November 1, 2007 at 2:36 pm
  15. I really dont see how someone with your “obvious” level of computer knowledge can nit-pick at Ubuntu. I’m a software developer for a large company, and I requested to develop on Ubuntu. Let me add: Ubuntu is not 100%. No Linux distro is, but it is much more flexible than Windows any day. Dont even get me started on VIsta…. And the comment about “Linux just doesn’t have what it takes to be a desktop operating system for the average user” is completely false, because what you just wrote says that you’re not an average user. So you cant speak for the average user. Trying to merge an Eclipse workspace form Windows into Ubuntu is just idiotic and not “average”. Your problem with the track pad: either you didnt search enough, or you didn’t want to take the , say 10 mins, to find a solution. What makes all Linux distros so good is the users. Anybody can help improve Linux. If something doesn’t work right, make it work or make it work better. I’d rather work with something that is made with the backing of countless developers rather than say 79,000 employees of Microsoft, most of which aren’t even developers. I’ve only been on Ubuntu for a couple of months and can taste the freedom from the “Evil Empire”. Oh Yeah, Ubuntu is free too!

    Matt Wintercorn Wednesday, November 21, 2007 at 8:35 am
  16. Matt: Yes, you’re right that linux distros are made great by their users. But not the kind who instead of actually helping just point out some rather obvious facts using a rather sarcastic tone and then imply that someone who wasn’t able to get a trackpad running is either too stupid or too lazy to figure it out ;-)

    Average users won’t even try to search for fixes, no matter how easily the fixes are found or applied. Ubuntu wants to “just work” which is a good thing, because anything that doesn’t makes it broken to the average user, with no way for them to fix it (short of calling someone who fixes it for them).

    I don’t see why my mom should spend any time searching for fixes. Average users are the kind of people who think “the internet” is synonymous with the browser window, and when they close the browser, they’re not in the internet anymore. When I told my uncle he could have problems with the driver for his ISDN modem on Linux, he said that a driver won’t be a problem, because he’s connected via the local telephone company. He also measures disk usage in number of files, and asked me if moving to linux would reduce the number of files on his system.

    Kim Sullivan Wednesday, November 21, 2007 at 3:45 pm
  17. It’s always fun to read a Windows user trying to use anything non-Windows. They make me laugh.

    Rob Thursday, January 24, 2008 at 7:58 pm
  18. My first computer was a Mac (System 7). On it I learned BASIC and such. A few years later, I got my first non-Macintosh computer, an ancient Pentium II running RedHat 7. I stuck with Redhat (and later Fedora) until FC 4, when I switched to Gentoo (this was before Stage 3 was the only option, so I did in fact do a Stage 1 install, bootstrapping everything and configuring the kernel by hand). For reasons I outlined in the article, my laptop acquired around that time (as well as the next laptop I purchased) both run/ran Windows. At the office I had been using Windows XP mainly because I had to. This was my first *serious* exposure to the Windows platform. Now, my primary OS is Vista, but I run Ubuntu Linux within a virtual machine easily 6 hours of the day.

    In what sense am I a “Windows user”?

    Daniel Spiewak Friday, January 25, 2008 at 8:49 am
  19. mouse acceleration curve is a huge problem!
    a mouse should move linear not curved. the whole point of a mouse is precise control . all of that goes to waste with that curve nonsense . there should atleast be an easy way to disable it and set some advanced properties in a linux gui like poling rates and mouse resolution .
    mouse smoothing would be a nice options too as long as it works in a linear fashion with out some curve.
    gamers need linear mouse movement for linux.

    tuxie Tuesday, December 9, 2008 at 4:13 am

Post a Comment

Comments are automatically formatted. Markup are either stripped or will cause large blocks of text to be eaten, depending on the phase of the moon. Code snippets should be wrapped in <pre>...</pre> tags. Indentation within pre tags will be preserved, and most instances of "<" and ">" will work without a problem.

Please note that first-time commenters are moderated, so don't panic if your comment doesn't appear immediately.

*
*