Passing parameters to modules in Ubuntu

December 18th, 2008 Alex Posted in linux Comments Off

In this example, I pass the parameter “card=42″ to the module “saa7134″ when the module loads at boot time.

  1. Add your module to /etc/modules


    # /etc/modules: kernel modules to load at boot time.
    #
    # This file contains the names of kernel modules
    # that should be loaded at boot time, one per line.
    # Lines beginning with "#" are ignored.
    saa7134

  2. Add options saa7134 card=42 to the end of /etc/modprobe.d/options

    # Enable double-buffering so gstreamer et. al. work
    options quickcam compatible=2

    # Default hostap to managed mode
    options hostap_pci iw_mode=2
    options hostap_cs iw_mode=2

    # Stop auto-association.
    # LP: #264104
    options ipw2200 associate=0

    # XXX: Ignore HPA by default. Needs to be revisted in jaunty
    options libata ignore_hpa=1

    options saa7134 card=42

Now reboot and you should be all set.

AddThis Social Bookmark Button

Really cheap and well rated GPS USB adaptors for laptop/netbook

December 6th, 2008 Alex Posted in electronics, hardware, linux, windows Comments Off

GLOBALSAT BU353 Waterproof USB GPS Receiver

  • GARMIN 010-00321-00 GPS 18 Deluxe USB Sensor
  • The Globalsat BU-353 would be my first choice, it has very good reviews and it is waterproof.

    AddThis Social Bookmark Button

    Backup your Firefox Passwords

    December 5th, 2008 Alex Posted in linux, web, windows Comments Off

    There are only 3 files you need to backup:

    • signons.txt
    • signons2.txt
    • key3.db

    You can find those in your Firefox profile:

    Linux

    ~/.mozilla/firefox/xxxxxxxx.default/

    Windows

    1. Click the Windows Start button, and select Run….
    2. Type in %APPDATA%\Mozilla\Firefox\Profiles\ then click OK.

    You can then copy those file to another computer in your Firefox profile to use them.

    AddThis Social Bookmark Button

    Linux Mass Rename Recursively using a Bash Script

    September 14th, 2008 Alex Posted in linux, productivity Comments Off

    This example Bash script replaces “.JPG” with “.jpg” recursively in the current directory (It can handle filenames with spaces):


    #!/bin/bash

    find ./ -type f -name "*.JPG" | while read FILE
    do
    newname=`echo $FILE | sed s/.JPG/.jpg/`
    echo $newname
    mv "$FILE" "$newname"
    done

    Convert all characters to lowercase:


    #!/bin/bash

    find ./ -type f -name "*" | while read FILE
    do
    newname=`echo $FILE | tr 'a-z' 'A-Z'`
    echo $newname
    mv "$FILE" "$newname"
    done

    AddThis Social Bookmark Button

    Active Perl’s Package Manager: ppm

    August 6th, 2008 Alex Posted in perl, programming, slackware Comments Off

    It allows you to get Perl pre-compiled packages. You can avoid installing a C compiler which is needed for some packages (KinoSearch for example).

    http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/

    Alternate packages repositories:
    http://cpan.uwinnipeg.ca/PPMPackages/10xx/

    AddThis Social Bookmark Button