drewp

Categories: weblog | linux


2008-10-19T01:53:10 Running firefox 3.1 under 64-bit ubuntu:

If you get firefox 3.1 and try to run it on a 64-bit ubuntu hardy install, you'll probably get this failure:

./firefox-bin: error while loading shared libraries: libdbus-glib-1.so.2: cannot open shared object file: No such file or directory

  1. Go get the i386 version of libdbus-glib and save the .deb file somewhere.
  2. Run "file-roller /tmp/libdbus-glib-1-2_0.74-2_i386.deb".
  3. Go into data.tar.gz -> . -> usr -> lib, and copy libdbus-glib-1.so.2.1.0 to your firefox 3.1 directory.
  4. Rename it to lose the ".1.0" at the end.

Now you should be able to test firefox 3.1 and play some of the videos from here. The one called 'video embedded in svg' is impressive, although on my system I only got one video at a time and the audio sync drifted. See this screencast (or youtube) for what it should look like.

T 2008-05-27T01:50:24 MPD web music player:

I started a followup to my wildly successful Twisted python interface to MPD: a web version. The idea is that if you could GET and POST the various MPD commands, you could write cool music player user interfaces completely in javascript. And you could write lots of them, because they'd be so easy to make. You could make a mac desktop widget, an ipod touch version, and even players for use on non-apple products! The player UI would use AJAX to send commands back to the web server, which interfaces to mpd.

Need to control many mpd instances from one UI? Don't want to run php (like all the heavyweight mpd web clients use)? Like zero page reloads in your web UIs? Want to implement some fine-grained security scheme, where selected users can use selected mpd commands? Want to make mpd calls from unix, but your network only allows http (maybe through a proxy)? It's plain to see that there are between 'five' and 'countless' reasons to use mpd over http.

Progress appears here (because I haven't migrated this project to darcs yet): viewcvs

Someday, I hope to do (or find) the same thing for email. Why can't I write a new special-purpose webmail client every weekend? Why isn't my email box abstracted as a bunch of URLs I can GET (including folders, indexes, searches, etc), and why aren't my contacts represented as a bunch of URLs I can POST new email to?

 

2008-02-28T00:38:30 ZFS compression surprise:

 

 

server1% wc *
...
8484374 56684310 2050292731 total

server1% du .
2007440 .

server1% du -h .
2.0G .

I rsynced that dir to another server and did a quick check to make sure I had all the data:

server2% wc *
...
8484374 56684310 2050292731 total

server2% du .
660872 .

server2% du -h .
646M .

It took a quite bunch of digging and checking before I remembered server2 has a ZFS disk with compression turned on.

 

T 2008-02-15T22:02:50 OpenCV in python:

Here's a tiny demo of using the opencv face finder on a PIL image and displaying the result with pygame:

Source code

That's using the SWIG opencv interface (available on ubuntu from the python-opencv package), not the recently-released pycv (which I know nothing about).

My headtrack project is an attempt at something like Johnny Chung Lee's head tracking project. I tried opencv since I don't have a wiimote yet. My goal is to move my desktop windows according to my head position, so I can peek around a window or lean in to look at windows that are outside the normally-visible screen.

Meanwhile, the compiz hackers started a similar project.

 

T 2008-01-12T22:59:02 Holidays in unix seconds:

I just missed the turning of the unix clock from 1,199,999,999 to 1,200,000,000. It happened last Thursday.

I remember the IRC party for the billennium- lots of people had big ascii art to roll by when their clock said we were going from 999,999,999 to 1,000,000,000 (timezones don't matter, but there are plenty of sync and delay issues on IRC). That was on 2001-09-08, a week which probably won't be remembered for the unix billennium.

1,300,000,000 is in about 3 years, but (aside from the billennium, which could have led to some breakage) these decmial holidays are just for entertainment. The year 2038 is another story, though. Read about the year 2038 bug or 2038bug.com.

 

T 2007-10-22T22:48:29 Gutsy upgrade awful:

I upgraded my laptop from ubuntu feisty to gutsy, and nothing got better. Several things broke. While trying to fix them, I improved my setup a little tiny bit.

The auto installer failed several times on cupsys. Then it had some exception while working on initramfs (!) and gave up. Somewhere during the upgrade, my keyboard broke and was typing nonsense. At least that corrected after the reboot.

On reboot, I seem to be on 7.10 despite the upgrade saying it failed. I reinstalled cupsys and a few other things. I used to use ndiswrapper and linux-wlan-ng for my two wifi adapters, but neither of those work now. The bcm43xx module seems to work, so I can run my worse-quality wifi adapter. linux-wlan-ng claims not to support kernel 2.6.22, so I guess I can't use my usb wifi card for now.

The gutsy version of the power applet started waking up every 30 seconds to tell me I unplugged, when really I was running on AC power and my flaky battery wasn't charging. (It starts charging after a few remove/replugs.)

I tried 'desktop effects' to see if compiz would work. It broke my desktop switching and added window shadows. I restarted X, and lost window borders but gained wobble windows. I never got desktop shadows back. http://ubuntuforums.org/showthread.php?p=3600201 worked for disabling Xgl, which was taking lots of CPU.

emacs wouldn't start. It said "No fonts match 'Monospace-10'". I found various matches for that phrase in google, but didn't see a solution.

Sick of gnome and its WMs, I installed fvwm2 which is what I use on all my desktops. I had it start up with gnome-panel to get the applets I was used to. I thought fvwm had a control for "don't let windows move into this panel's space", but I can't find it now. Anyway, running fvwm instead of metacity is the small improvement I performed today. The suspend button on gnome-panel now quits gnome-panel, so I made a different launcher for "gksudo /etc/acpi/sleep.sh". I'm not sure how to do suspend without requiring a sudo.

Over in fvwm (or maybe after enough X restarts), emacs started working again.

Then I discovered http://www.fvwm.org/doc/unstable/modules/FvwmTabs.html which looks like it might be great if I can stop tripping on its focus bugs.

---

Forgot to mention: the text-mode virtual consoles don't have logins anymore. That's sure to bite me when I'm doing some important demo for someone.

2006-11-24T14:41:13 Sprint Treo 650 bluetooth DUN notes:

http://www.newt.com/debian/treo650.html is the best page about doing bluetooth hotsync and DUN with a sprint treo 650. The main trap on hotsync is that if you disobey and put in a hostname along with the host ip address, various things will stop working. Use "tcpdump -i ppp0" after ppp connects to debug. Also, treo camera pictures don't backup with "pilot-xfer -b .". I'm not sure how to make those backup, but you probably put them on an SD card anyway.

The DUN section of that page is for t-mobile, and I use sprint. My /etc/chatscripts/sprint is like this:

TIMEOUT 3
ABORT ERROR
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
ABORT "NO ANSWER"
"" "ATZ"
"" "AT&FH0L3"
OK-AT-OK "ATDP#777"
TIMEOUT 75
CONNECT

The first timeout is small because the first AT command always times out for me, and the connection seems to work fine. On ubuntu, my /etc/ppp/peers/sprint starts with "/dev/rfcomm1".

I use 'pon sprint' to start the dialing instead of ifup.

2006-10-20T00:42:32 creating deb packages with checkinstall :

I'm trying out http://www.plope.com/software/supervisor/ and it looks good so far. Part of my setup will be to have supervisord running on 4+ ubuntu boxes, and there's no ubuntu package (that I'm aware of). I'd like a package since that will make it incredibly easy to upgrade and downgrade the version on all my boxes all at once or to rebuild a box based mostly on the pkg list.

I found http://www.coffeebreaks.org/blogs/?p=65 which relies on http://asic-linux.com.mx/~izto/checkinstall/. checkinstall watches what files get written by a command (e.g. 'make install') and gathers those files into a package. checkinstall has a decent console UI for setting the simple metadata about a package. If I aliased 'sc' to 'sudo checkinstall', it would practically be EASIER to make packages out of everything I install than not to make them. It's ridiculous.

I'm not sure how to provide package dependencies to checkinstall (e.g. supervisor depends on python), so I guess that might require some more debian pkg tool fu. But I don't really need deps to solve my current problem.

2006-09-07T22:45:49 procmail lock failure:

My procmail runs every 2 min and gathers an mbox (over nfs) from one box and delivers maildir on another box. The procmail-runner uses lockfile-create/touch/remove to supposedly protect from repeated processing of the same mbox contents, but that lock failed somehow. Cron jobs piled up, and the same message got delivered dozens of times. Every message was going though spambayes, which helped throttle things.

So thanks, fdupes author and ubuntu packagers, for helping me get everything cleaned up in about 10 minutes. I just ran "fdupes -f .path.to.affected.folder/cur | xargs rm" a few times, slowed the procmail down until I feel like looking into that problem, and everything's fine again.

I used to use fslint a lot, but fdupes showed up first in a package search.

I'm also using delicious now (http://del.icio.us/drewpca) since bloglines screwed up and is hiding my hundreds of saved articles. Delicious looks like a better way to gather articles, and they're probably less likely to screw up on their core function than bloglines is to screw up one of its side functions.

Bloglines, if you at least send me the links to all the articles I had marked as keep-new, I'll post an update here saying that you did.

2006-07-22T19:57:10 ayttm logging patch:

I upgraded from everybuddy to ayttm, but I wanted to bring my patch with me. This patch puts full times (except tzone) onto the display and log files, giving you a much better chance of analyzing them later. Also, I backslash-escape newlines and backslashes, so that the log records aren't ambiguous. This revised patch also includes a fix to a const error in yahoo.c, which I think the proper ubuntu package has its own fix for.

This was my first time working with ubuntu packages, and I learned almost nothing. To apply my patch, run something like this:

apt-get source ayttm
tar xvzf ayttm_0.4.6+26.orig.tar.gz
cd ayttm-0.4.6+26
patch -p 1 -i ../new_ayttm-0.4.6+26_log.diff
dpkg-buildpackage -nc -rfakeroot
cd ..
dpkg -i ayttm_0.4.6+26-1build1_i386.deb

The good logs will look like this:

20060411 23:20:13 drewperttu:  log test 2

Patch is here: http://bigasterisk.com/post/new_ayttm-0.4.6+26_log.diff

2006-04-11T23:50:21 ayttm logging patch:

I upgraded from everybuddy to ayttm, but I wanted to bring my patch with me. This patch puts full times (except tzone) onto the display and log files, giving you a much better chance of analyzing them later. Also, I backslash-escape newlines and backslashes, so that the log records aren't ambiguous. This revised patch also includes a fix to a const error in yahoo.c, which I think the proper ubuntu package has its own fix for.

This was my first time working with ubuntu packages, and I learned almost nothing. To apply my patch, run something like this:

apt-get source ayttm
tar xvzf ayttm_0.4.6+26.orig.tar.gz
cd ayttm-0.4.6+26
patch -p 1 -i ../new_ayttm-0.4.6+26_log.diff
dpkg-buildpackage -nc -rfakeroot
cd ..
dpkg -i ayttm_0.4.6+26-1build1_i386.deb

The good logs will look like this:

20060411 23:20:13 drewperttu:  log test 2

Patch is here: http://bigasterisk.com/post/new_ayttm-0.4.6+26_log.diff

2006-01-02T21:12:17 using synergy without clipboard or screen-edge switching:

One host has a dual screen gfx card where one screen is my projector.

I want to send the mouse from my main workstation to the projected screen sometimes, but I don't want to slide it off the edge of my main workstation screen all day long, and I definitely don't want to mix the clipboards of my main workstation and the other screen on the projector's gfx card.

To make synergy not switch at screen edge and use a special key instead, I used this config:

section: options
  switchDoubleTap = 1 # try to disable most switching
  keystroke(F15) = switchInDirection(left)
end

where 'left' on each screen means to jump to the other screen. I couldn't find a way to disable clipboard copying, so I asked for one (which also lists my workaround).

2005-11-20T15:31:28 Rescuing old data on 5.25" disks:

I borrowed a 5.25" disk drive from someone at work to get the data off my very old disks. I put it in an empty computer along with a cdrom drive and booted the debian/bbc cd. trivial-net-setup found the ethernet card.

I made a no-password ssh key (ssh-keyget -t dsa) and appended it to another host's ~/.ssh/authorized_keys2 so I didn't have to type a password everytime I ssh to the other host.

Then, I simply inserted each disk and ran this:

cat /dev/fd1 | ssh drewp@otherhost "cat > disk"date +%s

These disks are from around 1985-1994, and about 4 of 16 failed to read. On a linux box, I mounted the images with the loop device and copied their files to my filesystem.

Some of the interesting files are in gwbasic's compressed form. I probably need to fire up actual gwbasic and use http://www.geocities.com/KindlyRat/BASICtoTEXT.html to get clean versions, unless I can find a decompiler.

2005-09-29T23:34:51 strace internals:

I read through the source to strace tonight, and learned the following things:


[Main]

Unless otherwise noted, all content licensed by Drew Perttula
under a Creative Commons License.