« General | Main | Music »

Tuesday, April 24, 2007

Partition Manager

I recently used the GParted partition editor to split and dual boot my Vista laptop. This (well, at least the version I used) is a Live Linux CD - you put it into your CD drive, reboot your machine, and run the editor. It then does its thing, and voila - your partitions are changed! It was a fairly easy process, but, as all these type of activities are, a bit nerve racking. When you're playing around with that much data, you wonder if it's going to come back alive. It did, though!

I haven't put Linux on my laptop yet, but I'm considering it. Hopefully the partition editor will work its magic again without any issues.

Before you use, though, backup, backup, backup!

Permalink: Partition Manager
Posted by at 9:24 PM
Categories: Linux, Technology

Sunday, April 15, 2007

Too Many Files in Ubuntu

In Ubuntu, I got an error of "Too Many Files", and it wouldn't even let me log on. I got this error after updating my distro. So I powered the box off, powered it back on again, and made this change that I found on the net. Hopefully it will fix this issue.

Basically, the operating system appears to be running out of file descriptors, for whatever reason. The default limit is 1024. I increased it

To get the current limit type:

    ulimit -n

To increase or set file descriptor limit per user, modify:

    /etc/security/limits.conf

For example, add:

    your_username hard nofile 32768

This should (hopefully) give you some more breathing space.

Permalink: Too Many Files in Ubuntu
Posted by at 3:58 PM
Categories: Linux

Thursday, January 18, 2007

More Webcamming

Added a cron script to rename the webcam output:

  • streamer -o cam.jpeg 2> /dev/null
  • streamer -o cam.jpeg 2> /dev/nulmv cam.jpeg cam_`date +%y%m%d_%H%M`.jpg

This gives the files a name like cam_070118_1035.jpg. I took a series of these, combined, them, and got a cool time lapse movie of the sun going up and then down again, from the viewpoint of my basement. Well, not an exciting subject, but a cool beginning.

Permalink: More Webcamming
Posted by at 11:26 PM
Categories: Linux

Monday, January 15, 2007

Installing a Webcam in Ubuntu Edgy

Here are my notes about how to install a webcam in Ubuntu Edgy. Please note that I am not yet successful, but I have made some progress so that hopefully someone will find this somewhat useful.

  • Read this page first. Also check out this page, which is more specific to my camera (see below).
  • Modify the /etc/apt/sources.list file by typing "sudo vi /etc/apt/sources.list".
  • Make sure that the universe repository is uncommented.
  • Add 'deb http://blognux.free.fr debian unstable main' to install easycam.
  • Run 'sudo apt-get update' to update the software listings
  • Run 'sudo apt-get install easycam'
  • Run 'sudo apt-get install camorama'.
  • Run 'sudo apt-get install xawtv'

You should be able to run easycam from the System->Administration menu. Unfortunately, my cam (ID 2770:9120 NHJ, Ltd Che-ez! Snap / iClick Tiny VGA Digital Camera) wouldn't autodetect. Looks like someone has here.

I changed /usr/share/EasyCam2/drivers/sqcam to comment out sq905.c, line 855 (USB owner).

Replace the line:

  • if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {

with:

  • if (remap_pfn_range(vma, start, page >> PAGE_SHIFT, PAGE_SIZE, PAGE_SHARED)) {

Save and close. Compile with 'sudo make'.

If that doesn't work due to a missing build directory, do the following:

  • cd /lib/modules/2.6.17-11-386 (or whatever uname -r gives you)
  • mkdir build
  • cd build
  • sudo ln -s /boot/config-2.6.17-11-386 .config (Fix as appropriate)

$ sudo cp sqcam.ko /lib/modules/`uname -r`/kernel/drivers/usb/media/ (I had to create the media directory)

$ sudo depmod -a (this command took a long time to execute)

$ sudo modprobe sqcam

I had to reboot once after playing with the driver. If you need to replace the driver, use 'sudo modprobe -r sqcam' to remove the driver, before recopying the driver.

I tested with xawtv, as it seemed to detect everything better. I then added a script to take shots with streamer:

  • streamer -o xxx.jpeg

Streamer seems to like the jpeg extention better, so I just used that command, then renamed the resulting file to jpg.

Permalink: Installing a Webcam in Ubuntu Edgy
Posted by at 11:25 PM
Edited on: Friday, February 16, 2007 9:04 PM
Categories: Linux