Making Ubuntu default to using the USB sound card

The nVidia video card in my machine also gets registered as a sound card. There appears to be a high definition audio (HDA) chip on it that gets automatically detected and made default.

To get sound through my USB sound card, I’ve had to add the following to /etc/udev/rules.d/00_local.rules:

# Default to using additional (USB) sound cards when they are available.
KERNEL==”pcmC[D0-9cp]*”, ACTION==”add”, PROGRAM=”/bin/sh -c ‘K=%k; K=$${K#pcmC}; K=$${K%%D*}; echo defaults.ctl.card $$K > /etc/asound.conf; echo defaults.pcm.card $$K >>/etc/asound.conf'”
KERNEL==”pcmC[D0-9cp]*”, ACTION==”remove”, PROGRAM=”/bin/sh -c ‘echo defaults.ctl.card 0 > /etc/asound.conf; echo defaults.pcm.card 0 >>/etc/asound.conf'” 

Any new applications that launch will default to using the USB sound card.

Why can’t anything be simple?

Lubuntu touchpad configuration

While minimalism is good, too much minimalism can be a real drag. Lubuntu doesn’t come with a touch pad configuration app, so you’ll have to work with the command line.

To get an idea of the options you can configure, run the following command: 

synclient -l

Edge scrolling and two finger scrolling is enabled by default. This is overkill on my laptop, and edge scrolling is especially troublesome as my touchpad is tiny. I noticed that the mouse cursor was jumping all over the place while I’m typing. After a little digging, it turns out that this is because palm detection is disabled by default and thus the touchpad is responding to my palm. 

We fix this by running the following command in the terminal:

synclient PalmDetect=1 VertEdgeScroll=0

To persist these settings across restarts, edit the autostart configuration file by issuing the following command:

gksudo leafpad /etc/xdg/lxsession/Lubuntu/autostart

Add the following line to the end of the file:

@synclient PalmDetect=1 VertEdgeScroll=0

And we’re done. Sit back and enjoy your newly configured sensible touchpad behaviour.


Finder sucks

I don’t spend much time on a Mac, but when I do I’ve always been underwhelmed by Finder. These are two of my main gripes:

  1. Why is there no easy way of viewing hidden files? There is no keyboard short cut, menu item, or even preference to toggle this functionality. Feeling thick, I turned to Google. Turns out you have to hack around in the terminal to enable this functionality! 
  2. Why is the Home folder not easily accessible? When you launch Finder, you’re taken to “All My Files”. In the side panel, there are 6+ navigation options with things like Desktop, Documents, Air Drop (eh?), Applications, Pictures, Movies, etc but no Home. Thus if you were foolish enough to store your work in a folder called Projects, you’ll be left scratching your head as to how you’d get to it. Never fear, the keyboard combination CMD+SHIFT+H to the rescue. If you thought Finder was bad, wait till you see the file open/save dialog. No Home button for you there, so you need to remember the magic CMD+SHIFT+H keyboard short cut or you’re never going to see your documents again. Nevertheless, I’m happy to report that Google provided a fix.

I have never used a file manager (Windows Explorer, PacmanFM, Nautilus) that didn’t provide an easy way to accomplish the mentioned tasks. Why are they missing from Finder? Why?! Do they have focus groups down in Cupertino?