Archive for November, 2007

‘fuser’ linux command

Monday, November 26th, 2007

I recently learned about the fuser command, which may be useful when I want to unmount a file system that is in use (lsof is also handy):

fuser -mu /media/USBFLASH   # list pids and usernames with files open
fuser -muki /media/USBFLASH # kill, with a prompt, pids with open files

However, a lazy unmount is often sufficient:

umount -l /media/USBFLASH

Microphone setup for Linux and Skype

Monday, November 26th, 2007

To get my microphone working in Fedora 8 with Skype Beta 2.0, here’s what I did:

  1. Run ‘alsaconfig’
  2. Press TAB -> Select ‘Capture’, and increase it to 100%

Laptop hard drive lifetime (load cycles)

Monday, November 26th, 2007

Run the following:

$ sudo smartctl -A /dev/sda | grep -P 'Load_Cycle|ATTRIB'

And see something like this:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       6038

The last value is the number of load cycles. A laptop hard drive typically has a lifetime of 600,000 load cycles. If the count is increasing by several thousand per day (or even several hundred), it may be cause for concern.

For information and how to fix it, see http://lwn.net/Articles/256769/

The journey to Fedora 8

Monday, November 26th, 2007

I’ve upgraded our family laptop to Fedora 8 (yes, we still dual boot into Windows Vista). The upgrade would have been a rather bumpy ride, except that I knew that Fedora 8 upgrades are problematic (installs are OK), and that there’s a workaround.

While Fedora 7 supported our laptop fairly well, Fedora 8 is even better. The power savings features are better. The Fedora community has tracked down and fixed several programs that were power hogs. The screen dims automatically while on battery power after about 30 seconds. File systems are reportedly mounted with the new ‘relatime’ option, which saves on hard drive battery usage — unless you upgrade, in which case, you have to add it manually. Improved wireless drivers in combination with an improved Network Manager connect more reliably, and more quickly, to our WPA2 access point.

FreeNX broken, and manually fixed

I use FreeNX regularly to connect to a remote linux box. When I upgraded one machine to Fedora 8, I couldn’t connect using an NX client. I found a suggestion that helped me fix it: Edit /usr/libexec/nx/nxnode and replace DISPLAY="unix:$display" with DISPLAY=":$display" everywhere. Hopefully, someone will re-roll the FreeNX packages to fix this for Fedora 8.

Ubuntu sidenote

I’ve heard the claim that Ubuntu is more ready for the desktop than Fedora, and up to this point, I didn’t know how that could be. Last weekend, I plugged a Logitech quick cam into my brother’s Ubuntu system. I was trying to figure out how to load the webcam driver, when we discovered that Ubuntu had already recognized the webcam, and it was ready to use.