Friday, 19 June 2009

ludelete fails to delete the boot environment: mount point is already in use

While I was live upgrading from Solaris Express Community Edition build 115 to build 116 I decided to free some hard disk space and delete the oldest boot environment I had: snv_114.

That's easy:
# ludelete svn_114
But there was a small problem... ludelete complained about snv_114 unable to use its automatic mount point because the mount point was being used. Do you know what? It wasn't, before launching ludelete but, for reasons I don't understand, after mounting it it was reported as busy.

The Google Finger was going to be triggered immediately and look if there was some known bug out there but fortunately a forced unmount of the boot environmente solved the problem:
# luumount -f snv_114
Pretty strange, indeed.

OpenSolaris bug 6844307: bonobo-activation-server consumes one entire core

As you know, I substituted Thunderbird with Evolution in my Solaris desktop. I'm pretty happy with it but I hit a bug: bonobo-activation-server sometimes starts to spin and consumes one entire core. The user experience isn't completely compromised because I obviously have a multi processor machine but it's a pretty annoying bug. It's summer and in Spain it's very hot, you know. One CPU throttling at 100% means one fan going nuts and rotating all time long.

Googling was useless because the bug is reported in a closed database but there it is. I must thank the guys at the OpenSolaris Communities to help me find it out. A fix is reported to be delivered in build 117 and meanwhile you can safely kill the bonobo-activation-server: I experienced no problem whatsoever.

Wednesday, 17 June 2009

A GPG primer - Part I - Setting up Solaris, creating and distributing a key

I think this is due. I'm a GPG user since a long time and today, still, there are people asking me what are those strange characters out there or why am I doing this.

An encryption key such as GPG's may be used to sign and encrypt communication from and to a sender, the key owner. The key owner, the only one who's got the secret key and its passphrase, can sign and decrypt a message encrypted with such key. Another person who wanted to send me encrypted information could use my public key to encrypt a message and I, and only I, could be able to decrypt the message. That's just the basics and, if you're interested, you could read the GPG User Guide to dig into this subject.

There also exist software which can ease you life with these keys:
  • Some desktop systems come with an integrated key manager that lets you create, sign, encrypt and decrypt files and mail with a bunch of clicks.
  • Some mail client come with similar functionality built-in or via some plugins, such as Evolution or the Enigmail plugin for Thunderbird.
They're so many I'm not even trying to enumerate them. I just focus on man's best friend: good ole command line.

Setting up Solaris

Depending on the Solaris version you're running, maybe you'll need some extra step to set up GPG:
  • Solaris up to version 10: GPG isn't bundled with the OS nor is available in the Companion Software. To install GPG, follow Blastwave's instructions to set up your system and, optionally, follow my instructions to set up a special Blastwave zone. During the recommended Blastwave configuration you'll install GPG (CSWgnupg), too.
  • Solaris Express Community Edition and OpenSolaris-based distros: GPG is (should be) bundled with the OS.

Creating your key

As we said, the first thing you need is a key. You can make one with gpg:
$ gpg --gen-key
and after answering a bunch of questions you'll get your shiny little key

Distribute your key

Unless you're going to encrypt files for yourself, the next thing you've got to do to use your key at full power is distributing it (only the public part of it) to whoever may be interested in:
  • Reading something you signed.
  • Sending you encrypted information.
There are plenty of ways to distribute it but the most effective will be publishing it into a public keyserver:
$ gpg --send-keys key-id --keyserver hkp://subkeys.pgp.net/
Please note the following:
  • Instead of your key-id you could use your name, which was provided to GPG during the key creation phase. If you prefer to know and learn your key-id, you can ask gpg with the --list-keys option.
  • There are many keyserver out there, use the one you like most!
Now, you're ready to tell the world and begin to use your key.

Could I use an iPhone and iTunes with Sun xVM VirtualBox on a Solaris host?

The enterprise I'm working for has just decided to change our phones and buy a last generation iPhone, the iPhone 3G S. Yes,the one at the left.

Whoever knows me knows my legendary gadget-minimalism, too. The good news is that my old and malfunctioning Nokia E65 will be garbage collected. There's really no bad news, despite Apple iPhone size which won't easily fit any of my pockets.

I'm wondering, before even having touched an iPhone (ever), if I'll be able to use its full potential without either a (native) Windows or a (native) Mac OS/X. Will I be able to interface it with iTunes running on a virtualized OS instance on top of Sun xVM VirtualBox? I don't know and I'm pretty curious about it.

I started reading news about it on the Internet and it seems that (most of the) people is pretty much happy with it. For me, and call me a dinosaur, a phone primary function is being a phone but I recognize that having a steady Internet connection and a decent OS on your mobile could be cool, in most situation. Don't know what my girlfriend has to say about it!

The geeky little man inside me made me go and download the SDK just to discover that I need a Mac OS/X, and thus an Apple machine, to build and run some test applications. Disappointing! I'll develop this subject in a later post. The funniest thing I was reading today was the great innovations Apple introduced on the last revision of the iPhone OS such as... copy and paste. I mean, guys, be serious.

As soon as it comes, I'll tell you my impression!

Would you like a cup of tea?

Categorizing things like cuisine may be challenging, if not impossible. Art cannot be classified and categorized with algorithms. But, there surely are best practices you cannot ignore including when doing art. And you should know that the perfect cup of tea is artwork. Or, at least, good craftsmanship.

Didn't you know that? Or perhaps you don't even like tea? Well, maybe you just drank canned and over-edulcorated cold tea or, worse, some cup of hot water with an industrial low quality tea bag. No, that's not tea. The same way an American coffee is not an Italian espresso.

Let's see if I can help you discover your hidden love for tea or, at least, help you enjoy a healthy and flavored cup of tea.

The tools
Every craftsman needs its tools. To make a good cup of tea you need (in no particular order):
  • Patience.
  • Good quality tea.
  • Good quality water (oh yes).
  • A kettle.
  • A teapot.
  • An infuser.
  • Experience.

The tea

First, the obvious: the perfect tea cup only comes with high quality tea. Don't shop for mainstream tea bags (that's just finely ground leaves and who knows what). There are higher quality tea bags but that aren't so easily found as tea leaves. Determining the quality of a leaf isn't a newbie's job, even if you can follow the suggestions I'll give you in the Tea thread.

Now, tea is just a name for the leafs of a class of plants: Camellia Sinensis. You can find plenty of different types of teas out there and the first thing you should be aware of are the basics. Maybe you know that there's black, green, red (and God knows what else) tea on the market. Yes, but the plant is just the same. In another series of posts I'm writing about the kinds of tea and its classifications.

I cannot tell you which tea to choose, that's a matter of taste! If you absolutely don't know where to start, go to a local tea seller and buy small bags of different types: at least one green and one black. Be aware, moreover, that tea shops sell a great number of flavored tea blends, some of which are real classic, such as Earl Grey black tea, which is flavored with bergamot orange essential oil. Personally, I regularly consume:
  • Earl Grey (Black tea).
  • Gunpowder (Green tea).
  • Gunpowder and fresh mint (blended at home)
Discovering new flavors and blends is part of the magic and it might be your game for the years to come!

Water

Water is the other great ingredient: you must start with fresh and good water. If you don't like your tap water, then use bottled water. Bad water, bad tea. I also said fresh water because heaters might extract oxygen from water, which is fundamental during the flavor extraction process.

Heating water in the kettle

Heating water is a delicate process: depending on the type of tea you're gonig to brew, water must be heated at a recommended temperature. Basically, the less oxidized the tea is, the colder the water. Black tea requires rolling boil while green teas require an inferior temperature.

Please, don't go around with thermometers! Rolling boil is easy to recognize, and must only be used for completely oxidized teas. Also remember that boiling water oxygen level get lower, so don't let the water boil for a long time nor heat twice the same water. That would spoil your perfect cup of tea!

Gentler teas, such as white and green, are easily burnt by too hot a water: you'll learn to recognize immediately the bitter taste such tea assumes. Your taste will also play the game: I learned with time the exact temperature for each of the teas I drink. The first times you'll experiment with it, take note on the bags you bought.

A small resume may be this (temperatures are approximate):
  • Green/White teas: 160/180 F (70/80 C)
  • Oolong tea: 190 F (90 C)
  • Black tea: 212 F (100 C)
At 70 F, more or less, water begin to steam and, if you open the kettle, will notice small bubbles starting to rise to the surface. Since then, you can easily make an estimate and begin to learn your kettle.

The quantity of tea you're going to steep depends on the water you're going to use: a regular tea cup is 200 ml. You can just weigh your favorite mug and determine where's the imaginary 200ml line. Some mugs, moreover, come with some illustration on the inner side to indicate it. Look into your mugs and if you're the happy owner of one of these!

The teapot

While waiting for your water to heat, you can go preparing you tea pot. The tea pot, for the water not to cool too early, must be pre-heated. You could use some of the water of the kettle, but in the meantime that water would be cooling off. It would be more difficult to calculate how much water to pour into it, also. Not too bad: just pre-heat it with hot water from the tap, then rinse well.

Once the teapot is ready, throw inside the tea. The correct quantity, guess what? You've got to experiment! It depends on the quality of the tea, on its freshness, on its kind and, of course, on your tastes! The usual dosis is 3 gr (a level tea spoon) per mug.

Brewing your tea

There are multiple brewing techniques:
  • Loose leaves in a teapot
  • Mug infusers
  • French presses
  • Tea balls
One thing to remember when brewing your perfect cup of tea is that the leaves have to unfold and during the process will rise their volumes. Moreover, leaves should be left free to move during the infusion for the flavor extraction process to be effective. All previous methods, except tea balls, are fine and present no problem: I always found tea balls too small and ineffective. If you are going to brew more than one cup of tea, consider using the classic teapot or a French press. If you're brewing just a cup, consider buying a good mug infuser, or basket filter taking into account that they don't fit well into every mug.

Steep time


Now your tea leaves are unfolding inside the warm water. It's a beautiful process to look at and gives even more taste to your perfect cup of tea! If you're starting to familiarize with that particular kind of tea, you can use a spoon and try the tea every bunch of seconds to appreciate how its taste evolves and determine when it's ready for you. You'll also familiarize with the point of no return: that's where you're perfect cup isn't such any longer. Consider as a guidance the following steep times to begin with:
  • Low oxidation teas: 2 to 3 minutes.
  • High oxidation teas: 4 to 5 minutes.
Take into account, also, that leaves must be free to move but you must not stir them (let alone squeeze them!), not even gently with a spoon. It's too typical an error which only gets more tannins released, spoiling the flavor of your tea.

Conclusion and tips

You can now start and prepare your first cup of tea! I hope you enjoy it. The last tip I'll tell you is a consequence of what you read in Steeping time. If you're going to prepare more tea and drink it over time, don't let the tea in the teapot with the leaves. Remove it, instead.

Tea

I'm a real fan of tea. Since I was a child, tea's what warmed me during the winter, freshened during the summer, and delighted every noon of my life. A life without tea wouldn't be the same. Even Nobel Prize W.B. Yeats, mourning the rape of a child (in The stolen child), describes this way the melancholy of the now empty kitchen:
[...]
Away with us he's going,
The solemn-eyed:
He'll hear no more the lowing
Of the calves on the warm hillside
Or the kettle on the hob
Sing peace into his breast,
[...]
Tea is everywhere and surely everybody has had one cup. The problem is that finding, and preparing, a good tea is pretty much rarer than it may seem.

In another post, I'm telling you the basics to prepare your perfect cup of tea: maybe you'll discover and be faithful to a new taste, to new flavors you didn't know before.

In this series of post, I'll introduce you to the basic classification of teas. I say basics because tea is just like coffee or wine: if we began classifying, we wouldn't know when we'd end... Nevertheless such classification is important because it has direct implication on your perfect cup of tea: water temperature and steep time are a function of these parameters.

Geographical regions

Just like as wine, tea of different geographical regions may have peculiarities as well (such as Darjeeling). Cultivation for commercial production has meant that, with years and demand, teas is now cultivated in regions well out of the traditional tropical and subtropical zone. This has also meant that traditional indigenous species, such as Chines Tea (Camellia Sinensis Sinensis) are now cultivated in Europe as well. As far as it concerns our interests, I only remind you that tea has been traditionally classified by cultivation region in India and China. Indian most known tea, for example, is Darjeeling, which is named after the Darjeeling region whose climatological characteristics give that tea its peculiarities.

Oxidation level

As far as it concerns the average user kind of teas, the only interesting difference is the oxidation level attained by the processing of the parts of the plant used to produce tea.

Now, the basic types of tea, organized by oxidation, are:
  • White tea.
  • Black tea.
  • Green tea.
  • Oolong tea.
  • Pu-Erh tea.
A little note about red tea: there's no red tea (in Western Countries). What we call black (fully oxidized) tea is indeed what Eastern people call red tea. There's also another misnomer for red tea: rooibos. Rooibos is not a tea. Some tea shops which don't deserve their name may try to convince you but no, Rooibos plant just is not a Camellia Sinensis.

In order or oxidation (from smallest to greatest) you find:
  • White tea: completely unoxidized.
  • Green tea: low oxidation.
  • Oolong tea: the most common in China, between a 10% to a 70% level of oxidation.
Pu-Erh stands aside because it's a tea produced with different variety of the tea plant (the largest) and, moreover, is produced in a particular region of China: Pu-Erh, indeed.

Black tea, least but not last, is the most oxidized variety of tea, with a characteristic flavor, color and level of caffeine.

Tuesday, 16 June 2009

mplayer: Error opening/initializing the selected video_out (-vo) device

That was indeed the error message that mplayer was presenting me:
Error opening/initializing the selected video_out (-vo) device
Now, I had not chose one. I even deleted my ~/.mplayer folder but nothing, it got stucked there. It's strange, because mplayer should have chosen automatically a video_out device on startup and I swear I never had this problem before on my Debian/testing.

In fact, I had just reinstalled a Debian/testing distribution on Sun xVM VirtualBox on a Solaris Express Community Edition host, because I'm using it as a platform for video transcoding. I'd like to do that on Solaris but I haven't found the time to recompile at least ffmpeg, if not mplayer and all of its dependencies. Blastwave's ffmpeg, indeed, is way too old and I found some bugs that prevented it doing its job. Until then, and thanks to VirtualBox, I'll use Debian/testing instead.

Now, the solution's pretty easy but I'd like to rely on autoprobing... Anyway:
enrico@debian:~$ gmplayer -vo help
MPlayer dev-SVN-r29241Available video output drivers:
xmga Matrox G200/G4x0/G550 overlay in X11 window (using /dev/mga_vid)
mga Matrox G200/G4x0/G550 overlay (/dev/mga_vid)
tdfxfb 3Dfx Banshee/Voodoo3/Voodoo5
s3fb S3 Virge over fbdev
xv X11/Xv
x11 X11 ( XImage/Shm )
xover General X11 driver for overlay capable video output drivers
gl X11 (OpenGL)
gl2 X11 (OpenGL) - multiple textures version
dga DGA ( Direct Graphic Access V2.0 )
sdl SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
ggi General Graphics Interface (GGI) output
fbdev Framebuffer Device
fbdev2 Framebuffer Device
svga SVGAlib
aa AAlib
caca libcaca
dxr3 DXR3/H+ video out
v4l2 V4L2 MPEG Video Decoder Output
directfb Direct Framebuffer Device
dfbmga DirectFB / Matrox G200/G400/G450/G550
xvidix X11 (VIDIX)
cvidix console VIDIX
null Null video output
xvmc XVideo Motion Compensation
mpegpes MPEG-PES to DVB card
yuv4mpeg yuv4mpeg output for mjpegtools
png PNG file
jpeg JPEG file
gif89a animated GIF output
tga Targa output
pnm PPM/PGM/PGMYUV file
md5sum md5sum of each frame
If you're using gmplayer or another mplayer front-end you can probably access some video preferences menu, such as the following, and set your preference there. It will be remembered the next time you launch mplayer.
In my case I'm using VirtualBox 3D Acceleration so I chose gl:
mplayer -vo gl [my-movie]
By the way: KDE 4.2 just got its way into Debian/testing, but I'll tell you another day. Amazing experience! I wish I could use it on Solaris as well.