From the category archives:

Linux/Ubuntu

A new version of Ubuntu (Intrepid Ibex) is coming out this week, so I’m trying out the release candidate. Here’s an annoyance I hit and how to solve it. I keep a list of steps to perform after installing Ubuntu, and one of my steps is

Drag the bottommost taskbar/panel to the right and the topmost taskbar/panel to the bottom.

I like my “start menu” at the bottom of the screen like Windows does rather than at the top of the screen like Apple’s Mac OS X does. Dragging the bottom panel to the right works fine, but dragging the top panel to the bottom of the screen didn’t work! So I do what any GNOME user would do: I right-click the panel, select “Properties,” and try to set the Orientation from “Top” to “Bottom” in the General tab. Except I can’t.

Instead, I see the message “Some of these properties are locked down”. So I do a Google search for that exact phrase. There’s not many pages that match that phrase, and most of them are translation pages. Grr. That means that not many people have encountered this problem before. After a little query rejiggering, I search for [gnome panel properties locked down] and find this Ubuntu forum thread in which the person says

It sounds like your gnome-panel is locked down. You can remedy this from gconf-editor. Start it from the quick launch dialogue (ALT+F2) or from the terminal: [with the command] gconf-editor

Once the editor has opened, navigate to “apps” > “panel” > “global”, and uncheck the key called “locked_down”.

Great! That sounds easy. I fire up gconf-editor and navigate to that spot, only to find that apps/panel/global isn’t set to locked_down. Hmm. Maybe there’s another locked_down value that is superseding things somewhere else? I search for locked_down anywhere else in gconf-editor and find something at /schemas/apps/panel/global/locked_down, but the value for that is a “<schema>”, and when I try to edit that, gconf-editor helpfully tells me that “Currently pairs and schemas can’t be edited. This will be changed in a later version.” Grrr. So that schema might be affecting my locked-down panel, but I can’t edit it? This is roughly where I start cursing in my head.

But that’s okay, because I’m a computer science geek. If I have to find a “locked_down” text string in the underlying filesystem, I can do that. I search in all the delightful dot directories in my home directory, and I don’t find any mention of that string. Quick pop quiz: would it be in .dbus, .local, .config, .cache, .gconf, .gconfd, .gnome2, or .gnome2_private? Hey Ubuntu/GNOME developers, do I really need 29 (really!) dot directories after a fresh install?

By the time that I’ve sudo’ed to a root shell and I’m in /etc running “find .* type -f | xargs -i{} grep -i locked_down {}” that’s when I’m cussing out loud. So I take a deep breath, metaphorically step back, and head to the Google again. This time I search for [gnome lock top panel] and the #1 result is this Ubuntu bug which leads me to this GNOME bug.

Browsing those bugs makes it clear what happened. Some non-savvy users with really sensitive touch pads were accidentally dragging their panels all over. The solution was to lock the top panel. I can understand why that decision got made. The discussion on the thread didn’t contain the answer (they were talking about making ALT+drag move the panel and mentioned another discussion about this issue), but it made me rethink what I was doing. GNOME/Ubuntu people were shooting to make accidental drags impossible, but they must have made it possible to drag the panel somehow. So I go back to the panel, right-click on it, and carefully read through the options. Sure enough, there’s an option under the right-click menu: “Allow Panel to be Moved“.

I understand why GNOME or Ubuntu folks decided to lock the top panel: they wanted to avoid accidental click-and-dragging by novice users. And maybe it’s my responsibility to carefully study every new menu when I install a fresh version of Ubuntu, instead of just quickly working through the instructions that I’ve written for myself without scouting out every new option. But if I right-click on a panel and select Properties, it’s pretty utterly useless to tell me “Some of these properties are locked down” without giving me any help on where to unlock the properties. There has got to be some user interface principle that says “Giving people an error message without any pointer on how to fix the error is frustrating.”

Is Intrepid Ibex better in some ways? Absolutely. It identified my display resolution correctly on my Wal-Mart PC that I use as my canary for test driving before I install Ubuntu on an important computer. That’s a first. But for everything that works better in recent versions of Ubuntu, I worry that something else will break. That’s why I predicted that Apple would approach 20% market share this year and not Ubuntu. I still root for Ubuntu and want it to do well, so I’ll keep you posted on what I find as I play with Intrepid Ibex.

{ 23 comments }

This sucks. On some very rare occasions, when I connect an SD card reader to my Ubuntu machine, it freezes. Normally I just reboot and everything is fine. But this time my Ubuntu machine won’t boot, and it shows a message like

Starting up …
Loading, please wait…
kinit: name_to_dev_t(/dev/disk/by-uuid/bd656dcd-04b4-412f-a880-62a6553bd8b) = sda5(8,5)
kinit: trying to resume from /dev/disk/by-uuid/bd656dcd-04b4-412f-a880-62a6553bd8b
kinit: No resume image, doing normal boot…

Then it hangs forever. Any Ubuntu/Linux gurus have suggestions on how to repair my system so it will boot?

Update: I think the machine is fixed now. Thanks to Sérgio Carvalho and Chris Fleming for the suggestions. It looks like somehow my swap partition got messed up, which affected things when my Linux machine got confused about whether my machine had hibernated. The fix was:

- When the machine boots up, press ‘Esc’ to get to the Grub menu
- Select one of the “recovery mode” options. This will boot you up to a single-user root prompt.
- Run “sudo fdisk /dev/sda” (this assumes that your hard drive is at sda)
- Type “p” to see which hard drive partition is labeled “Linux swap”. In my case the partition was /dev/sda5. Type “q” to exist fdisk.
- Type these commands:

sudo swapoff /dev/sda5
(Use whatever partition was labeled as “Linux swap” in fdisk. For me, this was /dev/sda5)
sudo mkswap /dev/sda5
sudo update-initramfs -u

These commands say “Stop using /dev/sda5 as a swap partition,” then mkswap tells your computer to set up /dev/sda5 as a new/fresh swap partition. Finally, update-initramfs with the -u (update) option will generate an initramfs image. The initramfs image is a gzipped blob of data that the Linux kernel unzips into RAM and then mounts to use as an initial file system.
- Type “reboot” and cross your fingers for your machine to boot up. For me, it rebooted just fine and started working normally.

Thanks to everyone who chimed in with an opinion on this.

{ 31 comments }

(I’m going to publish this in rough draft format. I want to get the post live while lots of Ubuntu developers are thinking about Intrepid Ibex.)

I’m a huge fan of Ubuntu Linux. I’ve used many flavors of Linux over the years, and Ubuntu is my favorite by far. So it pains me to write this. For my needs, Ubuntu 8.04 (Hardy Heron) is worse than 7.10 (Gutsy Gibbon). I cannot recommend Hardy Heron at this time, and would instead recommend installing 7.10 for the time being. I sincerely hope that Ubuntu/Canonical developers do more work on the “fit and finish” of Intrepid Ibex, because that has always been a strong point in Ubuntu’s favor.

By the way, I’m not alone in my opinion about Hardy Heron. At SuperHappyDevHouse this past weekend I talked with a fellow techie who had Hardy running on his laptop. He agreed that Hardy has had more issues than Gutsy. And this in-depth post by another Ubuntu fan reaches the same conclusion:

The most important question is — do I recommend Ubuntu 8.04? If I were to answer simply ‘yes’ or ‘no’ the answer would be negative. If you need a good system, that ‘just works’, wait a few months before installing Hardy Heron, until it becomes really stable, as the LTS staple suggests.

Even when someone posts a positive review, you see commenters show up with quite a bit of complaints.

What are the issues?

I’ll try to pick out a few examples. Here’s a small one. I like to use the microGUI theme in metacity. Normally I would click System->Preferences->Appearance and select the Theme tab. Then I could drag the microGUI theme from this web page and drop it directly onto the Theme tab. Dragging and dropping themes was a wonderful little trick, but it didn’t work for me in Hardy Heron. Instead, a small dialog box appears and then disappears so quickly that I can’t even see if it has text on it. Update, 11/22/2008: This works in Intrepid Ibex now.

Here’s a big problem. In Ubuntu 7.10, it was trivially easy to share folders via Samba (SMB) or NFS. You clicked on System->Administration->Shared Folders and followed simple directions there to configure a shared folder. In Ubuntu 8.04, this menu option is gone. According to pages on the web, you may have to drop into a command-line, run “sudo apt-get install nautilus-share” to install a new package “nautilus-share” which has replaced the old shares-admin program, and then reboot or logout/login. Read this bug where people describe how awful this is, including a very user with the handle Thomas Boutell. Yes, it’s probably that Thomas Boutell, and if Boutell says that something is suboptimal, Ubuntu developers should listen. Right now the GUI throws out a cryptic error when what the user actually needs to do is reboot their machine or log out and back in. Here’s what another commenter says:

I can confirm this to be a problem. There is no way to create a share out of the box with the release of 8.04 hardy. This WAS working wonderfully in Gutsy 7.10. There was a folder sharing GUI on the admin menu under system tools, this seems to have been removed from Hardy 8.04.

I happen to agree with the expectations of the [original poster] Thomas Boutell, this should just work out of the box or there should be a readily obvious way to get folder/file sharing working again like it was in Gutsy. Why on earth was a completely functional feature of 7.10 removed from Hardy ?????

[and then the same user later]

This is just plain too much of a hassle: no one should have to go thru this just to share some files on his computer. Help me use linux, not hassle me when I try to use it.

In a related bug about having to reboot or log out and log in again after installing Samba, another user says:

It can be correct for linux security system. But how I can explain to the user, that he should restart his computer for share a folder?! Former windows users will laugh over me.

It sounds like nautilus-share doesn’t let you set your workgroup name either. So I guess you have to edit the smb.conf config file by hand to change your computer’s workgroup? That led one user to remark:

I guess I’m just getting over this phenomenon I’ve started to see in Ubuntu devs and Gnome devs in particular, of just whistling past the graveyard of usability and treating the users like ants at the picnic. The windows shares are BROKEN by any reasonable user’s standards, and a frank acknowledgment of the problem would go a long way.

Update, 11/22/2008: A workaround is to press alt-F2, then enter “shares-admin” and click “General Properties”, click “Unlock” and enter your password and click “Authenticate”, then change the Workgroup name there. You might need to share a folder first (to install Samba), then reboot, then do this change, then reboot again. I ended up editing smb.conf manually to set the workgroup and add whatever sharing I wanted to do.

To me, this feels like a series of choices by the Ubuntu team which may have been locally optimal (”this package has security issues or isn’t maintained — let’s turn it off”) but the net effect of these decisions adds up to a big black eye for Ubuntu. And again, I say this as an Ubuntu fan who wants Ubuntu to succeed. Maybe there wasn’t enough time to shake out bugs in the latest incarnation of GNOME. Maybe it will take a while to find the right pulse rate of software releases. If there’s a plan by Ubuntu/Canonical developers to improve this situation, I encourage them to talk about the future plan in the comments.

That issue encapsulates the sort of thing I’m seeing with Hardy, but let’s talk about a couple more sharing issues I ran into. The problem above was letting other computers connect to Hardy, but what about Hardy connecting to other computers’ shared drives? It used to be that if you click Places->Connect to Server and selected a Windows share, you saw a “Browse Network” button. Now that button is gone for me. I guess you need to know the exact name of the Samba or Windows share that you want to connect to? If so, that’s pretty annoying. It’s also inconsistent, because when I tried to add a printer on a remote machine, I could browse the network from the printer dialog box.

Update, 11/22/2008: In Intrepid Ibex, you can click Places->Network to browse the local network.

I want to talk about one more really annoying problem I ran into. In Gutsy I used “Connect to Server” to create a folder that was connected via ssh to my webhost. If I took a screenshot I could drop the file into that folder and it would magically be copied into a specific deep directory at my webhost. The feature worked perfectly — even better than WinSCP running on a Windows computer.

Now things seem horribly broken. One user asks about it here and includes an image. Evidently a decision was made to switch from something called “gnome-vfs” to something called “gvfs.” I like swapping out old code for new code as much as the next guy, but as a user, this switch is a code phrase for “the stuff that used to work perfectly is now nonfunctional.”

It also looks like someone in GNOME may have decided to change the default location of mounted volumes from $HOME to /, which makes me want to find and punch that person. Or offer them $100 to fix it back to sane behavior.

It’s really quite hard to find out exactly why this simple, useful ability (to create folders that were SSH-connected directly to a specific directory on a remote machine) became broken in Hardy. It appears to have something to do with “bookmarks,” but good luck finding out exactly what’s going on. By the way, if you upgraded from Gutsy to Hardy, all of your carefully-crafted existing shortcuts will break too. This gnome-vfs to gvfs issue is impacting regular Linux (including Fedora) users and causing them to complain. And why not? As one GNOME user states their case, “It should be possible for GNOME users to configure the default path of mounted volumes.”

Are there other annoyances?

As long as I’ve started a complaint thread, I’ll mention a few other things that are on my mind.

  • When I run the Update Manager and install updates, eventually I’m told that “Your system is up-to-date” — but sometimes it isn’t. If I click the “Check” button again, sometimes new updates are found to install. The net result is that I end up checking for updates multiple times, even after I’ve just been told that I’m up-to-date, because my system wasn’t really up-to-date. Please save users the time/effort of checking multiple times for updates and find a way to handle this transparently.
  • The “Hardy Heron” desktop background is sweet, but at 1920×1200 resolution it looks a little fuzzy, as if it had to be scaled up. I would recommend creating a very high-res desktop and then downscaling it so that it’s always sharp, even at the highest resolution.

Okay, that’s my complaints from playing with Hardy Heron for a couple days on my $200 Walmart PC, which I keep around as a guinea pig box for testing. I won’t be installing Hardy on my main Linux box. I might just keep running Gutsy until Intrepid Ibex comes out.

I’m giving my raw perspective as a user, and the upshot is that Hardy Heron feels like a step backwards on the things that matter to me. If I were a GNOME/Ubuntu/Canonical dev, my first reaction would be to leave a comment that says “Matt, you idiot! Don’t you know that XXXXXX is a simple solution for your problem? You didn’t even use the terminology right!” And I’m sure I’ve messed something up, like blaming Ubuntu for a problem that really belongs to GNOME or some other project. But the buck stops with Ubuntu and Canonical. If something in GNOME isn’t ready for prime-time, Ubuntu should hold off until it’s ready. Don’t replace shares-admin with nautilus-share until I can set a workgroup from a GUI. Don’t replace gnome-vfs with gvfs until I can make a drag-and-drop remote folder on my desktop. Don’t replace a sound system until the new sound system is well supported. It’s always a judgment call — I think moving to Firefox 3 was brilliant and acts as a good forcing function to move the community forward. But don’t go with so many new systems that the user experience suffers and Ubuntu takes a goodwill hit.

I love Ubuntu. I want Ubuntu to do well. I want to believe that Ubuntu can romp against the competition. But Hardy Heron feels like a misstep for some users, including me. Please work on fit and finish to get Ubuntu back to the robust, polished distribution that made me fall in love with it in the first place.

{ 70 comments }

Last night I drove into San Francisco for a meeting of the BALUG (Bay Area Linux Users Group). I’d never been to a BALUG meeting before, but Mark Shuttleworth (the founder of the Ubuntu distribution of Linux) was speaking and I wanted to size up Mark in person. He acquitted himself well. He spoke about the good, the bad, and the ugly of open-source as he sees it and then closed with some stories of being the first African into space. Here’s a (somewhat grainy) photo I took as Mark was speaking:

Mark Shuttleworth

A few impressions that I came away with:

- he cares a lot about the Linux desktop experience and likes to focus on that. That’s good, because a lot of people in the Linux community pay attention to the kernel and “user space” doesn’t interest them as much.
- he believes that collaboration should be a strong point of open source. Mark mentioned bug tracking as an example: bug reports and debugging logs should flow seamlessly to developers without a lot of extra work.
- Mark did a good job of giving props to Red Hat, Novell, and even Microsoft when he thought they deserved it. I thought this was an especially wise move and gave him more credibility than if he had taken potshots at competitors. Mark pointed out that Microsoft made software cheaper as a good thing Microsoft has done, although he didn’t see a need to license patents from them. I got the idea that Mark thinks that injecting venom into discussions about open-source doesn’t do favors for the community in the long-term.
- At the same time, Mark said that if open source believes that it has more powerful ideas long-term, open-source proponents shouldn’t shy away from engaging in productive/respectful conversations that may eventually win over (say) manufacturers of proprietary hardware so that they allow open-source drivers.

Overall, Shuttleworth seemed to espouse a nice balance of principles and pragmatism. He was a polished speaker and handled the after-speaking mob of people with grace and good humor, even when some folks wanted to talk about the minutiae of their favorite Linux project for a few minutes. I came away with a higher level of respect for Mark, Ubuntu, and Canonical and my interest level is already pretty high.

The night brought a few other fortuitous surprises. I got a couple tips about where to start hacking on my OLPC, which just arrived a couple days ago (thanks for the pointers, Charles!). I found out about the Alameda County Computer Resource Center, which takes donations of old computers, refurbishes them, and then donates them to school, non-profits, and other people that need a computer.

But my favorite surprise was walking by two people and hearing the phrase “Digital Tipping Point.” I’m a huge fan of the Digital Tipping Point blog. Officially, DTP is an “open source film project about the big changes that open source software will bring to our world.” So the film project includes a lot of individual interviews about open-source. But the reason that I love reading the DTP blog is that it provides anecdotes of open-source success without sarcasm, rancor, or the venom that some blogs have. If you’re a Linux fan, I think you’ll find that Digital Tipping Point is genuinely uplifting and cheerful. I keep Digital Tipping Point in my “fun” folder of Google Reader, so it was a pleasure to meet Christian Einfeldt, the producer of the documentary:

Digital Tipping Point

It was great to run into someone by coincidence and to be able to say “Hey, I love your blog. It brings a smile to my face and is a good example of what I like about the web.” All in all, it was a fun night.

{ 16 comments }

I’m trying to replace my Windows applications with Linux applications. On Windows, I use I use Juice to download podcasts as MP3s. Recently I decided to switch over to Linux for receiving podcasts. After looking around at various podcast catchers (especially ones that ran on the command-line, so that I could automate them with a cron job), I ran across Podracer. I decided to combine Podracer with a script to split long MP3s into shorter MP3s so that I could play them more easily in my car. Here’s what I did on my Ubuntu Linux machine:

Step 1: Install and configure podracer

I used these commands:
sudo apt-get install podracer
mkdir ~/.podracer
vim ~/.podracer/subscriptions
and add the url of a podcast, e.g. http://feeds.webmasterradio.fm/tdsc for The Daily SearchCast.

cp /etc/podracer.conf ~/.podracer/podracer.conf
Edit ~/.podracer/podracer.conf so that you can pick the download directory you want. I changed
#poddir=$HOME/podcasts/$(date +%Y-%m-%d)
to
poddir=$HOME/rawpodcasts
because I want all my podcasts in one directory where I can do a batch process over them afterwards. Go ahead and run “mkdir ~/rawpodcasts” to create the directory that podcasts will be stored in.

sudo vim /usr/bin/podracer
(it’s okay, Podracer is a shell script). Find the line that says
m3u=$(date +%Y-%m-%d)-podcasts.m3u
and comment it out so that podracer won’t automatically create an .m3u playlist as it downloads podcasts.

Run podracer in “catchup” mode to avoid downloading all the old podcasts from your subscriptions with “podracer -c”. podracer will create a file ~/.podracer/podcast.log to keep a record of all the podcasts that have been downloaded (the “-c” catchup mode creates this text file without actually downloading the MP3s). If you want to re-download a file (e.g. while you’re testing your configuration), you can edit the file ~/.podracer/podcast.log and just delete the line for any MP3 you want to re-download.

Step 2: Install and configure mp3splt (optional)

At a terminal window, type “sudo apt-get install mp3splt”. In Step 1, we configured Podracer to download podcasts as MP3s into a “rawpodcasts” directory. In this step, we’re going to take those long MP3s and split them into individual segments into a new “finishedpodcasts” directory. Make the “finishedpodcasts” directory with the command “mkdir ~/finishedpodcasts”.

Make a file /home/username/download-mp3s-and-process.sh that looks like this.

#!/bin/bash

# Run podracer to download any new podcasts
/usr/bin/podracer

# Now split the podcasts into segments
for i in /home/username/rawpodcasts/*.mp3
do
nicename=`basename $i .mp3`
# Send both stderr and stdout to /dev/null so that this is a quiet cron job
mp3splt -eqd /home/username/finishedpodcasts -o $nicename-@n $i &> /dev/null
done

This script will run podracer to download any new podcasts. Then we list all the MP3 files in the rawpodcasts directory and run mp3splt on each podcast. If you had a file test.mp3, you would be running the command

“mp3splt -eqd /home/matt/finishedpodcasts -o test-@n test.mp3 &> /dev/null”

for example. What do the options to mp3splt mean?

-e means “split on sync errors.” If someone created an mp3 by concatenating multiple mp3s (e.g. with a program such as mp3wrap), that could cause sync errors. mp3splt looks at those sync errors to split the concatenated mp3 back into multiple mp3 files.

-q stands for “quiet.” Don’t ask user to respond to any questions. Normally “-e” says something like

Mp3Splt 2.1 (2004/Sep/28) by Matteo Trotta
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
MPEG 1 Layer 3 – 44100 Hz – Joint Stereo – 256 Kb/s – Total time: 35m.04s
Processing file to detect possible split points, please wait…
Total tracks found: 6
Is this a reasonable number of tracks for this file? (y/n)

Quiet mode suppresses this interactive question on the last two lines above.

-d is the directory to place the split mp3s.

-o lets you specific an output file. “@n” stands for the track number after splitting. So if test.mp3 were made out of two mp3 files, the output of the command above would be two files (in the finishedpodcasts directory) named test.mp3-001.mp3 and test.mp3-002.mp3 . It doesn’t hurt to run mp3splt on existing mp3s because it will just overwrite any old files that had been created.

Step 3: Periodically download and process podcasts

To download podcast files periodically and process them, make a crontab entry for podracer or your script. This will make the cron daemon run your script every few hours to download new mp3s.

I typed “crontab -e” and made the file look like this:

# At 3:03 am, 8:03 am, 10:03 am, 12:03 pm, and 4:03 pm, run this script
3 3,8,10,12,16 * * * /home/username/download-mp3s-and-process.sh

Whenever you’re ready to put the podcasts on some type of media (SD Card, iPod, iPhone, whatever), just copy over anything from the finishedpodcasts directory (if you used mp3splt in step 2) or the rawpodcasts directory if you skipped step 2. Then delete anything left over in either directory.

{ 20 comments }