Sunday, October 4, 2009

ps3eye and ubuntu 9.10 karmic koala

Updated to ubuntu 9.10 today. Yay! It looks very nice, and the only issues I had were with the darn wifi firmware.

Here are the steps I went through to get the ps3eye (playstation 3 eye) webcam to work under ubuntu.

First follow the directions on this site:
http://kaswy.free.fr/?q=en/node/53

I do not know if all of these steps are critical. I will test that out after the next kernel upgrade. A few of the steps also need to be changes. For instance:
ln -s linux-2.6. linux
should be
ln -s linux-source-2.6. linux
and
cp /usr/src/linux-headers-2.6./Module.symvers /usr/src/linux
should be
cp /usr/src/linux-headers-2.6.-generic/Module.symvers /usr/src/linux
at least they were for my machine (a fresh install of ubuntu 9.10)

I have to say, kaswy did some amazing work here. 1,000,000 points to kaswy for being awesome! After this the ps3eye camera should work. However...

The audio was broken for me. I went through a few steps, but I believe the critical steps were:
kill pulse audio: pulseaudio -k
remove pulseaudio configuration: rm ~/.pulse
regenerate pulseaudio configuration: sudo dpkg-reconfigure pulseaudio

To get pulseaudio to see the ps3eye microphones, plug in the camera, and then go to your sound preferences in ubuntu. Switch to the 'input' tab, and then select the playstation eye.

Also, as a final note, to get the camera working in skype, you need to install the libv4l-dev package and run skype using the following command:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype

Sunday, August 16, 2009

mac os x 10.5.8 virtualenv

So in trying to setup the macbook pro that I got for my new job I needed to setup a virtual environment for python. The way I understand it, mac os x 10.5 (leopard) comes packaged with python, which lives at /Library/Frameworks/Python.framework/Versions/4.3.0/. This might not be the default as I'm still trying to get my mac legs so-to-speak, and may be a result of installing the enthought python package but either way I wanted to setup a virtual python environment to that any programs I install do not interfere with the existing python setup. This is where the virtualenv python package comes in.

Here are the basic steps I had to go through to setup a usable virtual environment for python.
  1. Install enthought python
  2. Configure enthought python repositories: enthought defaults to using it's own repository which requires a username and password. So...
    1. open /Library/Frameworks/Python.framework/Version/4.3.0/lib/python2.5/site-packages/.enstallerrc
    2. edit the [repos] section to list only the following line: 1 = http://pypi.python.org/simple,index
    3. save the file
  3. Install virtualenv: run: /Library/Frameworks/Python.framework/Versions/4.3.0/bin/easy_install virtualenv
  4. Make the virtual environment: run: virtualenv
  5. Now for some reason mac os x doesn't like python accessing the screen so there is a separate pythonw that you have to run for graphical apps (like scipy). However, virtualenv does not create a pythonw in the /myPython/bin directory. So...
    1. download install_pythonw.py and pythonw.c from http://github.com/gldnspud/virtualenv-pythonw-osx/tree/master and put them in the same directory
    2. run: python install_pythonw.py /myPython
    3. now you should have a pythonw file in /myPython/bin
  6. at this point you should have a working virtual environment in /myPython but there are a few more useful steps
  7. install useful packages: /myPython/bin/easy_install ipython pudb winpdb
  8. fix ipython: open /myPython/bin/ipython and change the first line to read: #!/myPython/bin/pythonw
  9. create useful aliases, for the fish shell you can do this by typing the following:
    1. alias python /myPython/python
    2. alias ipython /myPython/ipython
    3. alias easy_install /myPython/easy_install
    4. funcsave python
    5. funcsave ipython
    6. funcsave easy_install
  10. add /myPython/bin to the path (again for fish shell)
    1. open ~/.config/fish/config.fish
    2. add the following line: set PATH $PATH /myPython/bin
  11. and (finally) you're done

Tuesday, October 21, 2008

Wacom Graphire 4 and Ubuntu 8.4 Hardy Heron

I just configured a Wacom Graphire 4 tablet to work with Ubuntu 8.4 Hardy Heron. Plugging in the tablet was half the battle. After that, it worked well as a mouse, however many things did not work including the pressure sensitivity. This was all fixed by editing the xorg.conf file. First backup the existing file using this command

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.preWacom

Then, open the xorg.conf file...

sudo gedit /etc/X11/xorg.conf

and change all instances of /dev/wacom to /dev/input/wacom. Then save the file.

After this, restart X (ctrl-alt-backspace) and you should be good to go.

There is probably another way to do this by editing /etc/udev/rules.d/50-xserver-xorg-input-wacom.rules but I am unfamiliar with udev and would rather just edit the xorg.conf file.

Tuesday, August 19, 2008

Microsoft Silverlight = Virus?

I just had a 'fun' experience revisiting an old friend, Windows XP. I don't personally use XP, or any version of Windows, but was trying to clean up an infected computer. Here's the story.

To watch the Olympics online through Firefox, you need to install Microsoft Silverlight. Not only does this allow you to watch all the genetic super-humans competing for the illusive gold, you also get frequent Internet Explorer pop-ups displaying ads and new videos sites! The pop-ups seem to be a result of a randomly named process that reinstalls itself into the Windows/system32 folder as a randomly named .exe and .exe_a_a (or something similar) file. To remove this, I used the Spybot fileshredder to delete the files immediately after killing the process. It would probably be easier to do this in safe-mode, but I completely forgot there was was such a thing (too many years using Linux).

What bothers me isn't the virus or spyware, but the fact that neither McAfee, Spybot, nor AdAware was able to identify let alone fix the problem. It seems like this would be a very simple problem to detect and prevent or delete. I don't want to turn this into an anti-Microsoft rant, but I don't trust Windows. This is partly Microsoft's fault, for making an insecure operating system, but I also blame McAfee for not picking up the problem. I had better luck using Spybot, a free tool, than McAfee.

I imagine there are programs that can make Windows XP more secure and less prone to such infections. Does anyone have any suggestions or know of a good website where these types of programs are compared or reviewed?

oh... use Ubuntu :) it's safe, easy, powerful, and fun... the way computers should be

Friday, August 8, 2008

Camping Gear

List of stuff to take when going 'car camping' (where you can drive up to the site):
  1. Shelter
    1. Tent
    2. Tarp
    3. Camp chair
    4. Sleeping bags
    5. Sleeping pad
  2. Essentials
    1. Sun screen
    2. First aid kit
    3. Water filter
  3. Personal items
    1. Toiletries (toothbrush, toothpaste, tp, biodegradable soap)
    2. Towel... never forget your towel
  4. Clothing
    1. Camp shoes (flip flops)
    2. Hiking shoes
    3. Bathing suit
    4. Undies
    5. Shorts
    6. Pants
    7. Socks
    8. Shirts
    9. Jacket
    10. Long johns
  5. Cooking supplies
    1. Propane stove
    2. Pots and pans
    3. Forks and spoons
    4. Sharp knife
    5. Tongs
    6. Cooking spoon and spatula
    7. Hot Dog stick
    8. Mountain Pie Maker
    9. Tin Foil
    10. Napkins or paper towels
    11. Cup or mug
    12. Plate
    13. Foldable sink or bucket
    14. Can opener
  6. Misc
    1. Flashlight
    2. Watch (with alarm)