Gentoo: Pebble 2.3.1 on Tomcat 5.5 and Tomcat 6 (using JDK 1.5)

In Gentoo, a couple of manual configuration steps are required in order to make Pebble run on Tomcat 5.5, using JDK 1.5. So, apart from the obvious (like emerging Tomcat, a JDK, fetching pebble-2.3.1.zip etc.), I had to do the following:

  • In /usr/share/tomcat-5.5/lib, add the following two jar libraries from the pebble-2.3.1.zip archive (they’re located in the lib subdirectory):
    activation.jar
    mail.jar
    Further create symlinks to these two jars in /usr/share/tomcat-5.5/server/lib:
    o2 # cd /usr/share/tomcat-5.5/server/lib
    o2 lib # ln -s ../../lib/activation.jar .
    o2 lib # ln -s ../../lib/mail.jar .
  • Make sure these two jar files are in Tomcat’s CLASSPATH. Astonishingly, placing them in the above directories is not sufficient in Gentoo, one needs to explicitly add them to the CLASSPATH too. Thus, in /etc/conf.d/tomcat-5.5, edit the CLASSPATH to make it look as follows:
    CLASSPATH=${CATALINA_LIBDIR}:${CATALINA_LIBDIR}mail.jar:${CATALINA_LIBDIR}activation.jar
  • In /usr/share/tomcat-5.5/common/endorsed, add symlinks to xalan.jar and serializer.jar (in order to get rid of the “javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found” error message):
    o2 # cd /usr/share/tomcat-5.5/common/endorsed
    o2 endorsed # ln -s /usr/share/xalan/lib/xalan.jar .
    o2 endorsed # ln -s /usr/share/xalan/lib/serializer.jar .
    These two files are part of Xalan (’emerge xalan’, if necessary)
  • On my Gentoo server, I had to explicitly set the dataDirectory property Pebble uses, as by default, the variable ${user.home} seemed to point to /dev/null in a secured Tomcat environment. So, make sure the property file ./WEB-INF/pebble.properties in the pebble.war file defines
    dataDirectory=/var/pebbledata
    (or whatever directory you want pebble to store the actual blog data in) instead of
    dataDirectory=${user.home}/pebble
    Important: Make sure this directory (here: /var/pebbledata) exists (create it, if necessary) and is writable by Tomcat (i.e. user tomcat or group tomcat)
  • I’d suggest you rename pebble.war (from the pebble-2.3.1.zip archive) to something more generic, e.g. blog.war or news.war before deploying it to Tomcat. Like this, the relative URL for accessing the blog will automatically start with /blog or /news accordingly (instead of /pebble). The naming is a matter of taste though. To deploy the war file, simply copy it to /var/lib/tomcat-5.5/webapps and restart Tomcat (which might not even be necessary, actually):
    o2 # /etc/init.d/tomcat-5.5 restart
  • If you want to use the Tomcat Manager web application in order to monitor, start and stop webapps like pebble (you probably want to do this), make sure you define a user with the role ”manager” in /var/lib/tomcat-5.5/conf/tomcat-users.xml (this file is empty by default). E.g. add the following user:
    <tomcat-users>
    <role rolename=”manager”/>
    <user username=”tomcatmanager” password=”t0tallySecretPassw0rd” roles=”manager”/>
    </tomcat-users>

For Tomcat 6, the required changes are analogous. ASAP, I’ll verify these steps with Pebble-2.3.1 on Tomcat 6 using Sun JDK 1.6. Stay tuned..

Firefox 3 – suggestions for GUI design improvements

Some suggestions for improving the GUI of FF 3:

  • Why does the forward button have a very different shape than the back button (round vs. rectangular)? On IE 7, both have the same shape (round) which is more consistent and more user-friendly (as they’re both navigation icons, just for opposite directions). BTW: Yes, I know the official answer, but the different size is still no excuse for different shapes.
  • Why does FF 3 try to squeeze as much information as possible into the URL text field? Instead of combining the security certificate information with the favicon display (a fact that likely confuses users, particularly Joe Average), one should rather reserve a dedicated place just for displaying the security information (like IE 7 does).
    The star (bookmark??) icon within the text field is also disturbing as it doesn’t behave the way a sane user would expect it to. Instead, clicking on it creates a bookmark (without asking for confirmation), clicking on it again doesn’t just silently remove it again (without asking for confirmation), but rather displays a dialog box with bookmark properties (and another button to remove the bookmark, eventually). Further, the bookmark icon behaves quite different than the analogous magnifier/search icon in the search box.
  • Why isn’t it visually more obvious to the user whether (or not) a connection is properly encrypted and the server properly authenticated through a certificate? Why not use a light-green (or light-yellow) background color (again) for the URL text field of properly secured connections? Instead, all the user is left with now is an almost unnoticeable background color change of the favicon display area and a “secured lock” icon in the status bar. (Note: IE 7 does it better, but only a bit.)
  • Why did they choose blue as the color to indicate a secured connection (the same goes for IE 7)? I’d rather choose green (or maybe yellow, but definitely not blue).
  • Why does the drop-down icon in the URL text field look different than the drop-down icon in the search field (mouse-over tinted vs. permanently tinted)? Only God and the GUI designer know. But it surely confuses users as it isn’t consistent. (BTW, IE 7 is also inconsistent in this regard.)
  • In my view, placing the reload and abort icons after the URL text field (as in IE 7) instead of in front of the URL text field would be more natural.

Easy user navigation on mobile GUIs

Getting mobile UIs right

BTW, I have a rather unconventional (but probably the more interesting) idea how to make user navigation on small, mobile devices (such as mobile phones) much more user-friendly. Particularly in those cases, where current approaches lack the most (e.g. with mobile web browsing). And guess what, it doesn’t even require any new sensors or any other hardware that isn’t there already :) (Contact me, if interested.. ;)

Setting up postfix for virtual mail hosts

After setting up name-based virtual web hosting for Apache, I’ve just set up virtual mail hosting for my new company, Printscreen GmbH, using postfix – and it was amazingly simple! :) For some basic virtual mail hosting using normal UNIX/Linux user accounts, all you need is a plain-text file (‘/etc/postfix/virtual’) that maps virtual mail addresses to the actual user accounts and two additional lines in main.cf:

/etc/postfix/virtual:
postmaster@example.com postmaster
# Uncomment entry below to implement a catch-all address
# @example.com jim

/etc/postfix/main.cf:
virtual_alias_domains = example.com
virtual_alias_maps = hash:/etc/postfix/virtual

Then just execute

# postmap /etc/postfix/virtual && /etc/init.d/postfix reload

Voilà!

The nice postfix readme file for this and some more complicated virtual mail hosting configurations:

http://www.postfix.org/VIRTUAL_README.html

Another, possibly helpful howto (search):

http://www.freebsddiary.org/postfix.php

For setups using a MySQL database as a backend for storing the mappings, see Google. I currently don’t need this and hence don’t like to introduce any unnecessary MySQL dependency to my postfix server – remember the KISS principle ;)

Reclaiming a zombie nick/session in IRC

Sometimes, it happens that one’s IRC session isn’t terminated properly (i.e. when the IRC client crashes). When logging in again, you may not be able to login with your real nickname (‘mynick’) and have to temporarily use another nickname (let’s say ‘fallbacknick’). The easiest solution to this problem is declaring the zombie session as a ghost with the help of nickserv. You can do this with an IRC nickserv command similar to this one:

/msg NickServ GHOST mynick mypassword

Afterwards, you can reclaim your original nickname again:

/nick mynick

The complete help page about this nickserv command:

***** NickServ Help *****
Help for GHOST:

GHOST disconnects an old user session, or somebody
attempting to use your nickname without authorization.

If you are logged in to the nick’s account, you need
not specify a password, otherwise you have to.

Syntax: GHOST <nick> [password]

Example:
/msg NickServ GHOST foo bar
***** End of Help *****

Jingproject, screencast.com and Logitech G9 Laser Mouse SetPoint 5.0

I’ve just installed the free (as in ‘free beer’) Jingproject client by that allows to capture screenshots or screen videos and store or upload and share them (e.g. on screencast.com). It’s amazing, how easy and convenient it is to use – good job! There are clients for both Windows and Mac OS X (which will likely be important for me very soon as I intend to buy a new MacBook Pro with LED backlit display and a Penryn Core 2 Duo processor). The only thing missing is a Linux client (but we’re used to that, aren’t we? ;). Jingproject is provided by TechSmith, the creators of the well-known (and also great) SnagIt screen capture application.

Here’s an example of a screencast I just recorded (no sound, though):

Logitech G9 Laser Mouse SetPoint 5.0 German

It shows the great variety of configuration options you have for customizing your Logitech G9 Laser Mouse using SetPoint 5.0. The Logitech G9 Laser Mouse is Logitech’s latest “gamer” mouse and the best and most accurate mouse I ever used. I bought it though I’m not much of a “gamer” actually, but the form factor, features and its high quality convinced me. It’s quite a small mouse compared to other mice, but that’s intentional as you move it with your fingers rather than with your wrist or arm. This makes it a very user friendly (and particularly gamer friendly) pointing device as you’re much quicker in pointing and clicking while using less energy. The small form factor however might be a problem for you if you have really big hands (check it out in the next hardware store before you buy!).

Further, it’s a mouse with a cord, so you don’t need to worry about batteries, lag or interferences. So in short, I highly recommend the Logitech G9 Laser Mouse. For me, the only minuses are its rather high price and the fact that there is no SetPoint for Mac OS X (let’s hope Logitech will port it soon).

9 out of 10 points from me.

Air traffic for ZRH/LSZH: A Google maps mashup

The Air Traffic Google maps mashup (provided by ZHAW) that displays departing and arriving planes at Zurich airport has received quite some media attention. It’s not fully real-time for technical and security reasons (fear of terror attacks, as usual) and when observing the airplane lineup during the approach to runway 28 I noticed that some planes were not displayed (I don’t know the reason however). A nice idea nonetheless.

From an inflationary to a cyclic universe?

I have to admit that due to lacking knowledge in this area (and very limited knowledge in cosmology, physics and mathematics in general), I couldn’t really follow all ideas and models proposed in the popular new cosmology book “Endless Universe: Beyond the Big Bang” by Paul J. Steinhardt and Neil Turok. So don’t ask me whether I favor one over the other model – I simply can’t judge them, not even from a theoretical point of view. For me as a layman, it’s an interesting reading though already for the fact that the idea of a cyclic universe challenges the very popular, widely believed and almost taken-as-a-fact view of an inflationary universe.

For a next book about this topic though I would prefer one that puts more emphasis on mathematical formulae and derivations rather than prose as I would like to be able to better understand the proposed models and logical consequences. I’d be fine if I was presented a solution to highly complex mathematical equations I couldn’t solve myself (even with the help of Mathematica) as long as I get to know the underlying mathematical formulae and the confidence that others can verify the statements. With prose only in (popular) scientific books I always feel a bit “cheated”. And often, 200 pages of prose equal 10 pages of formulae, so I prefer the latter.

It would be great if the scientific community could find some experimental evidence for or against one or another model in the next couple of years, but that might be the even bigger challenge than the theoretical one, according to this blogpost on Not Even Wrong.

Security through obscurity

[..] bei Sportgrossveranstaltungen wie der UEFA EURO 2008™ ist es üblich, dass die Eintrittskarten erst wenige Wochen vor Turnierbeginn gedruckt und versandt werden. Dies ist im Sinne der Sicherheit und verkleinert das Risiko, dass die Tickets den Karteninhabern vor den Spielen abhanden kommen.[..]

Isn’t it nice how the “EURO 2008 SA” cares for us? ;)