After I upgraded a few system libraries Adobe Acrobat stopped working and started to print an endless lethany of “expr: syntax error” messages. A quick google search later I found the fix detailed in at least a couple of places: Find acroread (it’s a shell script, probably in /usr/local/bin or under whichever-directoy-you-specified-during-installation/bin) and apply this patch:
— acroread.old 2007-06-01 18:18:49.000000000 -0500
+++ acroread 2007-06-01 18:20:57.000000000 -0500
@@ -415,7 +415,7 @@
- echo $mfile| sed ‘s/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’
+ echo $mfile| sed ‘s/libgtk-x11-\([0-9]*\).0.so.0.\([0-9]*\)00.\([0-9]*\)\|\(.*\)/\1\2\3/g’
Or just fire up vi(1) and add an asterisk after the second [0-9] block in line 418.
Even tough the problem has been solved, now this is kind of moot. See, I’d rather use acroread than xpdf any day because its navigation is a lot more natural than xpdf’s, and just to be honest xpdf is showing its age and is just plain ugly. However Adobe is starting to piss me off with its inclusion of the Yahoo toolbar in Acrobat Reader and its pitiful insistence to install n upgrades every single freaking time I open a PDF file. So I’ve started to use kpdf instead which feels a bit slower but starts up in a blink, looks a lot cleaner, doesn’t include spyware and displays the PDFs I’ve fed to it with decent antialiasing.
$ echo “alias acroread=kpdf” >> $HOME/.bashrc
So -just to be clear- in my opinion the best way to fix this problem is to stop using acroread and just use something else. Adobe: thank you for screwing up one of your nicer products, and see you never.
And now for something completely different: This site is now syndicated in Planeta Linux Mexico.
If you haven’t heard about Planets, they are sites that publish aggregated news feeds around certaint themes in the now all-too-familiar reverse chronologic order. Planets are a great way to feel the pulse and hear the buzz of a community without having to maintain individual subscriptions manually. Throught the years I’ve become reliant in several Planet feeds, most notably Planet Perl, Planet Python and Planet Debian.
A few weeks ago Beco introduced me to Planeta Linux -now I’m an avid reader- and kindly offered to talk to Damog and get this blog’s RSS feed into the site.
If you are one of my three regular readers, go visit Planeta Linux, I’m sure you’ll find it as enjoyable as I do. And if you are a Planeta Linux reader, well… Hello!
What’s so special about this number? How is it different from -say- 0x09F911029D74E35BD84156C5635688BF or from 0x09F911029D74E35BD84156C5635688C1? More importantly: can someone copyright a freaking number? Read rudd-o’s Spread this number post and find out why 0x09F911029D74E35BD84156C5635688C0 is so important.
A couple of years ago Ludovico Magnocavallo tackled the issue of bulk conversion of MySQL tables from MyISAM to InnoDB with an elegant bash snippet.
for t in $(mysql –batch –column-names=false -e “show tables” mydbname); do
mysql -e “alter table $t type=InnoDB” mydbname;
The original post also suggests using grep to limit the scope of the conversion to just a few tables.
(It seems that now Google *does* yield practical answers to this question ;-)
Last week Jordi Fernández gave me a quick hands-on tutorial for a working Beryl setup on Debian. He owns a Dell Latitude D620 running Debian GNU/Linux just like mine, so leeching his setup was even easier for me. What sold me immediately into Beryl is that you don’t need to install Xgl.
Basically I edited /etc/X11/xorg.conf and added these lines to the Device section:
Option “RenderAccel” “true”
Option “backingstore” “true”
Option “XAANoOffsetScreenPixmaps” “true”
Option “AddRGBGLXVisuals” “On”
and added a new section to the very end:
Option “Composite” “Enable”
My updated xorg.conf is available right here.
After restarting X (ctrl-alt-Backspace for lazy users like me) you can type this on a terminal:
$ beryl-manager &
I have the official nvidia drivers (1.0-8776) installed via module-assistant and a Beryl version that is kind of old (0.2.0+svn20070205-r3687+imudebian0, rather ancient in Internet Time). This worked immediately for me but Your Mileage May Vary.
There you have it. A working beryl setup in a few minutes. Thanks to Jordi for this tutorial and the rather impressive demo that followed, and to the Compiz and Beryl developers for their hard work.
So you want to publish that nice family video in your page/blog/intranet without forcing your visitors to download, install and activate some obscure browser plugin and *then* wait for a 200MB download… Well.. That’s easy as cake!
First, let’s use ffmpeg to convert the video from avi, mpg or mov to something that we can stream to a nice Flash video player:
$ sudo aptitude install ffmpeg
$ ffmpeg -i video.mpg -ar 11025 -s 320×240 video.flv
Then we extract the first frame of the video to use it as a thumbnail:
$ ffmpeg -y -i video.mpg -f image2 -ss 5 -vframes 1 -s 320×240 -an video.jpg
Of course, real men brew their own Flash video players using Ming. The rest of us have to settle for one that has been pre-made, like Jeroen Wijering’s most excellent Flash Video Player. To insert the video in a web page you just have to write
<object type="application/x-shockwave-flash" width="320" height="260" wmode="transparent" data="flvplayer.swf?file=video.flv&image=video.jpg&autoStart=false">
<param name="movie" value="flvplayer.swf?file=video.flv&image=video.jpg&autoStart=false" />
<param name="wmode" value="transparent" />
You know, there’s even a neat wordpress plugin that allows a much simpler syntax:
[flv:/path/to/video.flv 320 240]
Cool, eh? Now you are ready to take over YouTube!
Last night I opened KDE control center to change my desktop settings and I was shocked when I found that kcontrol was empty but for the OBEX Devices panel. Alll the modules that were supposed to be inside kcontrol where inside the KDE “Lost and Found” folder instead. A superficial search in the KDE mailing lists returned a few matches about this problem on KDE4 (did you know that kcontrol is currently unmaintained and that it’s gonna die real soon now?) but I’m currently in KDE 3.5.5 so that doesn’t apply to me.
Tonight Google came to the rescue: after digging a bit more I found this post in the debian forums which mentions that this might be a bug in a debian package and spells out the answer to my problem:
$ sudo ln -s /etc/xdg/menus/applications-merged/kde-essential.menu /etc/xdg/menus/kde-applications-merged/kde-essential.menu
Voilá! Now my kcontrol is fully populated again.
Orpie is a Reverse Polish Notation calculator for the console. If you’ve ever used an HP calculator you’ll feel right at home. if you haven’t… well, go back to your windows box and launch that buggy calculator desk accessory. In my case orpie let me stop worrying about writing “10 k” every time I ran dc(1).
Orpie was written in OCaml by Paul Pelzl and it there’s a Debian package maintained by Uwe Steinmann.
Go ahead and write:
$ sudo aptitude install orpie
$ echo “alias dc=orpie” >> $HOME/.bashrc
$ . $HOME/.bashrc
You won’t regret it.
When my iPod died I complained -ranted, actually- about the lack of a decent backup program for it. Well, I finally found a program that does just what I need. PodsBlitz will display the songs in your iPod, and moreover, it will merrily dump them to your hard disk. For backup purposes, I repeat. This will backup all MP3 files with their corresponding tag information, but you’ll still have to backup ratings and all other metainformation the old, manual, XML-based way.
PodsBlitz is written in Java and is distributed as a single .jar file that will execute under Windows, MacOS X and most Linux desktops with a fairly recent Java Runtime Environment. The best part is that it doesn’t need to install drivers or do any kind of fancy USB magic to find your iPod. You just dump it into the root directory of your iPod and it just works! Kudos to Alexander Dietrich for this nice software utility!
“Science is more than a body of knowledge; it is a way of thinking. I have a foreboding of an America in my children’s or grandchildren’s time … when awesome technological powers are in the hands of a very few, and no one representing the public interest can even grasp the issues; when the people have lost the ability to set their own agendas or knowledgeably question those in authority; when clutching our crystals and nervously consulting our horoscopes, our critical faculties in decline, unable to distinguish between what feels good and what’s true, we slide, almost without noticing, back into superstitions and darkness.”
-Carl Sagan, “The Demon-Haunted World. Science as a candle in the dark.”
Carl Sagan died 10 years ago today. Blogathon or not, it is as good a time as any to remember the scientist that hrough his TV show, though his essays, through his novels (Contact is my favorite novel), and even through his bare scientific accomplishments has reinforced in me the desire to know and that childlike capacity for wonder and amazement that we humans lose so easily when we grow up.
To Carl’s life. Cheers!
Carlos de la Guardia writes in his blog about his most recent misadventures with Internet Explorer and his post proves once again that confusion, frustration and anger are the emotions most commonly associated with MSIE.
I say let’s just put that damn browser to sleep.
No, seriously. What would happen if we developers just revolted and refused to support MSIE with all kinds of crude JS, CSS and pseudo-HTML hacks that will break anyway when Microsoft starts pushing a new MSIE flavor? Imagine a world in which digg, slashdot, Google, and even Amazon received people with broken browsers with a nice “optimized for Mozilla Firefox” button or -better yet- with a full-page “go get a real browser” error page listing 40 alternative browsers. Considering that Firefox already has some serious market share and is heading for more we may be able to pull it off. Heck, I bet that MSIE would be standards compliant within a week. Or they could just take Gecko and wrap a nice Vista skin around it and call it MSIE 7.1 for all I care. The point is that most of us could be back home in time for dinner for a change.
Hardly original, I know. But this may be worth the effort of fighting a war.
I’m gonna go with “I’ve been in a state of flux”. You may pick an apology for yourself from The F Blog.
Oh! The nice Dust Puppy graphic was shamelessly ripped from UserFriendly.
(via Boing Boing).
After a few weeks using the auxiliary battery instead of the CD-ROM drive, I needed to read a DVD. Surprise! It didn’t work. Reboot. Still no luck.
dmesg didn’t show anything about IDE, and /proc/ide was empty. It was like the CD-ROM didn’t exists at all.
The explanation might be that the CD-ROM is a SATA drive, not PATA. Graham William’s GNU/Linux Desktop Survival Guide holds the key to enable the drive. In short:
# echo “libata atapi_enabled=1″ >> /etc/mkinitrd/modules
# cp /boot/initrd.img-`uname -r` /boot/initrd.img-`uname -r`.bak
# mkinitrd -o /boot/initrd.img-`uname -r`
(Part of the ongoing Debian GNU/Linux on Dell D620 saga.
VMware has made available VMware Player for free for a few months now. I had been having problems making it run under the latest kernels in Debian GNU/Linux until I found out about the Czech University vmware-any-any patch. Of course, this is unsupported, so YMMV.
A typical installation run would go like this:
$ cd /tmp
$ wget http://download3.vmware.com/software/vmplayer/VMware-player-1.0.2-29634.tar.gz
$ tar -zxvf VMware-player-1.0.2-29634.tar.gz
$ cd vmware-player-distrib
$ sudo ./vmware-install.pl
Answer the questions about installation directories, initscript dirs and such, but *do not configure VMware yet*. I repeat: do not configure VMware yet.
Now we’ll patch the source with vmware-any-any
$ cd /tmp
$ wget http://ftp.cvut.cz/vmware/vmware-any-any-update104.tar.gz
$ tar -zxvf vmware-any-any-update104.tar.gz
$ cd vmware-any-any-update104
$ sudo ./runme.pl
This will patch the vmware-config.pl script, the kernel modules source code and the VMware binary itself if necessary. Now you may run vmware-config.pl when prompted. Please note that for this you must install the linux-tree-2.6.xx package for your current kernel version, and the source must be unpacked under /usr/src/linux. This is supposed to work fine when you have installed just the kernel headers instead, but I always go for the full kernel because -as you may have noticed- I compile a bunch of stuff into my kernel anyway.
After module compilation vmware-config.pl will prompt for network configuration and prompt to enable the Google searchbar (!). The last lines in the configuration should be something like this:
The configuration of VMware Player 1.0.2 build-29634 for Linux for this running
kernel completed successfully.
You can now run VMware Player by invoking the following command:
–the VMware team
Now you may head back to VMWare’s site to download a pre-configured appliance to run in your brand-new VMware player installation. Or go to EasyVMX to build your very own virtual machine. In any case, remember to drop a line to thank VMware for releasing this kick-ass product for free!
I managed to get TwinView working on the Dell Latitude D620 under Debian GNU/Linux and I’ve been using it for a few weeks now without any problem whatsoever.
The key section in /etc/X11/xorg.conf is this:
Identifier “Generic Video Card”
Option “MetaModes” “1280×1024, 1440×900; NULL, 1440×900″
Identifier “Generic Monitor”
Identifier “External Monitor”
I’m using an external 1280×1024 LCD, and I use the KDE control center (Peripherals/Display) to switch between metamodes. The nice thing is that whenever the X server starts and it doesn’t sense the external display it automagically defaults to using only the built-in display. Moreover, TwinView handles gracefully the “hole” below the 1440×900 display. Now what I’d really like to do is to specify that the primary monitor is the built-in display instead of the external LCD, but that can wait a bit longer.
Of course, you can download the complete xorg.conf I’m using, with my finely-tuned (right) TrackPoint and TouchPad configuration.
You may have exported strong crypto back when it was classified as ammunition. Maybe you scanned an obscure book to crack DES. Perhaps you even stole this book back in your day. But whatever you do -please, oh please- Don’t download this song, lest you are treated “like the hardbitten criminal scum you are“.
# echo “pcspkr” > /etc/hotplug/blacklist.d/pcspkr
Of course, this assumes that you are using Debian GNU/Linux with kernel 2.6.x and hotplug, and has been documented on my Debian GNU/Linux on Dell D620 page.
After running several updates on a particular server during the weekend, this morning I got a report that svn was down. a quick insection of libapache2-svn error log turned out this error message:
[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] (20014)Error string not specified yet: Berkeley DB error for filesystem /var/lib/svn/db while opening environment:\nDB_VERSION_MISMATCH: Database environment version mismatch
[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] Could not fetch resource information. [500, #0]
[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] Could not open the requested SVN filesystem [500, #160029]
[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] Could not open the requested SVN filesystem [500, #160029]
After googling it I found out that this has been reported as Debian Bug#342508, which promptly refers you to read /usr/share/doc/subversion/README.db4.3.gz. The recipe works just fine, and I reproduce it here for completeness:
# cd /var/lib
# mv svn svn-maint
# cd svn-maint/db
# db4.2_checkpoint -1
# svnlook youngest ..
# db4.3_archive -d
# cd /var/lib
# chown -R www-data.www-data svn-maint
# mv svn-maint svn
In the same document there’s a note that recommends to migrate the repository from DBD to FSFS. Since I’ve seen some serious trouble with OpenLDAP’s Berkeley DB backend before and the SVN database is over 1GB right now, I’ll schedule a mainteinance window for this migration ASAP.
As i wrote before, given my (mis)adventures with IBM/Lenovo I decided to change my allegiances and switch to another brand. So during the research phase I took some time to go to the Dell Expo and get to know their laptops firsthand.
One of the questions I had was about the keyboard: after so many years of working with Thinkpads I have become addicted to the TrackPoint, and I was sure that I had seen photos of Dell laptops with such device, so whatever laptop I decided for really had to have it.
I quickly found out that the laptops in the business line -the Latitudes- are the only models to sport such contraption under the Dell-esque name of “Track Stick”. As a matter of fact, besides the Thinkpads they are the only notebooks *anywhere* that still have it, so either they were found unusable by a significant amount of people or IBM tried to milk its patents just a bit too much. Personally, I believe the Trackpoint is the invention of the century right next to the Twiddler (and lately, even _on_ the Twiddler2) but then again some people believe I am somewhat eccentric when it comes to input devices.
So there I was with the entire Latitude line before me to consider. The D420 is very nice and would make a killer travel notebook, but its specs are somewhat conservative for my needs. And the D820 has a nice screen but is way too heavy. So I settled for the D620. I received it last week and I am documenting how to make it work with Debian GNU/Linux.
So here is my hands-on review of the Dell Latitude D620:
- Lightweight: About 4kg with the extra battery.
- Has a TrackPoint (great for mouse navigation) and a Touchpad (great for erratical mouse movement while typing but useful for scrolling) that fortunately can be switched off.
- Decent battery life even with a 6-cell.
- Nice full-sized keyboard with fair displacement, good tactile feedback and a satisfactory click. I could almost forgive Dell for the inclusion of a Windows key instead of a realistically-sized space bar.
- Mostly supported out-of-the box in Kernel 2.6.16; so far, full support for the devices I’ve tried has involved just a bit of recompilation
- Nice screen with fair brightness and I haven’t detected any dead pixels so far.
- Gets kind of hot, but not too much.
- Real dock connector barring the need to resort to a cheesy USB port replicator
- Somewhat dull gray-and-black color scheme, but it’s not pre ugly (for a business laptop).
- Built-in smartcard reader (shows up as an USB device).
- Built-in fingerprint reader with startup protection right after POST.
- Did I mention that it has a Trackpoint?
- Built-in WiFi and Bluetooth.
- Built-in Wireless broadband with US-centered overpriced carriers (No idea if any of the hardware options would work with some Mexican overpriced carrier, but there is an intriguing SIM slot under the battery anyway).
- Built-in accelerometer that might be readable under Linux. This might end my MacBook-lightsaber envy.
- Full Type-II PCMCIA slot instead of ExpressCard, so I can wardrive while I work.
- Four USB ports.
- Light sensor for automatic brightness adjustment.
- Windows Vista capable (*Heh!* Like I care…)
- Up to 4GB of RAM, if you dare sell your firstborn, your kidney, or your firstborn’s kidney to pay for it.
- A real parallel and -check this out- DB9 serial port.
- The inclusion of a TrackPoint is a stroke of genius.
- It really could use a keyboard light (Why do manufacturers still refuse to include them by default? That’d be… what? US$0.05 for a white LED and a switch when bought in bulk? But nooooo…).
- Both the trackpoint and the touchpad have only two buttons (Unix types may note that there’s one button missing).
- The 9-cell battery protrudes 1.5in from the front of the laptop instead of going on the back like in IBMs, so it kind of gets in the way and looks very much like an aftertought.
- Those videos of exploding Dells still give me nightmares.
- Sorry… no built-in webcam, nor multi-format memory card reader, nor JVC or Bose speakers, nor translucent white lid. This is a business laptop, remember?
- No Firewire. In this era of Firewire-800 external hard disks that is a serious oversight.
- The system beep is loud and annoying. Scare-the-cat annoying. Wake-your-neighbours annoying. Get-hit-by-your-wife annoying.
- No built-in SVideo nor DVI, thought there’s both on the port replicator. Not much of a problem for presentations, but you really need the port replicator to use a decent LCD screen.
- The Dell USB keyboard is kind of awkward. I keep falling off the left edge, and I have trouble finding the ridges in the F & J keys for touch typing.
- Sparse to non-existent printed documentation. There’s no manual to ignore. You can get them online if you want them badly. The Service Manual looks interesting, tough.
BTW if anyone from Dell is reading this: please update the configurator for LatinAmerica. You cant’ save your cart. You can’t email it. You can’t even *bookmark* stuff for later perusal. The LA site is primitive, counterintuitive and sometimes even downright annoying. Basically, it got stuck in the 90s.
On the other hand, Dell service was good. Thanks and kudos to both Ivan Castillo -who walked me through Dell’s product line during the Expo- and to Jesus Naranjo -who took my order and was very patient with my obsesive-compulsive hardware demands. One week into it I still haven’t had need to deal with their tech support personnel (Fate has carried on like that for a bit longer) and I hope it stays that way. If they are 50% like their sales people then I have nothing to fear, and altough I have heard some horror stories about them I’m willing to give them the benefit of the doubt for the time being.
In short: Dude, I got a Dell!