Wednesday, February 04, 2015

The Agony and Ecstasy of Linux on the Desktop

It all started with an anonymous comment: why run Windows if all the software you're running is Linux flavored? I didn't have a particularly good answer.

Thing is, there used to be a time when I only ran Linux. Shira reminds me that back in the day I wouldn't even *allow* a Windows box under my roof (really? She says so). So how did I drift so far away from my roots?

Who cares. Let's fix this.

In theory, you can experiment with Linux before you install it as your primary OS. By default, Fedora comes with a (amazingly cool) Live version that lets you run Linux without messing with Windows. And then there's always the option to install Linux on old laptop or desktop, and play with it there. I've talked about doing those things for years.

However, the only way I know how to truly use Linux is to frigging Use Linux. That is, jump in the deep end of the pool and hope you can learn to swim in time. And so that's exactly what I did: I installed the latest version of Fedora on my brand new Dell laptop. Rolling back to Windows is possible, but it ain't easy.

My adventure started at 6:56am on January 26, 2015. I know this, because for the last 10 days I've been keeping a log of my trials and tribulations.

I'll spare you the details of reading the log (though, please, be my guest) and give you the Cliff Notes version. First, I was amazed at how easily Linux installed. It was effortless. And then I was amazed at the slick desktop that booted up. And then reality started setting in. First, stuff just didn't work. For example, I couldn't move windows around by clicking and dragging the mouse. I was left baffled: was something not configured properly, or was I just clueless as to how a modern version of Linux works?

And then I got more frustrated: what I was looking at was a slick user interface, which as far as I can tell, was trying to be a better version of Windows. But if I wanted Windows, I would have just continued to use the version of Windows I already had!

So, I turned off Gnome, that fancy Desktop Manager and turned on plain o'l X-Windows. Hello 1999! I was no closer to a functioning system, but at least I had that warm fuzzy feeling that comes from recreating the Good Old Days.

Next up, I installed ratpoison. This infamous Window Manager let's you manage your desktop by barely touching the mouse. It's crude and cryptic. Now this is a Linux box!

But still, the list of things that didn't work far outnumbered the list of things that did. Firefox menus didn't work. Selecting text didn't work. Copying between an X-term and Firefox didn't work. WiFi didn't work. Good Lord, what did work?

At this point, I wanted off this ride. My Windows + Cygwin + Emacs approach may have been klugy at times, but at least the friggin mouse worked!

Then I finally had a small bright spot. While working on a network hardware post, I realized that I could measure the strength of my wireless router by kicking off nmcli like so:

  while sleep 1; do nmcli dev wifi >> wifi.stats ; done

I could then walk around the house and collect data. When I was done, I used awk to pull out the WiFi signal strength and generated this graph. Could I have done this in Windows? Sure, but not with zero effort.

As I thought about this victory, I remembered that Windows has always been the OS where things Just Work, whereas Linux let's you be productive in ways you never even imagined. Sure, that's changed over the years: X used to require massive amounts to effort to configure (and you risked ruining your monitor!), now it Just Works. But as I was learning first hand, when it comes to a flawless system out of the box Windows still has Linux beat. But, as my little network script showed, Linux can run circles around a typical Windows configuration when it comes to actually getting things done.

So I pushed forward. And so far, I'm glad I did.

Over the last few days, I've figured out many an issue. My trackpad, for example, needed to be marked as a 'clickpad' to truly function (ahhh, now it works!). I got copy and paste working correctly, my phone to be detected, multiple monitors to work well with ratpoison and a slew of other victories.

Things are far from fully setup (I'm looking at you, 'SD Card'), but they're getting there.

More importantly, I've gotten a number of scripts in place to streamline tasks that used to be all manual. I can now type:

 s5 mount ; s5 grab ; s5 unmount

to grab all the images from my cell phone and have them archived in directory named with the date. Here's the script:

#!/bin/bash

##
## A script for working with our galaxy s5
##
S5_ROOT=$HOME/devices/s5
S5_PICTURES=$HOME/Pictures/s5
action=$1 ; shift

case $action in
  mount)
    simple-mtpfs $S5_ROOT ;;
  umount)
    fusermount -u $S5_ROOT ;;
  slurp)
    for img in $S5_ROOT/Card/DCIM/Camera/*.jpg ; do
      date=`imgcreated $img`
      echo "$img -> $date"
      mkdir -p $S5_PICTURES/$date
      mv -i $img $S5_PICTURES/$date
    done
    ;;
  *)
    echo "Usage: `basename $0` {mount|umount|slurp}"
    exit
    ;;
esac

It's this sort of automation that makes me feel like this Linux experiment is more than just a walk down memory lane.

Expect to see more scripts and tales from the command line as I continue to refine my desktop Linux experience.

7 comments:

  1. Anonymous4:11 AM

    You could have avoided "The Agony" part if you just went with
    Ubuntu. Ubuntu has been a "better Windows" for ages now, and that
    property does not hamper any of its Linux features either.

    The only thing to keep in mind, if you want to save yourself the
    trouble, is to get good hardware: never get HP, and prefer NVIDIA or
    built-in Intel over ATI. With that, **zero** config is necessary for
    everything.

    I've had a Lenovo laptop for two years on which I've spent 20 minutes
    to install Ubuntu, 0 minutes to configure, and maybe 4 hours to
    upgrade the distro once (the upgrade was in the background, I didn't
    actually spend any time).

    ReplyDelete
  2. Keep in mind, I don't want a Better Windows. What makes Linux a win for me is when it's a completely different mindset of Windows.

    I definitely had some bad luck. My one 'clickpad' issue caused huge amounts of confusion.

    And the reality is, most of what I wrote above could apply if I jumped from Linux to Windows, or Windows to Mac or Mac to Windows.

    I just know that it was humbling how screwed up things were once I got past the initial, "Wow, it installed and booted into a slick desktop!" But almost two weeks in, and I've got a system I'm really learning to love.

    ReplyDelete
  3. Sounds fun. On Windows boxes I like to use VmWare to host Linux. That way the machine sleeps perfectly and you know, still, Linux.

    ReplyDelete
  4. Anonymous11:43 AM

    As the original anonymous poster, I'm humbled that my comment caused you to give Linux another go. Sorry you had such trouble with fedora, I haven't used an RPM based distro since redhat 5 but I'm surprised it didn't work better.

    I usually stick with ubuntu because it seems to be the closest to the 'it just works' philosophy of OSX, and I don't spend a lot of time tweaking things. It sounds like you enjoy the tweaking part (ratpoison!) so the choice of distro is probably less important beyond the initial install.

    Anyway, I was tickled to see your post. Thanks!

    ReplyDelete
  5. > Sounds fun. On Windows boxes I like to use VmWare to host Linux. That way the machine sleeps perfectly and you know, still, Linux.

    This is much like my philosophy of running a Linux server (something I've done for years). But it's not nearly the same as forcing yourself to do everything the Linux way. Makes for fun times :-).

    > As the original anonymous poster, I'm humbled that my comment caused you to give Linux another go.

    And thanks for inspiring me to do so! I truly am having fun with this, and I feel like I've turned the corner in many respects.

    > Sorry you had such trouble with fedora, I haven't used an RPM based distro since redhat 5 but I'm surprised it didn't work better.

    Fedora has been impressive in many ways. I think it's just a combination of bad luck and getting used to a new system that caused most of my issues.

    > It sounds like you enjoy the tweaking part (ratpoison!) so the choice of distro is probably less important beyond the initial install.

    It's a little less about tweaking and more about trying to get a truly different user experience. Even if Gnome was running perfectly, I wasn't going to be blown away with it.

    In fact, having there be big challenges in the switchover, at least for me, was probably a good thing. It showed I was making a leap into something truly different than what I was used to.

    Thanks again for the inspiration! Well, maybe I'll fully be able to thank you in another 6 months when everything is truly working and I can't imagine how I used to get by on Windows ;-).

    ReplyDelete
  6. Anonymous6:29 AM

    I'm not surprised you had a hard time with the latest version of Fedora… even if it had worked better, you would have had many things to rant about because Fedora needs a real post-installation work. Using Ubuntu/Mint/MintDebian etc is a much smoother experience.

    ReplyDelete
  7. I've been using linux as my primary desktop for probably the last 5-7 years... the last 5 stuck with RHEL5/6 (and I've worked with linux servers for the last 10-15.... all Redhat based). The one 'primary' distro I've actually never tried is Fedora... probably more due to projects I've worked on, but never actually tried that flavor. I've used Centos/ScientificLinux (both RHEL clones), Ubuntu and Mint.... the funny part is that I've always said that if I change again I'm going to go straight Debian. They all work... but even if you grab the latest from Ubuntu, you risk things not working on a brand new laptop.

    As 'anonymous' commented about RPM... it does work much better.... my first exposure was with Redhat 2 (way pre Fedora and RHEL) so I guess I may be a bad judge... but that said... it has gotten much better over the years. I however have issues with RPM only since they are a pain to create.... YUM is great to manage and install RPMs but try and create an RPM for your own project... fun. I think I like deb better for packages, but even that has its drawbacks. I guess that is why we have so many linux flavors... no one options works for everybody... if it did, it would be call Windows.

    The really funny part is that when I think about my use of linux for the last few years... all I really use is a web browser (chrome or firefox) and a terminal window with gnu screen.... when I get some free time I'm going to have to give Ratpoison a try :-)

    ReplyDelete