Archive for the ‘Linux’ Category

Linux sucks – Getting Skype working

Monday, October 20th, 2008

Months after intially installing Skype, I finally got it to work properly (i.e. not conflict with music players / YouTube / etc).  It took way too much Googling and I spent a lot of time trying suggestions that ended up not working, but eventually I found a solution (full thread) on the Ubuntu Forums that almost works. These are the steps that actually worked for me:

  1. Put this into ~/.asoundrc (create the file if it doesn’t exist):
    pcm.skypeout
    {
        type plug
        slave.pcm "dmix"
    }
    ctl.skypeout
    {
        type hw
        card 0
    }
    pcm.skypein
    {
        type plug
        slave.pcm "dsnoop"
    }
    ctl.skypein
    {
        type hw
        card 0
    }
  2. Edit /etc/pulse/default.pa as root (I can’t figure out a “nice” way to do this from the GUI, but in a terminal you could try “sudo gedit /etc/pulse/default.pa” – I used vim).
    1. Comment out “load-module module-hal-detect”
    2. Find the “module-alsa-sink” and “module-alsa-source” sections and add these two lines:
      load-module module-alsa-sink device=dmix sink_name=output
      load-module module-alsa-source device=hw:0,0

      On my Desktop PC, I used “device=hw:SB,0″ rather than “device=hw:0,0″.

      I’ve attached a patch that you can use to automate this (“sudo patch -p0 -d /etc/pulse < default.pa.diff”)

  3. Restart PulseAudio (or reboot).  You can restart PulseAudio by running this in a terminal:
    killall pulseaudio && pulseaudio &

    I got some error messages, but you can ignore them.

  4. Try Skype.  If it still isn’t playing nice with other applications, go to the Sound Devices section in Skype’s settings and change “Sound In” to skypein, and “Sound Out” and “Ringing” to skypeout.
  5. If Skype still isn’t working, go back to step 2, but instead of “hw:0,0″, try other values like “hw:SB,0″; if that doesn’t work, you’re going to need to do some more Googling.

There are three things that suck:

  • It doesn’t work out of the box
  • There is no obvious way to edit a config file in /etc (this requires root privileges, but “Text Editor” doesn’t use the graphical sudo functionality to get the privileges it needs)
  • Following this advice means that in a future upgrade (maybe to 8.10, for example) you risk having to merge differences between your hacked “default.pa” and the maintainer’s version; this would be unreasonably difficult for most people to understand.

Linux sucks – Data Recovery / Dirty Filesystems

Sunday, October 12th, 2008

Most of my “linux sucks” complaints have stemmed from issues I ran into over a period of a year. However, I discovered this issue today when trying to recover data from an older hard drive that was dying (during bootup, the BIOS warned me that SMART indicated “imminent” failure and said that I should immediately back up my data; before this, Windows had stopped responding). The drive still largely worked, but would produce numerous read failures; any accesses were extremely slow.

I put the drive into a USB enclosure (they make this stuff so much easier!) and connected it to my Ubuntu box:"Cannot mount volume" error message

I clicked details to see what was going on:"Cannot mount volume" error dialog, with details

This is pretty awful. The text looks like something a command-line tool spewed, shoved into a GUI that didn’t respect the line breaks. Getting to the actual content, neither choice is very good. Choice 1 would require a Windows box. Choice 2 involves forcing something “for your own responsibility”. What does that mean? Ignoring the Engrish, I’m assuming it means “at your own risk” and that I may lose data, but I have no idea how likely data loss is. Is it the usual risk associated with an unclean shutdown (which most people I know are willing to accept), or is it significantly higher? From a more technical perspective, is there more risk than there would be if I used Windows? (Is the Linux NTFS driver less robust?) Of course, neither option actually works:

Attempting to force-mount my drive

Attempting to mount my drive using

I happen to know I need to be root (and how to become root), but a hypothetical family member / significant other using my PC would not.

Things that need to change:

  1. The “Cannot mount volume” dialog needs to be intelligent enough to do more than to just show the raw output from /bin/mount. If it’s going to suggest editing fstab (a horrible solution, with long-term consequences), it needs to be clear about how to edit it as root.
  2. Forcing a mount needs to be something that can be done from within the GUI.
  3. If there is a fsck.ntfs, it should automatically run; I should be notified that this is happening and be notified again when it has completed. If there is no fsck.ntfs, someone needs to write one. I can’t find one.

I know NTFS under Linux has been flaky in the past, so for now I’m going to use a Windows box to fix the situation (fortunately, I have one available). If people are trying to make Linux more accessible to “normal users”, then it’s important to handle this kind of situation better. As it is right now, Linux is not a good way to back up files from a dying NTFS drive (if the drive is working, it’s likely to be clean anyway).

Linux sucks – Directory/Folder Pickers

Thursday, September 4th, 2008

One of the frustrations I’ve run into while using Linux has been with saving screenshots.  At first glance, the interface is much better than Windows’, because pressing the Print Screen key brings up a dialog that lets you save your screenshot to a file easily:

The GNOME Screenshot application

The GNOME Screenshot application

At this point, you’re much better off that you’d be on Windows (which either requires extra steps, or requires you to install 3rd-party applications).  However, you’re also a lot worse off than you realize.  This screenshot application sucks!

  1. When picking which folder to save a screenshot in, you’re presented with a list of directories – your “Places” (Home directory, Desktop, USB sticks, etc) and the directory you most recently saved to (in the example below, “filepicker”).  This looks good until you realize you might have multiple directories called “filepicker” and have no way of telling which one you’re looking at.  “filepicker” is reasonably unique, but I have multiple directories named “tmp” (/tmp, /var/www/tmp, /home/chris/tmp) and I usually dump a screenshot into one of these directories until I have a chance to edit it (e.g crop it in an image editing application). There is no way to tell what directory you’re really saving to.

    The GNOME Screenshot application; list of directories

    The GNOME Screenshot application: list of directories to save pictures in

  2. It gets worse.  If you choose “Other…” you’re presented with a directory picker:
    The GNOME Screenshot application: directory chooser

    The GNOME Screenshot application: directory chooser

    This doesn’t look too bad until you try using it.  In this screenshot, it looks like pressing “Open” would save the screenshot to /tmp/guest/tmp: note the “Location” bar and the highlighted item.  Despite this, it actually would save to /tmp/guest.  The “Location” bar just exists to trick you.  If, given the situation in the picture above, I typed a path into it (e.g. /home/guest/Desktop/tmp) and pressed Enter, the screenshot would still be saved to /tmp/guest!  This dialog lies to you if you type a path manually, and lies to you if you select a directory and choose “Open”. The only way to get it to do what you want is to actually navigate into the directory you want to use, then press “Open” (and ignore any text in the “Location” bar and any selected directories in the list).

  3. It still gets worse.  If, after navigating to the right folder, you try to type a filename into the “Location” bar (e.g. Picture.png), it creates a directory (in this case, it would create a directory called “Picture.png”) and uses that directory to save the screenshot.  You still have to type the filename when you’re back to the main Screenshot application window.
  4. It gets even worse.  If you want to save time and just type a full path into the “Name” field on the main screen, it appears to work, but doesn’t actually save the screenshot!  It fails silently!

This is some of the worst usability I’ve ever seen.  There are plenty of applications that aren’t very intuitive and are hard to use, but the deception here is in a league of its own.  I created a brief video that highlights some of these issues – you can watch it after the jump.

(more…)

Linux sucks – Binary Compatibility

Tuesday, September 2nd, 2008

Using Linux in the real world can be exceedingly frustrating if your employer allows VPN access (or you use VMware).  Every time your kernel is updated, you have to recompile the Cisco VPN modules; frequently, kernel updates consist entirely of changes that are irrelevant to any given installation.  Occasionally they don’t actually change anything (“no-change rebuild“) but for some reason Ubuntu still needs to update.

Linux isn’t like Windows either.  On Windows, if you need to update a driver, you update that driver.  On Linux, if you need to update a driver, you usually* have to update your whole kernel (unless you want to play risky games with back-porting, which isn’t realistic anyway unless you’re a developer or know one).  My point here is that you’re going to be updating your kernel more frequently than someone coming from Windows might expect, so any consequences of kernel updates are magnified.

*The exception to this is a driver for esoteric or new hardware that hasn’t become part of the kernel yet; in those situations you usually have to use a manual process to update and recompile the driver.  Of course, you also get to recompile these drivers when you update your kernel.

It gets worse – not only do you frequently have to recompile the Cisco VPN module, but sometimes it breaks entirely.  When a kernel API used by the VPN module changes, you have to hack the VPN module’s code to get it working again (usually this involves extensive googling to find a patch someone else has already written).  Sometimes you just have to wait for Cisco to release updated software that supports the new kernel release.  This is really obnoxious.  Is it Ciscos’ fault?  Sure.  Is it a problem under other operating systems?  No.  Is putting some of the blame on Linux reasonable?  Yes.

Some might suggest not using VPN (a ridiculous solution that precludes working remotely) or using different VPN software, but if the IT support staff you deal with only supports Cisco VPN, those aren’t good options.

It occurred to me that I could work around this problem by running the VPN client with in a VMware virtual machine – and use a specific kernel release inside the virtual machine.  This almost works, but unfortunately VMware has its own kernel modules which also need to be recompiled when the kernel is updated.  Just to add to the fun, if you try to launch VMware Player after updating your kernel, it fails silently!  The only way to tell what went wrong is to launch it from a text console, in which case it tells you to rerun the setup scripts (which recompile the modules for you).

The whole philosophy that everything should be GPL-licensed and included in the kernel doesn’t acknowledge the real world.  Some companies do write proprietary software, and having a real job in the real world sometimes means using that proprietary software.

(I’m not even going to get started on the glibc version incompatibility issues… maybe in a future post).

Linux sucks – Keyboard Shortcuts

Monday, September 1st, 2008

The default keyboard shortcuts in Linux suck*. The shortcut for locking the screen is ctrl+alt+L, which sounds reasonable until you load up emacs and try to use the “previous buffer” shortcut (which happens to be ctrl+alt+L). There are other shortcuts that use ctrl+alt+[letter] too.  All of these shortcuts should use the “Windows” key by default.  It’s been years since I’ve seen a keyboard that didn’t have a Windows key, and on Windows many shortcuts do use the Windows key.  It also seems pretty stupid that the Windows key doesn’t bring up my Applications menu by default.

You’d think the solution would be simple: System->Preferences->Keyboard Shortcuts, but you’d be wrong.  The Windows key can’t be treated as a modifier key – you can’t set a shortcut to be “Super+L” (the Windows key is called Super for some reason).  If you try to set a shortcut to e.g. the Windows key and D, you’ll just end up with just the Windows key as your shortcut.  I’ve found that for Compiz shortcuts, the Windows key is correctly treated as a modifier, but all the GNOME stuff (in particular, locking the screen) treats it incorrectly.

Punishing users because you don’t like a logo sucks.

*in this particular case, my complaint may very be specific to Ubuntu + GNOME, but see my statement in my original post explaining why I still blame “Linux”

Linux sucks – Firefox

Sunday, August 31st, 2008

The default browser in Windows has a feature called “autoscroll” which makes scrolling in web pages using the middle mouse button very convenient. It also has a convenient single-keystroke shortcut for going back to the previous page: backspace. Firefox on Windows offers this same behavior.

Firefox on Linux behaves very differently. Despite the fact that Linux is now a modern desktop operating system (theoretically usable by “normal people”), many of its applications stick to archaic conventions, presumably to avoid irritating long-time users. Autoscroll and backspace-goes-back are both disabled by default on Linux, and can only be enabled by toggling hidden preferences in the about:config feature (which presents the user with a scary warning before allowing them in). I don’t really know why the backspace feature is disabled, but autoscroll is probably disabled because in the past it may have conflicted with an archaic feature that also used the middle mouse button: contentLoadURL. contentLoadURL was a dangerous feature, which would attempt to use whatever you had copied to your clipboard as a URL whenever you middle-clicked. I call it “dangerous” because with the advent of tabbed browsing middle-clicking went from something done rarely to something done all the time – and any time you missed a link you were trying middle-click you’d end up on some random page (or an alert would pop up, telling you you’re trying to load an invalid location). Fortunately this horrible feature is disabled by default nowadays, but autoscroll still hasn’t been enabled.

One might argue that following conventions is good, but conventions on Linux are tricky; you can follow archaic conventions from the days when users were expected to understand the differences between PRIMARY and CLIPBOARD, or you can follow conventions that 99% of computer users nowadays are used to.

While all of this is clearly Firefox’s fault and there are plenty of other browsers to choose from, Firefox is the default browser and the only reasonable choice (many websites block browsers other than Microsoft Internet Explorer and Firefox, and others render incorrectly in other browsers).

The solution to this, by the way, is to go to the URL about:config and set browser.backspace_action to 0 and general.autoScroll to true. You may also want to set browser.urlbar.doubleClickSelectsAll to false to get more Windows-like behavior.

Update Oct 12: Using the default Ubuntu theme and Gnome options, the tab strip doesn’t have enough empty space. It’s nearly impossible to drag links between two existing tabs because the target area is extremely small (you always end up dropping things on an existing tab), and it’s also impossible to double-click empty space to create a new tab (there is no “empty space” that I can find).

Linux sucks – Sound

Sunday, August 31st, 2008

Sound on Linux sucks.  This has been an issue since the beginning, and it has gotten a lot better, but it still really sucks.  Any given application is likely to support only a subset of the numerous sound systems (OSS, Esound, aRts, ALSA, PulseAudio) and if it doesn’t support the one you use you’re likely to run into at least some trouble.  Sometimes there are wrappers available (intended to make it possible for a technically-inclined user to get problematic applications working) but they’re not 100%.

The root of this complaint in my case is Skype.  Yes, it’s an evil proprietary baby-seal-clubbing binary, but it’s what my friends use to communicate and it’s the #1 VoIP app.  In order to get Skype to work properly, I have to quit all other applications that are playing sound, even if they’re not currently doing it.  I can’t leave Rhythmbox paused – I have to quit.  If I’ve watched a single YouTube video with sound, I have to quit Firefox (this is really obnoxious if it means I’ll have to log in to a site again after Skyping).  If any music application is still open, Skype just gives me a lot of:

ALSA lib ../../../src/pcm/pcm_dmix.c:874:(snd_pcm_dmix_open) unable to open slave

I’ve tried using the padsp wrapper with the statically-linked OSS skype binary (honestly, should anyone really have to know any of those terms just to chat online???) but the sound quality is basically unusable due to static noise.  I can understand the desire of developers to rectify mistakes in previous sound subsystems, but not providing seamless backwards-compatibility paths for at least ALSA and OSS seems inexcusable to me.  Note that I would be in the same situation if I had an old open-source application that was just unmaintained and too complex for a hobbyist developer to fix – this problem is not inherently caused by Skype’s closed-source nature.

I can’t even remember having issues like this in Windows in the past 10 years.

Update: After a few months, I eventually got Skype working!

Linux sucks

Sunday, August 31st, 2008

I am a linux user.  I currently use 64-bit Ubuntu 8.10 as my primary OS on my home PC, and various versions of RHEL at work.  I used Linux on and off in the late 90s, and I’ve been using it consistently since 2001.  I switched to using linux full-time at home about a year ago; it had finally reached the point for me where enough things worked well enough that I was willing to give it a serious try (and I wasn’t sure which of my XP CD keys was not already in use when I built my latest PC).  Over all, it works pretty well.  Unfortunately, there are things about it that I really hate – and that’s what this series of posts will be about.  My complaints may be universally ignored or merely prompt flamewars, but if I’m lucky, some good might come from it (it’d be great if a complaint motivated someone skilled to fix one of my issues).

I feel qualified to complain because I can tell whether or not something works.  I’m not a chef, but I know when something tastes bad.  I am a (hobbyist) developer and have contributed extensively to the various Mozilla projects (Firefox, Thunderbird, SeaMonkey).  While it might be possible for me to fix some of these issues myself, I really don’t have the time anymore to learn another large codebase.  “Patches welcome” isn’t a helpful response.

Technically, very few of my complaints are about the Linux kernel itself, but from a practical standpoint this is irrelevant.  If I have a problem with Gnome and I don’t have that problem with Windows or Mac OS, for all practical purposes it is a problem with Linux.  “You could use KDE” is not a solution – free software often provides many programs that can accomplish a given task, but they all suck in one or more ways.  Some of my complaints are related to proprietary binary-only applications (or drivers), but again, they work in more mainstream operating systems.

Stay tuned for the first post.