Mar 12 2009

Testing Ubuntu Jaunty and Ext4 WITHOUT Trashing Your Data

Tag: linux, software, ubuntuScott Wegner @ 11:00 am

Trash Thank YouUbuntu 9.04 “Jaunty Jackelope” is set for release in less than two months, and is currently in the “Alpha 6″ testing stage.  Arguably the hottest new feature is stable support for Linux’s new filesystem, ext4.  The new filesystem has been shown to have significant performance gains over any other Linux filesystem to date.  But think twice before you upgrade to ext4–many users have been reporting considerable data loss.  From a user’s comment:

This has happened to me twice, the first time erasing Firefox settings, and the second time erasing gnome-terminal settings. Both cases were caused by a kernel panic locking up the system. Also, both times the program whose settings were affected was in use during the kernel panic.

This has been a wide-spread problem, particularly for Ubuntu users testing the new Jaunty alpha releases.  It manifests itself after a system crash, where open files will simply be emptied and erased.  It is particularly prevalent in users’ settings files, such as those used for GNOME or KDE.  Fortunately, there cause of the bug is relatively well-known, as kernel developer Theodore Ts’o explains in his detailed comment:

OK, so enter ext4 and delayed allocation. With delayed allocation, we don’t allocate a location on disk for the data block right away. Since there is no location on disk, there is no place to write the data on a commit; but it also means that there is no security problem. It also results in a massive performance improvements; for example, if you create a scratch file, and then delete it 20 seconds later, it will probably never hit the disk. Unfortunately, the default VM tuning parameters, which can be controlled by /proc/sys/vm/dirty_expire_centiseconds and /proc/sys/vm/dirty_writeback_centiseconds, means that in practice, a newly created file won’t hit disk until about 45-150 seconds later, depending on how many dirty pages are in the page cache at the time. (This isn’t unique to ext4, by the way — any advanced filesystem which does delayed allocation, which includes xfs and the in the future, btrfs, will have the same issue.)

Essentially, the data for truncated and overwritten files is often cached in memory before actually hitting the disk, for performance reasons.  However, the file truncation doesn’t get cached, and if there is a system failure between the two operations, your files will simply be wiped clean with all previous and new data gone.  This happens frequently for desktop settings because hundreds of small hidden files are updated to maintain user preferences.  As a result, there is a relatively high probability that a truncation and rewrite operation could be happened at any time– including during a system failure.

By POSIX definition, this isn’t really a bug in ext4.  The state of a file after this type of crash isn’t clearly defined.  According to Theodore, it’s really a bug in the way desktop environments are writing their settings files:

[...] If your application is stupid, and has hundreds of dot files in your home directory, each one taking up a 4k disk block even though it is only storing 4 to 12 bytes of data in each singleton dot file, and you have to [write to disk] for each of your one hundred dot files — and worse yet, your application for some stupid, unknown reason is writing all of these hundred+ dot files every few seconds, then [writing to disk] will be very painful. But it is painful because the application is stupidly written — not for any fundamental filesystem fault. It’s like if you had a robot which was delivering mail to mail box numbers 1, 2, 3, 4, 5, and crossing the street for each mail box; on a busy road, this is unsafe, and the robot was getting run over when it kept on jaywalking — so you can tell the robot to only cross at crosswalks, when the “walk” light is on, which is safe, but slow — OR, you could rewrite the robot’s algorithsm so it delieveres the mail more intelligently (i.e., one side of the street, and then cross, safely at the crosswalk, and then do the other side of the street).

Regardless of what a permanant solution should include, there are a series of patches which are set to be included in the final Jaunty kernel to address this issue.  The patches are set to handle the crash situation similar to ext3– keeping the original version in-tact.  However, it comes at a price of performance.  Ext4 won’t be any slower than ext3, but the patch will negate many of the performance gains that ext4 previously achieved.

Once again, ext4 will likely be patched and fixed by the official Ubuntu Jaunty release.  However, it isn’t present in Jaunty Alpha 6, and hasn’t been pushed as an update yet (as of 3/12/09).  There is lengthy and ongoing discussion in the original bug report about possible long-term solutions.  In conclusion, be very careful if you choose to test out the new ext4 filesystem until it is patched.


Mar 10 2009

Dell Mini 9 Netbook: Ubuntu Linux Version

Tag: hardware, linux, open source, technology, ubuntuKyle Wegner @ 7:01 pm

After much anticipation, my new netbook (which I got a screaming deal on) was delivered this afternoon. It’s a Dell Inspiron Mini 9 Netbook with Ubuntu Linux, though this version of Linux is slightly different than your standard install. While it is technically Ubuntu 8.04 (Hardy), it has its own interface which I will do a walkthrough of below, outlining all the differences I can find between this Dellbuntu (my own term) and a standard Ubuntu install.

This screen shot walkthrough will look at the unedited, uncustomized Ubuntu install on my Dell Mini 9. I’m sure I will do plenty of customization down the road, but for now you get the virgin version.

The Standard Desktop

ubuntu home screen on dell mini 9

The desktop is very clean and appealing to start off with. There are no folders or icons on the desktop itself, which will be quite a surprise for anyone coming from a Windows environment. The large bar across the top is called the Launcher and presents most of the essential programs in a graphical interface. Below are shots of each tab individually.

The Entertainment Tab

ubuntu entertainment tab

While this menu has the typical Music Player (Rhythmbox) & photo manager (F-spot), this is the first time we really see the net-focus on the netbook. Having a specific icon for LastFM shows the imporantance of working in the cloud…which is essential since the Dell Mini 9 comes with only 4GB of memory standard.

Also, notice how I had to specify that the music player and photo manager have actual names. Dell has completely debranded most default programs, which we will see more examples of soon.

The Games Tab

ubuntu netbook games tab

The games tab has many of the typical Ubuntu games so there isn’t a whole lot to discuss here, however there are a few things to note. First, and most disappointing, is that Wormux, my favorite of the Ubuntu standard games, is not included in this install. I’m not sure why they would do that while adding Potato Guy instead! Let me tell you, potato guy is one of the most annoying and pointless “games” I’ve ever run across. Stay away!

The Learn Tab

Dell netbook learn tab

I don’t know who came up with the Learn tab, but I don’t think I’ll ever seriously use it. I guess the Japanese Study Tool and Stellarium might be good for a handful of people, but these do not seem like programs that were worth including in a default install. Actually, more interesting than that is the fact that all of these programs have Kubuntu-style names in the normal programs menu. What this means I’m not sure.

The Productivity Tab

netbook productivity tab

The productivity tab includes all the default OpenOffice.org programs, plus a handy folder called “Dell Contract.” Of all things I want in a quickstart menu like the launcher, I DEFINITELY want fast access to my Dell Contract at all times. Thanks Dell!

The Web Tab

netbook web tab

The web tab is probably the most interesting of all, which is to be expected from a netbook. Can you tell who Dell partnered with to bring netbook services to the Mini 9? Let me spell it out for you…Yahoooooooooo! Not only do they have an entire quicklaunch section dedicated almost entirely to Yahoo pages, but the “Web Browser,” or Firefox, defaults to Yahoo.com for the home page, has the Yahoo Toolbar installed, and defaults to Yahoo search from the quick search bar. While I have no problem with companies partnering with each other to do promotions, Mozilla is largely funded by Google search which is shown by defaulting the Firefox home page & quick search bars to Google. Without this funding, development for Firefox in general would be at risk. But this is an issue for a separate post.

The Keyboard

While the entire set of hardware behind the Dell Mini 9 Netbook is interesting and generally super high quality, what is worth sharing the most is the keyboard.dell netbook tiny keyboard

This keyboard is super tiny, but also extremely functional. My one problem, which I have yet to get over, is the positioning of the apostrophe/quotes key. Dell moved it from its normal position next to the colon key to the bottom row next to the left arrow. See it? Yeah, that will take some getting used to.

That’s it for now. I’ll update if I find anything else that stands out from typical Ubuntu installs. Until then, let me know if you have any questions in the comments and I’ll get back to all of them asap.


Feb 26 2009

Linux For Computer Science Majors

Tag: linux, software, ubuntuScott Wegner @ 12:00 pm

TuxMy name is Scott Wegner, and I’m a Computer Science major at the University of Illinois, Urbana-Champaign.

I’ve had Linux installed as my primary OS for about 3 years, and as a computer science major, it’s certainly my environment of choice.  Not only does Linux deliver a rich desktop environment, but also the command-line and its vast number of utilities are indespensible for any sort of development.  It still suprises me, then, when I see other CS majors at my university who are so unfamiliar with Linux, and who cringe when any programming assignment requires Linux for one reason or another.  It got me thinking.

Our computer science department also has a number of computer labs with Linux machines, accessbile remotely and for physical access.  There are also a few Windows machines for those who prefer Visual Studio, although these machines are generally inferior when it comes to speed and stability.  So why do students still flock to them?  I think it’s because the courses at our university only give a terse introduction to Linux and the utilities that the course will require.  What we need is something that will really show students the ease and the power of Linux.  Maybe a 1-hour tutorial, perhaps a half-day workshop, or even a 1-credit hour introductory course.  Yes.

This wouldn’t be the sort of tutorial you see on the internet that praises Ubuntu for it’s robustness and claims that users should never need the terminal.  CS majors need to embrace the terminal and its utilities.  I asked earlier on identi.ca / twitter what people would talk about, and received a number of great responses.  There’s a whole list of tools that students need to be familiar with to really be productive.

  • grep, less, head, tail
  • vim, emacs
  • make
  • svn, cvs
  • ssh
  • man
  • awk,  sed
  • diff,  sdiff, colordiff

There’s also a lot of tools that would simply make their experience more pleasant, such as screen, rsync, latex, etc.  Having an understanding, or at least a crude familiarity of these utilities would certainly improve a student’s experience on projects which require them.  It may even convince them to try the faster Linux machines next time they visit the computer labs.

But how would one structure such a course?  I think a 1-hour weekly lab workshop would be the best setting.  The course could revolve around some simple in-class project that utilizes each of these tools.  Each week could introduce a new command, looking into it’s basic syntax and functionality, as well as providing links and resources to explore its advanced usage.  The majority of class time would be spent working on the project, trying each new command and using it to solve some basic problem.  The hands-on section would be crucial, as this is will instill the basic familiarity that students will hold with them for later courses.  I also think it would be useful to have extra time after class for “install-fests”.  This would give students the opportunity to install Linux at home and see if they would like it– either in a virtual machine, via Wubi, or on a physical drive.  They should be offered, optionally of course, once at the beginning of the semester, half-way through, and towards the end.

So what do you think– could something like this work?  Would it be helpful?  Have you heard of a university that provides something similar?  And what applications would you add to the list?  Let’s hear it in the comments.


Sep 22 2008

Purchase Non-Free (MP3, DVD) Media Codecs For Ubuntu Linux

Tag: deep thoughts, opinion, shopping, software, ubuntuScott Wegner @ 11:00 am

In this week’s Ubuntu Weekly Newsletter, there’s a link to an article on the Canonical Blog about their new offering of proprietary media codecs available for purchase.  Canonical has partnered with Fluendo and Cyberlink to give Ubuntu users a legal option for viewing and listening to their media.  This is similar to those who purchased a computer with Ubuntu preinstalled– generally there is a small premium factored in to have the media codecs pre-bundled.

This is a wise move by Canonical.  Giving their users a legal option for playing their media will encourage more software and companies to also invest in Ubuntu and all Linux media alike.  The announcement doesn’t quite make it clear, but it sounds like the Medibuntu repository will still be available with instructions for Ubuntu users to download similar codecs for free– illegally in many countries.  The adoption of the legal, non-free software will depend largely on how it is marketed inside Ubuntu.  That is, when you try to play an MP3 for the first time, will a dialog prompt you to purchase MP3 support, or offer an easier link to Medibuntu and the ubuntu-restricted-extras package?

One of the reasons that I moved to Ubuntu in the first place was so I could have software I wanted, free and legally.  It’s nice to finally have the option of legal media codecs as well.  What do you think of the announcement?  Will you pay the $40 for most non-free media codecs, or the additional $50 for DVD support?


Sep 20 2008

Lock Down Your Ubuntu Computer with A Bluetooth Cellphone and BlueProximity

Tag: linux, open source, software, ubuntuScott Wegner @ 10:29 am

A couple weeks ago I bought a bluetooth adapter for my computer in hopes that I could easily backup my cellphone contacts on my computer.  I haven’t yet found a program to sync my cellphone data, but I did find a program to use your phone to lock and unlock your screen when you leave and come back to your desk.  With BlueProximity, your cellphone acts as a wireless “key” to your desktop.

Continue reading “Lock Down Your Ubuntu Computer with A Bluetooth Cellphone and BlueProximity”


Sep 15 2008

Easy Subversion GUI for Nautilus and Ubuntu

Tag: how-to, software, ubuntuScott Wegner @ 4:47 pm

Just about every software project uses some sort of versioning control system, and subversion is arguably the most popular tool.  Having your files versioned and backed up in a central repository is essential.  I’ve written about how to set up your own subversion repository, but you can go a step further and install a graphical interface to use subversion right within Nautilus.

Installing and setting up the subversion GUI is as simple as three commands.

  1. Install the nautilus-script-collection-svn package:
    sudo aptitude install nautilus-script-collection-svn
  2. Enable the plugin (this is required to access the plugin from nautilus):
    nautilus-script-manager enable Subversion
  3. Restart Nautilus:
    killall nautilus

Afterwards, Nautilus will have a new entry in the context menu when you right click.  You can now access most basic subversion commands without touching a terminal.

The interface isn’t quite as pretty as some Windows clients, such as TortoiseSVN.  However, it is still a nice alternative for users who prefer a GUI and only need basic functionality.  There doesn’t seem to be any support for merges, and other commands will use the default parameters.


Sep 12 2008

Organize Your ToDo List in Ubuntu with Remember The Milk and Tasque

Tag: how-to, linux, open source, productivity, software, ubuntuScott Wegner @ 8:22 pm

I am a big fan of the previously mentioned Remember The Milk productivity webapp.  It does one thing– manages your Todo list– and it does it very well.  Remember The Milk offers a clean web interface, as well as integration inside Gmail, Google Calendar, and even has an iPhone app.  The only thing that was missing for me, though, was a simple interface for the Linux desktop.  Enter Tasque.

Continue reading “Organize Your ToDo List in Ubuntu with Remember The Milk and Tasque”


Jul 03 2008

Introducing: Pwdhash Sharp 0.8.4

Tag: open source, software, ubuntuScott Wegner @ 4:50 pm

I’ve started another pet project for the summer, and I believe it’s ready for a stable release.  The program is called Pwdhash Sharp, and it’s a C#, Gtk-based desktop implementation of the PwdHash password-generator, written for Ubuntu.   We’ve written about PwdHash before, but if you’re not familiar:

PwdHash automatically replaces the contents of [site address and password] fields with a one-way hash of the pair (password, domain-name). As a result, the site only sees a domain-specific hash of the password, as opposed to the password itself. A break-in at a low security site exposes password hashes rather than an actual password. We emphasize that the hash function we use is public and can be computed on any machine which enables users to login to their web accounts from any machine in the world. Hashing is done using a Pseudo Random Function (PRF).

Now with Pwdhash Sharp, you get the same functionality integrated into your desktop.  When I first started writing this application, the PwdHash Firefox extention wasn’t compatible with Firefox 3 (although they’ve updated the addon since then), so that was another reason I needed an alternative.  Pwdhash Sharp is also convenient for non-browser applications which require a password– now you can easily use strong passwords for them as well.

Pwdhash Sharp 0.8.4 is the fourth version released, and is now relatively stable.  Some of the features include:

  • Passwords exactly match those generated by PwdHash, so they are interchangable.
  • Native GTK window and icons.
  • Create and retrieve passwords for web- or desktop-based applications.
  • Minimize to tray for convenient access when you need it.

There are two ways to download Pwdhash Sharp 0.8.4.  You can either download the .deb for your platform from the release page, or you can get uploads via my personal PPA.  The benefits of the PPA is that you will receive automatic updates of pwdhash-sharp as they occur, just like all other programs in Ubuntu.  To add it:

  • In the panel, select System > Administration > Software Sources
  • Select the “Third-Party Software” tab, and “Add…” to add a new entry.  In the popup, enter the line:
deb http://ppa.launchpad.net/swegner/ubuntu hardy main
  • Close the software sources manager, and allow the repository cache to reload.  Now, you can install pwdhash-sharp from your favorite package manager.  On the command line:
sudo aptitude install pwdhash-sharp

Once installed, you can launch it from the “Accessories” submenu.  Use it just like the form on the pwdhash.com website.

I’m pretty happy with the project so far, but it’s by no means complete.  It’s been a learning experience in packaging for Ubuntu, as well as developing using Mono and GtkSharp.  There’s still a few bugs to work out, and some features that I’d like to add.  Namely:

  • For some reason, Pwdhash Sharp can’t be launched from within Gnome Do.  Anybody have this issue?
  • I’d like to add some preferences to automatically copy generated passwords to the clipboard.  Also, it might be useful to automatically minimize, and “forget” the previous site password, for security reasons.
  • Also, “man” pages aren’t generated correctly, but this seems to be a packaging issue.
  • It would also be nice to port to Windows, and should be relatively easy since it’s in C#.  I could either do a Gtk port, or use a native Windows interface.  Anybody interested in helping?

So, give Pwdhash Sharp a try, and let me know what you think.  I’m open to suggestions and feature requests.

PS: The PwdHash algorithm generates only pseudo-random passwords, which could be decrypted, given at least half of the key.  Can anybody figure out the password in the screenshot?


Jun 28 2008

Hello Planet Ubuntu Users!

Tag: blogging, ubuntuScott Wegner @ 2:05 pm

As of yesterday, I am now being syndicated by Ubuntu Weblogs. This is pretty exciting for me because I’ve been reading others’ blogs there for quite a while, and now I’m finally able to become a part of it.

For those of you reading from Ubuntu Weblogs– hello! A little about myself– my name is Scott Wegner, and I’m a student at the University of Illinois, Champaign-Urbana, studying Computer Science. I’ve been using Ubuntu for about 2 years, and have already started converting my family members. I enjoy posting about Ubuntu news, tutorials, and projects that I’m working on (more on that later). You’ll also see an occasional post on music, politics, and life in general. My blog, automaticable, is actually a culmination of thoughts and posts from my brothers and I. I’ve only syndicated my own content, so check out the blog to read the rest.

For those reading from automaticable, you shouldn’t really notice a change. If you’ve never read it, I suggest you check out Ubuntu Weblogs– there’s a lot of really great content there.


Jun 25 2008

How To: Host a Subversion Repository in Ubuntu Hardy

Tag: deep thoughts, diy, food, how-to, linux, open source, review, software, ubuntuScott Wegner @ 10:46 pm

Have you ever wanted to set up a subversion repository on your home computer? Whether it be for a new software project, versioning your personal documents, or any other reason, there are many benefits to using version control. Some free websites that will host your project for you, such as SourceForge or Google Code, but it’s often necessary to have a little bit more control.

I set up a subversion repository for a new project the other day, and the process was relatively painless. I’m using a standard Ubuntu Hardy Heron 8.04 desktop setup, with OpenDNS and DD-WRT for port-forwarding, and without an Apache web server. Keep reading to host your own subversion repository server.

Continue reading “How To: Host a Subversion Repository in Ubuntu Hardy”


Next Page »