Zypper versus Smart

sudo zypper update:

2 Problems:
Problem: No valid solution found with just resolvables of best architecture.
Problem: Cannot install java-1_5_0-sun-plugin, because it is conflicting with java-1_6_0-sun-plugin

Problem: No valid solution found with just resolvables of best architecture.
With this run only resolvables with the best architecture have been regarded.
Regarding all possible resolvables takes time, but can come to a valid result.
Solution 1: Make a solver run with ALL possibilities.
Regarding all resolvables with a compatible architecture.
number, (r)etry or (c)ancel> 1
Applying solution 1

Problem: Cannot install java-1_5_0-sun-plugin, because it is conflicting with java-1_6_0-sun-plugin
A conflict over java-1.5.0-plugin == 1.5.0_update14 (java-1.5.0-plugin) requires the removal of java-1_5_0-sun-plugin-1.5.0_update14-0.1.i586[opensuse-updates] which is scheduled for installation
=== java-1_5_0-sun-plugin-1.5.0_update14-0.1.i586[opensuse-updates] ===
java-1_5_0-sun-plugin-1.5.0_update14-0.1.i586[opensuse-updates] is needed by atom:java-1_5_0-sun-plugin-1.5.0_update14-0.1.i586[opensuse-updates] (java-1_5_0-sun-plugin >= 1.5.0_update14-0.1)
findutils-4.2.31-24.i586 is needed by java-1_5_0-sun-plugin-1.5.0_update14-0.1.i586[opensuse-updates] (/usr/bin/find)
=== java-1_6_0-sun-plugin-1.6.0.u4-0.1.i586[opensuse-updates] ===
java-1_6_0-sun-plugin-1.6.0.u4-0.1.i586[opensuse-updates] is needed by atom:java-1_6_0-sun-plugin-1.6.0.u4-0.1.i586[opensuse-updates] (java-1_6_0-sun-plugin >= 1.6.0.u4-0.1)

Solution 1: do not install java-1_5_0-sun-plugin
do not install java-1_5_0-sun-plugin-1.5.0_update14-0.1.i586[opensuse-updates]
Solution 2: do not install java-1_6_0-sun-plugin
do not install java-1_6_0-sun-plugin-1.6.0.u4-0.1.i586[opensuse-updates]
Solution 3: Ignore this conflict of java-1_5_0-sun-plugin
number, (r)etry or (c)ancel>
^C

*boggle*

sudo smart upgrade:

Computing transaction…

Upgrading packages (234):
MPlayer kdegames4-carddecks-default
SDL kdegames4-carddecks-other
SDL-devel kdegraphics3-kamera
SDL_image kdegraphics3-pdf
alsa kdegraphics3-postscript
alsa-devel kdegraphics3-scan
alsa-oss kdegraphics4
alsa-plugins kdelibs3
alsa-utils kdelibs3-arts
[snip lots of stuff in between]
kdeedu4 qtcurve-kde
kdegames3 screenlets
kdegames3-arcade soprano
kdegames3-board transcode
kdegames3-card vorbis-tools
kdegames3-tactic xfsprogs
kdegames4 xmoto

Installing packages (4):
kaffeine-lang kdebase3-runtime libavahi-qt3-1 libdca0

Removing packages (4):
gnucash gnucash-lang ktorrent-lang slib

571.7MB of package files are needed. 46.3MB will be freed.

Confirm changes? (Y/n): y

Um. Yeah. I think I’ll stick with smart for now, guys…

Mencoder, DVD Rip, Volume Increase, Your PSP, and You!

Holy crap. The time between iterations of testing video encoding is prohibitive to quick progress as well as a (several) good night’s sleep.

After much pain and gnashing of teeth, I present you with the result of the last 3 hours of my life.

time nice mencoder dvd://1 -sws 9 \
-aid 128 -af volume=15:0 \
-vf pullup,softskip,dsize=480:272,scale=0:0,harddup,unsharp=l3×3:0.7 \
-ofps 24000/1001 \
-oac faac -faacopts br=128:mpeg=4:object=2:raw -channels 2 -srate 48000 \
-ovc x264 -x264encopts bitrate=500:global_header:partitions=all:trellis=1:level_idc=30 \
-of lavf -lavfopts format=psp -info name=”Tomb Raider” -o “$HOME/Movies/TombRaider.mp4″

Sincere thanks to forgeflow’s answer to this ubuntu forum post and to his excellent videogeek site.

Other observations:

  • There is far more complexity to audio/video encoding than I’d ever want to understand fully.
  • Anyone who actually understands mencoder fully deserves to be the next US president.
  • No, seriously, I’d vote for him/her.
  • The above incantation of mencoder accomplishes what I need it to, namely:
    • Rips a full DVD for me without having to pull it into an intermediary file.
    • Increases the volume of the ripped/encoded track by 20 decibels in this case. Handbrake doesn’t yet let you do that.
    • Takes advantage of the newer PSP System Software’s ability to handle H264 encoding (which I hear is what all the cool kids are using these days).
  • This same thing (without being able to turn the volume up) is possible in Handbrake with this:

    ~/local/HandBrakeCLI -i /dev/dvd –longest –size 800MB -e x264 -x ref=2:mixed-refs=1:bframes=3:b-rdo=1:bime=1:weightb=1:subme=6:trellis=1:analyse=all:level=3:no-fast-pskip:me=umh –crop 0:0:0:0 -R 48 -b 1024 -w 480 -l 272 –markers -o ~/Movies/TombRaider.mp4

  • Yes, I am not ashamed to admit it: I like Tomb Raider. Angelina and I were married in an alternate dimension, and I can beat Tomb Raider Legends in 2 hours with my eyes closed.
  • One or more of the statements made in the above bullet point may be more the result of sleep-deprivation than actual truth.

Good night, Gracie.

[ Update ] Okay, nuts… apparently this video quality isn’t quite good enough because now I’m seeing weird ghosting on the PSP while watching the resultant movie. Yay, another geekly late night tonight….

[ Update 2008-03-04 ] I’ve  updated the command that I’m using now with mencoder, thanks to some comments and tweaks during the past few months.

Embedded Album Covers, Your PSP, Amarok, and You

Amarok?So… first off, I Googled for Amarok, hoping to find some new sweet pixels and instead I find this. Um… so not the Amarok that I know and love.

Anyway, a couple of years ago, I won a PSP from the LinuxWorld convention. Being that I’m a geek, it was love at first boot jingle. Being that I am married, have 3 kids, work full-time++, and try to hack every once in a while, the brave little PSP spent a lot of alone time. Oh sure, I own several PSP games (go SOCOM2!!), but that’s about it.

Until now.

Since I’m lucky enough to be able to work from home for a bit, I’m not driving back and forth to work every day and as such, I gave my iPod to my darling daughter. So I bought a 4G memory stick (oh, that reminds me, I need to blog about stupid, evil, skanky eBay sellers of fraudulent flash memory, since I wasted my time with one personally…) (but for non-fraudulent and kick-butt flash, I highly recommend SanDisk’s Gaming Pro Duo… it’s uber fast) (and that’s enough parenthetical statements for one sentence). And, having this nice little PSP and 4G of disk space on it now, I’ve been figuring out how to put stuff of interest onto it.

Movies: Totally cool. The PSP has a 480×272 screen. Handbrake does a really nice job of ripping a DVD and creating an mp4 that the PSP can play perfectly. Really, really nice. Oooh, and the new PSP OS has this nifty little auto-generating movie browser thingey that is kind of like a scene selector on a DVD movie… lets you see scene selections for the movie at configurable intervals too… Anyway, the only beef I have with Handbrake thus far is that it doesn’t allow me to increase the volume on the ripped movie. So I’m looking at ffmpeg now to see if it does as good a job as Handbrake. I’m sure I’ll blog more about that later.

Music: Really cool here too. The PSP plays a variety of audio formats and has some really nice eye candy/visualizations/etc. for your music-listening pleasure. However (and this is what actually what prompted this post), it shows album covers per song only if they’re embedded as APIC frames in your mp3’s ID3 tag. Now, I’m new to this, and didn’t know that there were such animals as APIC frames until just yesterday, but I did know that I wanted to put my album art into my little mp3s so that they’d show up all purty-like on my PSP (there, full circle now).

So, I’ve put in the usual geekly late night or two (yes, dear, I’m honestly coming to bed… in a sec…) and learned much about ID3 tags and the various tools that one might employ in one’s attempt to embed album covers in one’s mp3s. I even bugged my good friend Seb, who pointed me to a really cool “EmbedCover” script for amarok that I didn’t know existed. But, along the learning curve, I saw a lot of complaints about Amarok showing distorted embedded album covers. My problem was slightly different in that I couldn’t figure out how to get them embedded in the first place, let alone getting them there and then finding them distorted. Through trial and error (and aforementioned geekly late nights), I think I’ve found a consistent way to get album covers to be embedded and why they might show up distorted in Amarok (and other players too, mind you–it’s not Amarok’s fault).

The first step in getting album cover art embedded in my mp3s was to get a picture into each directory of my music. I organize things like this: “Artist - Album/Artist - Title.mp3″, and in each folder, I want an album cover file. One way to do this is an amarok script called CopyCover. Assuming that you’ve first found all album art for your music via Amarok’s cover manager, CopyCover will, as you are playing your music, copy the album art from Amarok’s cache into the folder for your music and call it “cover.png”. There’s also an offline script that is supposed to do the job all at once instead of you having to do it the song-by-song way, but I couldn’t get it to work for me… I think the database schema changed behind its back. An alternate route (and this is what I did) was to tell Amarok to organize all of my music for me (highlight all tracks in player and right-click, “Manage Files” | “Organize Files”, and then click the “use cover art for folder icons” checkbox. Amarok will put a “.desktop” file in each of your folders and the “Icon” attribute will point to Amarok’s cached album cover. I then wrote this simple function to copy this album art into the folder itself:

function albumcoversfromamarok() {
for f in *
do
count=$(ls –color=never $f | grep mp3| wc -l)
echo “$count : $f”
if [ $count -gt 0 ]
then
icon=$(cat “$f/.directory” 2>/dev/null | egrep “^Icon” | cut -d “=” -f2)
[ -e "$icon" ] && cp “$icon” “$f/cover.png”
fi
done
}

I then wrote 2 more simple functions that will rip through all of my folders and embed the updated album art into my mp3s:

function mp3albumcoverdir() {
if [ -e "cover.png" ]
then
convert -quality 90 -geometry 300×300\> cover.png cover.jpg
else
return
fi
for f in *.mp3
do
echo “Embedding cover in: [$f]”
mp3albumcover “$f” cover.jpg
done
}

function mp3albumcover() {
FILENAME=”$1″
IMAGE=”$2″

# first, remove existing images
# do this for FRONT_COVER and OTHER APIC types and twice just to make sure we’re clean
eyeD3 –add-image=:OTHER “$FILENAME” >/dev/null 2>&1
eyeD3 –add-image=:OTHER “$FILENAME” >/dev/null 2>&1
eyeD3 –add-image=:FRONT_COVER “$FILENAME” >/dev/null 2>&1
eyeD3 –add-image=:FRONT_COVER “$FILENAME” >/dev/null 2>&1

# now, get rid of cruft left behind by previous images
id3v2 –APIC “” “$FILENAME” >/dev/null

# make sure we have a valid id3 tag
eyeD3 –to-v2.3 “$FILENAME” >/dev/null 2>&1
# now embed the image
eyeD3 –add-image=”$IMAGE”:FRONT_COVER “$FILENAME”
}

Then I run it from the top level of my music collection with “for f in *; do; mp3albumcoverdir “$f”; done”.

Now, along the way, whenever I found an incorrect album cover embedded and tried to fix it by removing the previous album art and adding the new one, I started seeing the corrupted images in amarok that I’d been reading about. And it’s not just that amarok wasn’t able to read the images… they were truly corrupt. “eyeD3 –write-images=. $FILE” produced a corrupt image as well. And, every time I cleared the previous image and added a new one with eyeD3, I noticed that my filesize kept getting bigger and bigger. Even when I “removed” all images with eyeD3’s “–add-image=:FRONT_COVER”, the filesize of the mp3 just kept getting bigger. It was then that I tried setting the APIC frame to null (”") with id3v2, and that returned my mp3’s filesize back to where it should be. And after that, if I added the album art to the mp3, it added it cleanly, my filesize looked sane again, and Amarok was able to see the embedded album art again.

So, my theory, which is mine, and belongs to me and I own it, and what it is too, is that people who are seeing album art distortions/corruptions in amarok might possibly have files that either have more than one embedded picture, or have dirty APIC tags. If any of you, dear readers, is seeing embedded album art distortion in Amarok, would you please install id3v2 and eyeD3 onto your little Linux box and try running my mp3albumcover function against that mp3 with a new album image? I’d very much like to see if it fixes the problem for you.

Truecrypt versus LUKS Speed Test

I did a small performance test yesterday and was very surprised by the results. I wanted to see which encrypted filesystem was faster betweeen Truecrypt and LUKS. I created 2 20-gig files, one with Truecrypt and the other with LUKS encryption. Then I mounted the encrypted files and copied a 180 meg file 10 times, synced, and then reported the time taken. Here’s the results:

Truecrypt test:

time (for f in $(seq 1 10); do; cp bigfile truecrypt-mnt/bigfile-$f; done;)
0.22s user 26.30s system 15% cpu 2:47.06 total

LUKS test:

time (for f in $(seq 1 10); do; cp bigfile luks-mnt/bigfile-$f; done;)
0.20s user 8.40s system 15% cpu 55.169 total

Wow. Now, granted, this is a simple enough test, but does anyone have any ideas why LUKS would be 3 times faster in writing 1.8 Gigs than Truecrypt?

Thinkpad T61 and a Blond ‘fro

Technology had several glorious victories at my desk today. First, I was fortunate enough to get a very nice dual-head GeForce Nvidia card installed on my 4-way AMD 64-bit cpu server at work. It goes very nicely with the two beautiful 1600×1280 monitors that are now hooked up via twinview. This is by far the coolest working environment I’ve ever had (okay, ever seen).

Secondly, I got my new work laptop today, and it is hella sweet. It’s a Thinkpad T61, and I think I’m in love. About my only complaint is that the thing must weigh 50 pounds, but what can you expect with these specs, I guess. Sweet, sweet, sweet laptop. Oh, also, it’s by far the smoothest Linux installation I’ve ever done. I put OpenSUSE 10.3 (64-bit, baybee!!) on it, and nary a hiccup, complaint, wrinkle, nor hassle! Even the wireless card worked perfectly and out of the box. Nice!!! For all the unsexiness (compared with the Vaios, Macbooks, Alienwares, etc.), this Thinkpad is a solid little machine. And now I’ll get to work purtifying it up with some stickers…

Third, I am officially if not impressed, at least very relieved to see how mature Perforce is. I’d read a couple of really scathing discussions about it last week (which I won’t link to, being that the authors are serious potty-mouths…), so I was a bit wary of it, but from what I’ve seen thus far (having not actually used it yet), it seems pretty slick. Thiago, I understand what you were saying now… =;)

Oh, also, during my little transition period here as I blogged about earlier, I’ve been using the Gmail interface to my little domain’s e-mail, and seriously like it. What I’d typically do, now that I have a laptop again, is to start using a thick client again (kmail), but I’m kind of unsure where I want to go next. There are some definite niceties that the Gmail interface offers that kmail (and honestly, any thick client that I’ve seen) does not. And I wonder how far one could go in the “keeping all my stuff on Google’s servers” model. Being that I’m a Palm/PDA geek, it’s still important to me to be able to sync the big 4 with my Palm (Calendar, Addressbook, Memos, and ToDos). I wonder if Google is planning on augmenting these and providing solid, open API’s for syncing them… ‘twould be really, really cool to build on top of Bertjan’s SOC base conduit with some Google API syncing code. Which reminds me, I wanted to look at syncing with Tomboy from Kpilot too….

I also do like Google’s Reader. Some very nice UI choices made there, and extremely slickque AJAXey sweetness.

supafro_bndAnd I’m going to need some ideas on how to let my hair grow out and not look stupid during the process. Hair gel just doesn’t work unless you’re going for Ace Ventura. Maybe blow-dried and blond ‘fro? =;)

Phew. Long, exciting day. Sleep needed.

Um, and no, this is not me. Just some wig advertisement….

Movin’ on Up (Sing it with me, Weezie!)

Today was my last day with my (before today) current employer. It has been a really, really, really bizarre and surreal day. 2 weeks for that matter. I caught myself several times shocked that I wasn’t more overwhelmed by the huge transition that we’re now embarking on again. And I think the fact that I wasn’t more worked up about it was all the more jarring.  Maybe it’s because I just went through this whole thing only 2 years before, so now I’m a hardened expert.  Or maybe it’s because I’m just at peace with where God is moving us.  Or maybe it’s because I’m thrilled like I never have been before about my new job.  Or maybe I’m just suffering from severe lack of sleep, allergies, and general numbness.

But I am extremely excited about working for VMware!!! I’ve accepted a (totally cool) position with them as a Linux UI Engineer, and will be working on the Player team. Awesome!!! =:) Open Source && Linux && C++ && an awesome team && a company that just might actually get Open Source == 1 happy me.  I am stoked.  =:)

However, this means that my focus will be diverted from KPilot for the next few weeks, at least.  The last time we went through this transitional period 2 years ago, we ended up with KDE 3.5.5’s version of KPilot which caused no shortage of problems.  I hope that this transition period will be smoother and less disruptive.  But I can say that I will have zero time to work on getting KPilot in shape for our KDE 4.0 release, which unfortunately also coincides with Adriaan’s complete lack of time due to work and Bertjan’s lack of time due to school.  So KDE 4.0’s KPilot will ship with our new Keyring conduit and the memofile conduit working, but precious little else.  You can call this a regression, failure, disappointment, or whatever else you feel like, and believe me when I say that there is nobody more disappointed in this little turn of events than me.  I’ll also say that I would thoroughly relish any and all help that would step up and help us get the Calendar, Addressbook, and ToDo conduits ported, if nothing else, for KDE 4.0.  =:)  If you care, can code, and are willing to help, please let me know.

So, stay tuned to this channel for more updates as time goes by.  I find myself having to use my old Powerbook until I get my new work laptop (hopefully Monday!!), so I’m limited on how much I can do outside of checking e-mail, etc.  Oh, speaking of…  I believe I’ll be getting a Thinkpad T60 (yeah, I know, very unsexy, but pretty Linux friendly and decently speedy), and I’ll most likely install OpenSUSE 10.3 64-bit on it.  Anyone have any good/bad experiences with any of the afore-mentioned mixture of hardware/software?

As Bowie sang… Ch… ch… ch… ch… changes….

Strap on yer seatbelts and hang on tight….  =:)

Using Gmail for mailto: links

Blame it on Seb, but I’ve been using Gmail’s web interface lately. This is partly because I’m in the middle of another life-changing job transition (but this one I’m really excited about, aside from the great white sharks and the triangle of death), partly because I like change (and after having used nothing but kmail for a few years now, I’m ready for a change if for nothing other than to see how we in KDE PIM land can do things better), and partly because I’m trying to keep less personal data on my work laptop. I have been using Google’s Apps For Your Domain for the last year or so, and I like it much good. However, one thing that Gmail lacks is any IMAP interface whatsoever, which means that I’ve had a really convoluted setup going on which uses GAFYD for my MX handling, and then involves a subdomain on my regular web host server which I forward all e-mail to and subsequently access via IMAP. Ick.

(Google people: PLEASE, PLEASE, PLEASE add an IMAP interface to Gmail!!! The workarounds suck!)

Anyway, I digress…

The second thing that irks me about Gmail’s web interface is that it has no API for syncing contact information whatsoever. This absolutely sucks, but I expect that with Google trying to position itself as an online “all your information are belong to us” provider, that they’ll either remedy the ridiculously bad contact handling themselves or replace it with an acquisition. Please? And let me sync it with my Palm PDA??

But back to the point, one thing that is lacking in using Gmail’s web interface is the ability to click on a “mailto” link (or right-click in Firefox and do “send link”). Apparently, there are Google-provided solutions to this on OS X and Windows (Google people: please treat the Linux desktop as a first-class citizen too??) but they’ve not done anything for this functionality on Linux. However, I came across this nice little HOWTO from the Gentoo folks, which does the trick quite nicely. I’ve modified the shell script slightly to try to stop Gmail from going into some kind of a loop and not actually working if there’s no recipient passed to it (like what happens when you RMB click in Firefox and do “send link”), but I’m not sure if it’s something goofy with GAFYD…:

#!/bin/sh
BROWSER=”firefox”

ME=$(basename $0)
DEBUG=/tmp/$ME.debug

echo “$(date)| incoming uri: [$1]” >> ${DEBUG}

# remove the ? and mailto from the uri and convert “subject” to “su”
uri=$(echo “$1″ | sed -e ’s,subject=,su=,’ \
-e ’s,\?,\&,g’ \
-e ’s,^mailto:,,’)

echo “$(date)| outgoing uri: [$uri]” >> ${DEBUG}

if [ "$uri" ];
then exec $BROWSER “https://mail.google.com/mail?view=cm&tf=0&to=$uri”
fi

exec $BROWSER “https://mail.google.com/”

[[ UPDATE ]] A zillion thanks to Giuseppe D’Angelo, who pointed me to the Better Gmail firefox extension.  This rocks a LOT!  =:)  So the above shell script still has relevance for KDE/GNOME url handling, but isn’t as necessary for firefox mailto’s…  =:)

Visor Syncing Problems - A Solution

I’ve been trying to help a KPilot user (Hi Ronny!!) track down a really annoying and fatal bug for more than a year now.  The bug is triggered by trying to sync a Visor handheld with KPilot, and what happens is that KPilot begins to connect to the Visor during a HotSync, but then it fails when trying to read the user information from the Visor; and then the Visor disconnects, but KPilot doesn’t know it and KPilot then goes into a tight, CPU-consuming loop somewhere deep in the bowels of libpisock.  Ronny graciously funded me with a Visor via eBay since I am unable to reproduce this condition with my Treo 650.  Long story short, now that I have a Visor, I’ve been able to reproduce the bug, grr.
Thankfully, David Desrosiers (the author of pilot-link and libpisock) is an amazing guy and extremely helpful, and David happened to remember a bug report that he’d seen which said that the workaround was to set the connection speed on the PC side to higher than 9600.  David explained that this was because the Visors were the first devices that had both USB and serial cradles, and that as a result, there were some funky code on the handheld that actually used the connection speed, whereas the later USB models do not.  So, I tried setting KPilot’s connection speed to 115200, and sure enough the CPU-spinning behavior did not happen anymore.  Fixed!!  Grrr.  Frustrating to have kept Ronny from being able to use his Visor for so stinking long and have it turn out to be something that he could have changed a year ago and gotten things working.  =:/

So, all in all, this has been an interesting case study of how Open Source should work, albeit on a much-more dragged-out timeline, which is entirely my fault, being all busy and hectic and what-not.  Ronny had a problem and asked me for help.  I couldn’t reproduce it because I didn’t same hardware.  Ronny graciously provided me with the hardware to reproduce the problem.  I reproduced it and asked the pilot-link author  for help.  He helped me find a workaround.  Cool!!  And Ronny, thanks again for your help and patience!!!  =:)

Hopefully this will both help the next gal who finds herself unable to sync her Visor, and give me a way to remember what the solution was….

What Microsoft Meant Was…

In an effort to catch up reading through the last 2 months of eWeek magazines that I have stacked on my dresser yet never find time to pick up, I read through the May 28 issue this morning and found this very insightful statement by Jason Brooks. The article is called “Free software shines on” and can also be found here

When Microsoft representatives state that everyone must play by the same rules, as they often have during recent months, what the company means is that the business and technological realities under which they’ve built their empire shouldn’t be allowed to change (emphasis mine).

Very true. Very insightful. Nice job as usual, Jason. Of course, I (and all Open Source developers) will strongly disagree with Microsoft on this one. =;) Thomas Jefferson was absolutely right.

“As revolutionary instruments (when nothing but revolution will cure the evils of the State) [secret societies] are necessary and indispensable, and the right to use them is inalienable by the people.” –Thomas Jefferson to William Duane, 1803. FE 8:256

“When patience has begotten false estimates of its motives, when wrongs are pressed because it is believed they will be borne, resistance becomes morality.” –Thomas Jefferson to M. deStael, 1807. ME 11:282

“Rebellion to tyrants is obedience to God.” –Thomas Jefferson: his motto.

Also, welcome back Adriaan! =:)

Why I quit: kernel developer Con Kolivas

Really, really good article and interview with an awesome and amazingly bright guy. Con, I had no idea that you were such a complex guy. I wish you the best of the future, seriously.