Archive for the ‘GNU/Linux’ Category

Ubuntu 9.10 on a Thinkpad T400

Wednesday, November 11th, 2009

I upgraded from Ubuntu 9.04 to 9.10 on my Lenovo Thinkpad T400 about a week ago, and thought I’d write down some of my impressions.

Good news

  • ATI graphics card with proprietary binary driver – just works (much better than 9.04 as well).
  • Suspend & hibernate work flawlessly.
  • Boots fast.
  • Upgrade worked flawlessly.
  • Sound (better volume panel!), wifi, USB, network printer, bluetooth (option to turn it on/off!), webcam, etc. all still work.
  • New theme is nice.
  • I manually upgraded my filesystem to ext4 and grub from version 1 to 2. It was a bit scary but worked out fine. Can’t really feel a difference, but my laptop is mainly a dumb terminal for running web browsers and ssh.

Empathy

Ubuntu replaced Pidgin with Empathy as the default IM client in Ubuntu 9.10. I think because Empathy supports voice/video chat and Pidgin doesn’t? I’ve used video chat once in my life and that was through Skype on Linux. It worked great, but it’s really not a feature I care about.

So for someone like me who doesn’t care about Empathy’s singular advantage over Pidgin, Empathy is a major step backward. At first it was extremely crashy, but a recent update seems to have fixed that. However, now it mysteriously loses messages. I’m a very light IM user, but it would start silently missing messages a few hours into the day every day.

I’ve switched back to Pidgin and couldn’t be happier.

Message Notification applet deal

Empathy integrates with the message notification applet deal along with Evolution. Other apps may as well, but evidently I don’t use any of them. My top panel is 75% whitespace, so the singular benefit of Ubuntu’s consolidated message notification applet was completely lost on me.

So much like Empathy, I removed this specialized applet as well. I’m much happier with per-application icons anyway and fail to see what the benefit of consolidating them is (unless you have a really cramped top panel).

New Theme

I like it, but then I installed Chromium. Now the bold window titles and expansive title bars in Metacity look bulky and antiquated. Gnome really needs to evolve their window manager and default UI. Chrome is an excellent example of how to design a compact, minimal, yet still pleasant and intuitive user interface.

Ubuntu Software Center

What a curious little replacement for the old Add/Remove Applications program. I think I see the direction they’re headed, but it definitely feels like rolled out a beta program to replace a perfectly functional and stable one.

The left pane with expansive whitespace and 2 options hints that there might be more categories in the future, but right now it just looks like a mistake. Like maybe something isn’t working properly, and I’m not seeing all the options I should see.

At any rate, I hope Ubuntu adds an App Store that even includes evil proprietary software. I’d love to be able to plunk down a few bucks for a game like Braid directly from Ubuntu Software Center. That’d be great! Maybe Canonical could even pocket a few pennies and start making Linux-on-the-desktop profitable. Now I’m just dreaming though…

Bottom Line

9.10 is a solid and safe upgrade for any users of previous versions. Not sure there’s anything new to win over users from OS X or Windows though.

My Gnome 3.0: A Real Web Desktop

Tuesday, June 2nd, 2009

So I missed the stream of What I Want for Christmas Gnome 3.0 by … a while, but better late than never!*

The Win

Essentially what I want for Gnome 3.0 is what Tomboy just got: a web interface called Snowy. Part synchronization, part collaboration, all “cloud” for those buzzword minded among us.

The Fail

Luckily there’s already Conduit which I think does the synchronization bit… I say “I think” because I’ve never actually gotten Conduit to work. I drag & drop F-Spot onto the canvas**, neat. I drag & drop Network to the right of F-Spot, neat. Now what? There’s no configure option for Network. Heck, there’s not even a Remove*** for Network. I right click and select Synchronize in hopes it will prompt me for details, but instead it happily reports synchronization is finished. Huh?!

I poke around in Preferences hoping for guidance on how to sync to another computer over a network. Wow. The first tab is fine, but the other 2 tabs are just long lists of text. Wait a second, if you scroll horizontally to the right in the Data Providers tab you can see a checkbox to load/unload them! Why you’d want this option other than for development, I’m not sure, but its there if you know where to look.

At this point Conduit has failed to gain my trust, so I give up. I’m fine with Pidgin being crash happy or Eclipse being ridiculously complex to configure. The former isn’t mission critical and the latter is intended for developers.

However, I’m expected to entrust all of my files to Conduit. Files and account information for network resources if I could figure out how to get that to work. I have pretty high expectations for anything I’m entrusting my files and passwords too. Right now Conduit seems more like a demo of GTK+’s canvas drawing abilities (it is pretty looking) than a powerful synchronization tool.

The Dream

My expectations for web enabling Gnome are insanely high. Synchronization isn’t enough (although it’d be an excellent start). I need web enabled collaboration features as well. I need it to Just Work™ as well as be Secure By Default™.

This means:

  • All applications can synchronize their settings and data.
  • All data has some sort of web viewable format and ideally a way to interact with it on the web as well.
  • By default all settings and data should be private.
  • Fine-grained CRUD permissions for all settings and data. The Create and Update are key here: not only should I be able to give other users the ability to edit my files but Grandma should be able to upload photos to my photo album.
  • While I’m dreaming can I add versioning support (like Dropbox)? Cool, thanks. ;-)

The Implementation

Unfortunately I think Conduit is the wrong way to go. The concept is sound, but Worse Is Better™: each application needs to be allowed to implement their own integration with the cloud synchronization and collaboration system. There’s too many application specific tasks to accomplish intuitive synchronization and collaboration features outside the main application.

Tomboy has had pretty good synchronization for a while now. Firefox is getting it with Weave.

In a way F-Spot and Banshee support 1-way synchronization and collaboration. F-Spot can upload photos to a variety of services which have all (or at least most) of the features I’m pining for. Banshee’s ability to download Podcasts and music synchronize to iPods (note: I’ve never used that feature) is a sort of primordial synchronization. If only Banshee Web had survived (and wasn’t written in ASP.NET, the ickiest of all webdev platforms). Abiword has been toying with cloud services for a little while as well.

Perhaps Evolution is the poster child for this: I currently use it as a Gmail and Gcal interface sometimes because there are certain use cases for which I prefer it (shocking I know!). Despite its past reputation for being bloated and buggy, it Just Works&tm; these days and integrates beautifully with the rest of the Gnome desktop (are those calendar events in my system tray calendar?! amazing! Pidgin integration?! <3 Evolution). Evolution lives completely in the cloud and synchronizes everything locally beautifully (after years and years of effort).

Why Gnome Can Do It

Gimp is actually the first Gnome app to really make me realize working on the web can and should be as easy as working locally. All it did was utilize Gnome’s VFS to edit and save images via FTP or SSH. With Gnome’s screenshot tool, I can save a screenshot to a web accessible location in 1 keypress and 2 clicks. Amazing! Thats almost as fast and easy as using a pastebin tool on the command line for sharing text.

Snowy seems like an excellent poster child for the web interface I’m whining about. I haven’t used it yet, but the very idea that Tomboy already has an open source reference implementation is an excellent start. 3rd parties could implement the protocols and offer competing services.

In an ideal world this would create a revenue stream for open source applications: services like Dropbox could support the synchronization and collaboration protocols and in return support development of the projects. The more people who use apps that integrate seamlessly with Dropbox, the more people who pay for Dropbox… or box.net or Amazon or… you get the idea.

FreeDesktop.org Does What?!

That’s right, FreeDesktop.org needs to lead the charge here. Its not enough that the protocols are open, application developers need libraries to make synchronization and collaboration easy. In that way Conduit is right: each application should not completely reinvent the wheel.

FreeDesktop.org needs to follow Mozilla’s lead. Mozilla realized early on that in order for their browser business to succeed, they needed open standards to succeed. FreeDesktop.org needs to do the same. A KDE application should be able to synchronize to the same service as a Gnome app (this is where Conduit’s monolithic-master-synchronization-app model seems too optimistic to succeed). OSX and Windows apps should be able to use the base synchronization libraries as well, even if they don’t use GTK+ or QT.

At the end of the day I should be able to sync my photos, documents, and mp3s between my laptop, desktop, cell phone, Kindle, etc as well as any relevant application settings (Tomboy for Kindle?! yes please!). …and so much more.

* Not always true. For example: posting opinions on a piece of software long after the roadmap has been made.
** Strike 1 against Conduit: “Canvas” isn’t a very end user friendly term IMHO. A minor complaint, but as confusing as the UI already is, it needs all the help it can get. Perhaps the problem isn’t the name “Canvas” but rather that the fact that it doesn’t even need to be said. Remove all references to it and just put a textbox that says “Drop data providers here.” when the canvas is empty. The “Clear canvas” option can just be “Clear” as there’s really only 1 thing that can be cleared.
*** Strike 1.5: “Remove” would be better than “Delete”. Delete makes me wonder if its going to erase my files! Remove seems more descriptive and precise. Also, drop “item” from the end of each right click menu option. Its redundant when every option operates on the item you clicked.

Keeping all your notes in sync with Dropbox and Tomboy

Friday, April 17th, 2009

Tomboy is a wonderful note taking program for Gnome. It has some synchronization features built-in, but not everyone has a server to store their notes for synchronizing between multiple computers.

Enter Dropbox: a service for synchronizing files between computers. It works great in Gnome (Windows and Mac OSX as well).

I use Dropbox for synchronizing my Tomboy notes by telling Tomboy to synchronize to a Local Folder: ~/Dropbox/Tomboy

My one gripe is that you have to go into a note to synchronize. Someone has filed a bug and submitted a patch, so hopefully it will be fixed soon.

Crowdsourcing my OS Bridge Talk Proposal

Sunday, March 29th, 2009

Update: Submitted my proposal, but please still leave me comments! I can still edit my proposal.

Web server performance has been a hot topic for some time now as Apache hasn’t been the only viable option for a few years.

I want to do a talk at OS Bridge doing practical comparisons between the popular web site hosting options available today. There’s plenty of requests per second comparisons between the major HTTP servers out there, so I want to go beyond and compare a wide variety of metrics in a wide variety of environments.

Here’s what I’m thinking so far, but I’d love your feedback! I’m really excited about the possibility of presenting at a large conference like OS Bridge and want to make my talk as exciting and useful as possible.

Metrics

  • Requests per second (serially* and concurrent)
  • Memory usage
  • Features (extensibility, modularity, etc)
  • Community (support options, tools/modules available, etc)
  • Portability
  • Reliability (can I crash it? how well does it handle load?)
  • Ease of setup and maintenance (floods of patches? hideous config file?)

Web Servers

The usual suspects (will definitely test):

  • Apache 2.2 (prefork and worker mpms)
  • Nginx 0.6.x (latest stable)
  • Lighttpd 1.4.x (latest stable)

Maybes:

  • Nginx 0.5.x (legacy)
  • Nginx 0.7.x (latest dev)
  • Cherokee (not sure if its really popular enough yet to bother)
  • CherryPy and some other language specific or just less known servers would be fun.
  • IIS – It’d be really fun if I could find someone willing to help me run my tests on IIS. I definitely won’t be setting it up myself though!

Test Cases

This is where things become really complicated. I don’t want to just download static files from each server and pretend like thats a real world use case, but at the same time the various environments I could come up with are nearly limitless.

I want to strive to cover the most common environments** as well as a few variations that produce interesting results.

  • WordPress (mod-php where applicable and FastCGI)
  • Drupal (mod-php where applicable and FastCGI)
  • Bugzilla, Redmine, and Trac (to test a few non-trivial apps from 3 popular languages)
  • trivial Django app (mod-python & mod-wsgi on Apache, FastCGI everywhere)
  • trivial Ruby on Rails app (need advice from RoR devs on common deployment methods)
  • trivial Zend Framework app (or is there a more popular php framework?)
  • something from the Java world?
  • maybe something fairly obscure like Seaside?

Conclusion

Wow, that seems like a lot to cover thoroughly, but I think the research will be a lot of fun to do.

Please let me know your thoughts either in the comments, on twitter (@schmichael), on IRC (schmichael again), or via e-mail.



* Its interesting to compare serial to parallel req/sec to give people an idea of how well the technology will scale on a single server. I’ll make sure to note good serial performance can often be turned into good parallel performance by using a load balancing proxy and multiple instances of your application server.
** All Linux based for simplicity unless someone volunteers to run the tests on other platforms.

New Laptop: Acer Extensa 4630Z

Sunday, March 22nd, 2009

I bought a laptop recently because being a web consultant and tied to a desktop is not only embarrassing, but is a quick way to lose (or at least frustrate) clients who’d love to see my hairy hacker face on-site.

I use Linux, Firefox, and vim for work so my requirements for a laptop basically came down to WiFi. I also didn’t want something big and clunky because I’m looking to augment my desktop, not replace it.

I finally settled on searching in the 13″-14″ range for anything with dual cores (so Flash can destroy 1 core while the other lets me continue to work unphased) and 2 GB of RAM (that usually gives me > 1 GB for harddrive caching which speeds things up a lot — plenty of room to run an XP VM as well).

Despite affectionately nicknaming my aging Thinkpad a “Brickpad” due to its big-black-box design, I love Thinkpads and have found them to be exceptionally well made and reliable. Unfortunately they just weren’t in the budget this around around.

At this point my search had narrowed down a bit, and I began searching for the easiest way to get the most bang for my buck: getting a laptop without Microsoft Windows. Even if Windows only adds $50 to the purchase price, that’s a significant amount of money when you’re shopping in the $500-600 range. That and I can remote into the XP VM on my desktop for cross-browser testing (my only use for Windows).

Unfortunately with the exception of tiny netbooks, there aren’t many Windowless laptops out there (not paying extra for an Apple either, sorry). Dell has one (or a few?), but I’ve had too many bad experiences with Dells dying prematurely (IMHO, YMMV, etc). HP lets you get Windowless laptops, but only if you pay extra to customize your laptop. Oh well.

So once I gave up on that dream, I just went for cheap and found an Acer Extensa 4630Z.

Linux on an Acer Extensa 4630Z

I decided to go with Ubuntu 8.10 instead of my usual choice of Debian and fought around with getting /home and my swap partition encrypted. I’ll probably keep using Debian on servers, but its politics have just gotten so annoying as to convince me I never really want to work to become a member of that community.

Here’s the rundown of what works, what doesn’t:

  • Ralink RT2860 802.11b/g/Draft-N WiFi adapter – Ugh. Its “working” using Ralink’s drivers, but not with Network Manager. I’ll have to keep playing around with it, but for now its working adequately.
  • Crazy € and $ keys above the arrow keys do not work, but I’m not sure what purpose they serve.
  • Intel graphics card works fine with Compiz (although I just use Metacity).
  • Suspend but not hibernate. Argh! Does hibernate work for any Linux users? I haven’t even tried in years.
  • Webcam, speakers, mic, & screen dimming work

It will interesting to see how I like moving from a Debian desktop to an Ubuntu laptop.

(Yet Another) Deploying Django with CherryPy Script

Wednesday, February 18th, 2009

Recently I deployed a Django project on an OSX server. I foolishly thought this would be as easy as on Linux until I ran into the mess that is x86_64 Apache + mod_wsgi* + Django + psycopg2 + i386 PostgreSQL. After wasting far too much time googling and recompiling various bits trying to get everything happy, I followed Eric Florenzano’s post on deploying Django using CherryPy’s** wsgiserver.

Here’s my lightly modified version of Eric’s script:

import wsgiserver
import sys
import os
import django.core.handlers.wsgi
 
if __name__ == "__main__":
    # Setup paths - a bit hackish, but works for me.
    # Assumes an absolute path is stored in <project>.local_settings.ROOT
    sys.path.append(os.path.realpath(os.path.dirname(__file__)))
    from foo.local_settings import ROOT
    sys.path.append(ROOT)
 
    # Startup Django
    os.environ['DJANGO_SETTINGS_MODULE'] = 'foo.settings'
    server = wsgiserver.CherryPyWSGIServer(
        ('0.0.0.0', 8888),  # Use '127.0.0.1' to only bind to the localhost
        django.core.handlers.wsgi.WSGIHandler()
    )
    try:
        server.start()
    except KeyboardInterrupt:
        print 'Stopping'
        server.stop()

I also went with the latest stable version of CherryPy’s wsgiserver instead of checking out trunk like Eric’s post suggested.

Then I just enabled mod_proxy in Apache and setup the following VirtualHost:

<Proxy *>
    Order allow,deny
    Allow from all
</Proxy>
<Location "/">
    ProxyPass http://127.0.0.1:8888/
    ProxyPassReverse http://127.0.0.1:8888/
</Location>

If you’re cool you’ll write some sort of system specific script to launch your web app on boot. In a pinch, you can always use a crontab:

@reboot /usr/bin/python /path/to/app.py &

YMMV ;-)


* To mod_wsgi’s credit, it took about 10 seconds to compile, generated a Universal binary, and in general Just Worked.

** I’m already a CherryPy fan thanks to dowski, so it wasn’t a hard decision.