Categories
Programming

Release of new utility: Bacula Reports 0.9

I write a lot of code, most of it unsuitable for release to the public but this little gem is worth a public release.

After using Bacula to backup all my servers (both Windows and Linux) for some time, the large number of mailings you get when using it on a small server park drove me insane. Even when using filters to sort out new mail, it is hard to see if everything is going as it should be.

Enter Bacula Reports: a mail aggregator for Bacula 2.x and 3.x.

Bacula Reports consists of a faux mail command (which does not send out reports by mail but rather analyses and stores them) and a report generator which aggregates all the stored reports into one mailing with an overview and some HTML styling to make it more readable (if you don’t want HTML, modify the template to generate plain text).

By integrating the scripts into the Bacula configuration at 2 points (a mail command used for sending out reports and a job to send out the combined report), the storm of daily mails changes into one neat report at the end of the backup cycle.

Normal error messages and operator messages are unaffected and will be delivered as they used to be, only the backup reports per job are redirected to Bacula Reports.

Requirements:

  • A linux server (32 or 64 bit, tested on CentOS 5.2 and Gentoo 2008)
  • A working Bacula 2.x or 3.x installation
  • PHP as a command line interpreter (run ‘php –v’ to see if you have it)
  • 10 minutes of your time to set everything up

The cool thing of the scripts is that they require only 2 small changes in the director configuration to reroute the status mailings and if you don’t like it or run into trouble, reverting is normally a matter of simply commenting out the modified lines and restoring the old ones.

One drawback for some people: it requires PHP on the command line (as stated before). The reason for this is very simple: I want to use the same code in the future for a web GUI and my unix-scripting skills are virtually non-existing compared to PHP or Java.

Even though its PHP, the scripts have a small footprint and run very fast – they should be easy to add to any existing Bacula environment.

{jd_file file==5} {jd_file file==6}

Categories
How-To's

Postfix and Cyrus SASL authentication

It has been a while since I’ve had the time to blog about something. Mainly that is because my study is demanding a lot of time and because I am working on some new thing which keep me pretty occupied. I will write about those things some other time.

Right, on to Postfix and Cyrus SASL. Most of my servers are running some flavor of *nix and because I started to like the low effort CentOS needs to keep running, I rebuild all my Gentoo based systems (which took hours to compile and then manually upgrade thanks to the ever changing configuration of a gazillion programs) to CentOS versions – including my Postfix + Courier-IMAP + MySQL mail system. This setup is pretty common as the first guide I found on the HowTo forge for CentOS 5.x was almost verbatim what I had done while porting from Gentoo to CentOS. Also, see the Gentoo guide I used to set it all up (also usable for CentOS).

The only thing I never got going – because I never needed it – was SMTP authentication. Now, when other people send mail to your server they will not need to authenticate: the server is the end-point for the email and as such it will accept any mail sent to the domains hosted on it. So when do you need authentication? When you want to relay.

Now, relaying has a bad name on the internet, try to Google for it and see what comes up. But relaying itself is not a fluke, its a solution. In my case, I have 2 reasons for relaying.

First, at work and at my parents, I can send mail just fine using the ISP mail servers (which I have to change every time I switch locations *sigh*) but the mail servers are a bit too well educated. My domain is currently an alias (CName to be exact) for a DynDNS address. When sending mail, the mail servers resolve and expand the domain I claim to send from and rewrite the address. This means that sending to mailing lists becomes impossible and other people wonder what a ath.cx address is…

Secondly, at home I can’t send mail at all because the idiots at my ISP (I will write about the woes another time) told their mail servers that the server had to match the sender (domain wise). Because of the fact that I am not allowed to link the DNS to my IP directly, this will resolve in – yet again – 2 different domains and in this case the mail is bounced back to me.

In both cases it would be very handy to be able to just send mail using my own mail server as it will deliver mail directly to the correct remote servers, using the correct names etc.

On a side note, the government has decided that is would be a great idea to store all mail traffic for everyone in the country to fight crime. As usual, declaring such a policy will simply tell everyone who is planning to blow up stuff to use alternate means of communication – most of it being encrypted and voiding the whole purpose. To that end, I like the idea of using my own mail server on an encrypted channel so my mail remains private and let everyone listening in what dark secrets I send around. (On a side note: yes, the server to server communication can not be encrypted unless both servers know how to – but the first bit is safe).

Now, on with the details. I assume you have Postfix running with MySQL, so it is delivering mail to a maildir on your server or forwarding it somewhere else. Courier (IMAP/POP3/whatever) is running as well and can access the mail delivered for Postfix and as such, your whole mail server is up and running. Now comes the catch: Courier has a authentication library which should be able to authenticate against MySQL. Most installations will use Cyrus SASL instead because it has more features (and in my case was easier to set up as I am using postfixAdmin to administrate the server).

You NEED Cyrus SASL 2 with the SQL plugin installed, if you use Courier Authlib you need a different guide or change the authlib you are using. If you use CentOS like me, run: ‘yum install cyrus-sasl-sql’ to grab the right plugin.

Now, open up ‘/usr/lib/sasl2/smtpd.conf’ to create the specific SASL authentication file for Postfix. On a side note: in my case, I didn’t have to start the service for this to work. Anyway, insert this:

pwcheck_method: authdaemond  log_level: 2  authdaemond_path: /var/spool/authdaemon/socket

The first line tells Postfix to use the Cyrus SASL daemon (instead of the Courier Authlib one). The second line is optional but is handy when debugging, increase if things don’t work so you can see what is happening. The 3rd line is crucial: this is the path to the socket of the Cyrus SASL daemon. On CentOS 5.x you should have it here, on other distributions you need to search for the socket and put it in there.

Now you have set up the SASL authentication settings, it is time to tell Postfix to check the SASL pipeline when someone tries to authenticate. Add the following to your main.cf:

# SASL settings  broken_sasl_auth_clients = yes  smtpd_sasl_auth_enable = yes  smtpd_sasl_authenticated_header = yes  smtpd_sasl_security_options = noanonymous  smtpd_sasl_local_domain =  # Used by SASL to identify the Postfix client  smtpd_sasl_path = smtpd

These settings are pretty safe, won’t turn your box into an open relay (the bad sort of relaying abused by spammers) and will still make it possible to use pretty much every mail client out there. Note the last line: that line sets the key word when Postfix will try to authenticate: that is why the SASL configuration is called smtpd.conf. Another reason to use this name is the fact the smtpd is the name of the daemon that will request authentication and on some distributions, it will automatically search for that name.

Now safe, restart postfix and try to authenticate (set your mail client to connect to your server when sending mail and to use the same username and password you need when recieving mail). If everything went well, you can now send mail to anyone, from anywhere using your very own address and just one mail server!

If you get this:

[postfix/smtpd] warning: SASL authentication failure: cannot connect to Courier authdaemond: Connection refused

…you have a problem. Ignore the bit that says Courier authdaemond – you are trying to connect to Cyrus but Postfix doesn’t know this and as you are using the Courier interface, it will tell you something that is incorrect. The message means that it couldn’t find the socket, it is not allowed to access the socket or a similar issue is preventing it from working.

Step 1: Do NOT hardlink the socket to the SASL directory to include it into the Postfix root jail. This will work as long as the system is up: if the authlib daemon is restarted, it will recreate the socket and your hardlink will be dead – sending you off on a goose chase (guess how I found out that one… afterwards I also found this conversation about it)

Step 2: Make sure the socket file is where you told Postfix it would be. Try restarting all services and make sure the timestamp on the socket changed when you restarted everything. If it didn’t change, you are referring to the wrong file. Try to delete it, restart everything again and you won’t see it reappear. Search for it again and fix the path in the smtpd.conf file.

Step 3: When accessing the socket, you need more than read and write access to the socket. You also need r/w access to a random regular file in the directory holding the socket. This is how sockets work and if I understand correctly, a hidden file is used once a program opens the socket to continue the session – hence you need to be allowed to create that file. On CentOS, open ‘/etc/group’, find the line that says ‘daemon:…’ and add ‘postfix’ to that line, use a comma if one or more names are on that line already. Now Postfix is part of the daemon group which owns the socket directory on CentOS. If you have a different distribution, find out who owns the directory, who is running postfix (usually this is the user + group ‘postfix’ or ‘mail’) and fix it.

Step 4: Restart all services or the whole system if you get here. Read the log files again looking for hints what went wrong. If you still have problems, try to Google for it or leave a comment.

Good luck!

Categories
General blog entries

Power Consumption

Because now and then I wind up in a discussion about power consumption of random electronics I decided to measure the power needs of some random appliances around the house. These are the results:

  On / Powered Standby / Sleep
19” CRT monitor 85W 0W
17” CRT monitor 37W 1W
@Home Digital Cable Decoder 6W 6W
CRT TV 59cm (23”) 60W 6W
LCD TV 26” (66cm) 112W 1W

Please note that these are just an indication, a similar device you own might have different power needs but this gives you an idea at least. Also the TV’s I measured are relatively old (CRT, 15 years, the LCD 7 years) and modern LCD TV’s use less power but are bigger (so the Watts per inch are lower but the total power usage is larger).

Categories
General blog entries

Download videos from Crunchyroll

With Dattebayo dropping Naruto Shippuden because CrunchyRoll will legaly release just hours after TV Tokyo airs, I decided it was time to write some magic to download the videos from Crunchroll. You see, I have a HTPC in my living room and I don’t really fancy watching Naruto in a browser when the time comes.

Disclaimer: this will NOT allow you to download paid shows without paying. Personal use only, don’t be an **** and distribute the video.

This will only work in FireFox – also, it will only work on the H264 videos. Put the following code in a file and install it into GreaseMonkey:

crunchroll_video_download.js

// ==UserScript== // @name           Provide download link on Crunchroll videos // @namespace      http://www.crunchyroll.com/ // @description    This script extracts the file name from the player code to allow the user to download it. // @include        http://www.crunchyroll.com/media-*/*.html?h264=1 // ==/UserScript== // Get the div holding the player object var div = document.getElementById('showmedia_left_col_new'); // Grab the script in that div which constructs the player var script = div.getElementsByTagName('script')[0]; // Extract the configuration array from the script content var config_str = /"config":"([^"]+)"/.exec(script.innerHTML); // Decode the URI encoding which is used on the config parameter, we now have some XML structure var html = decodeURI(config_str[1]); // Grab the file tag from the XML content var filename = unescape(/([^<]+)/.exec(html)[1]);  // Find the message box on this page var msgbox = document.getElementById('message_box'); // Remove the style which hides it msgbox.setAttribute('style',''); // Get all divs inside the message box var divs = msgbox.getElementsByTagName('div'); // Set this to the div which should hold the message var msgdiv = null; // Loop through all found children to find the right one, with a class name 'message-list' for(i = 0; i < divs.length; i++) { 	if(divs[i].className == 'message-list') { 		msgdiv = divs[i]; 		break; 	} }
Categories
How-To's

Compiling Courier 0.60.0 into RPMs for CentOS 5.2

In this article I will explain how to build RPM packages from the tar.gz packages on the Courier site in order to install Courier and/or its components using the RPM based installer in CentOS.

Server crashes always come when you least expect them. My trusty server just came down with a bad case of broken SATA controllers (don’t know how to cure that). Of course, the socket A cpu (Athlon 2600XP) motherboard is long out of fashion and so we wind up with the purchase of a new server (technically an HTPC but I’ll post something about that later on).

One of the key packages I use for years is Courier MTA. This software is supported fine by Gentoo but because the number of servers that I need to maintain is steadily growing, the drive for cutting edge kernels and software is fading as upgrading Gentoo systems can be a time consuming process.

So in the reinstall I decided to drop the mail, web and ftp services into a virtual CentOS machine so I could move the server to a different computer in case of the physical host failing.

The first thing that became obvious was the lack of Courier RPM’s out there, simply because the Courier package from the site can be converted into RPM’s with ease. If you are reading this then you probably have not compiled packages before and you need some help.

Disclaimer: I am using a setup which uses MySQL based authentication so I will remove the other database packages as soon as I am done – if you need those, be sure to omit those commands.

Start out by installing ‘rpmbuild’ as we will use it to build the packages:

yum install rpm-build

Next, get the latest source tarball from here.

As a normal user (running as root will give you an error so don’t bother) run the following:

rpmbuild –ta courier-0.60.0.tar.bz2

In my case I got this error telling me I don’t have enough permissions to write where the rpmbuild tool wants to put its files:

error: Failed to rename /usr/src/redhat/SPECS/rpm-spec.uykL0j to /usr/src/redhat/SPECS/rpm-spec.uykL0j: Permission denied: No such file or directory

This is a bother because Courier requires you to be non-root and rpmbuild requires you to be root. I solved this by temporarily changing the /usr/src/redhat owner to be me:

chown berend:users /usr/src/redhat –R

Running rpmbuild again now shows us a list of missing dependencies, in my case I had to install:

yum install expect libtool-ltdl-devel gdbm-devel pam-devel gnutls-devel mgetty-sendfax pcre-devel openssl-perl gamin-devel

One of the missing requirements is the ‘/usr/lib/ltdl.h’file – this is part of the libtool-ntdl-devel package. Another is ‘/usr/include/fam.h’ which is provided by gamin-devel.

The primary missing package however, is courier-authlib-devel. We can solve this by going back to the download page and downloading the courier-authlib tarball. After grabbing it, run rpmbuild on it:

rpmbuild –ta courier-authlib-0.61.1.tar.bz2

On my system the following was required to be able to build the RPM:

yum install libtool libtool-ltdl-devel openldap-devel mysql-devel zlib-devel postgresql-devel gcc-c++ redhat-rpm-config

Note that if you skipped installing the dependencies for courier itself, some of those packages are needed for courier-authlib as well.

After calling rpmbuild again on the courier-authlib tarball, the compiler should kick in and the build will complete on its own. After the build is complete, install courier-authlib-devel to be able to build Courier itself (you can later remove this if you don’t need it), you need to run this as root:

rpm –i /usr/src/redhat/RPMS/i386/courier-authlib-0.61.1-1.i386.rpm rpm –i /usr/src/redhat/RPMS/i386/courier-authlib-devel-0.61.1-1.i386.rpm

If did everything right, calling rpmbuild on the courier tarball will now fire up the compiler on courier itself, resulting in a neat pile of RPMs in ‘/usr/src/redhat/RPMS’ – most of which have self-explanatory names or are dependencies of each other.

Before installing Courier, lets clean up the mess we had to make to get here, run this as root again:

yum remove libtool libtool-ltdl-devel openldap-devel mysql-devel zlib-devel postgresql-devel gcc-c++ redhat-rpm-config gdbm-devel pam-devel gnutls-devel mgetty-sendfax pcre-devel openssl-perl gamin-devel courier-authlib-devel  chown root:root /usr/src/redhat –R

Note that we omit ‘expect’ from the remove command as it is needed by courier and its packages.

And there you have it, a complete guide to building your own Courier RPM packages on CentOS 5.2. All that is left is to actually install the RPM’s and set up Courier but that is beyond this little howto.

Categories
General blog entries

Restoring Windows 2003 SBS R2 Exchange

Windows 2003 SBS was always a bit weird for me. I’ve been playing with computers all my life and I know Windows Vista and earlier versions like the back of my hand but when it comes to server software on Windows I always have this unnerving feeling.

You should know that most of the time my presence is required when a server is almost dead or acting strangely so my experience shows that an unstable Windows server is usually ‘fixed’ by a complete reinstall – something I have never had to do to my linux servers.

Right now I am installing Windows 2003 SBS R2 for somebody I know. Their previous administrator never felt the need for finishing the setup or actually buying the license so when I came in, all I could do was reinstall the whole system.

I created a backup using NTbackup from the Exchange Store (which was half disabled on their server) and now I am trying to restore it. Guess what: it won’t.

I hate Microsoft for its poor practices and this is one of them: supplying backup tools that work within a very very confined space. In this case a fresh install will kill the option of restoring it without extensive Google-ing.

To be exact: I unmounted the Mailbox Store, marked it for restoration in the properties and fired up NTbackup to restore the backup. After setting a temp path (C:\temp) I hit restore and immediately see the whole thing fail. Of course NTbackup can’t tell me jack so I need to dig in the Application Log and I find this:

Event Type:  Error Event Source:  MSExchangeIS Event Category:  Exchange Backup Restore Event ID:  9635 User:  N/A Computer:  WIN2003 Description:  Failed to find a database to restore to from the Microsoft Active Directory.  Storage Group specified on the backup media is 581cb7ee-5fec-4d93-8f71-dcfe55a73319.  Database specified on backup media is Mailbox Store (SERVER1), error is 0xc7fe1f42. 

After searching high and low I finally get a blog post from someone who solved this. The error is in fact so simple, they should execute the team that thought that this was a funny way to describe it.

The names don’t match. Seriously.

In the Server Console –> Advanced –> Exchange –> Servers –> Win2003 –> First Storage Group you will find a store called ‘Mailbox Store (WIN2003)’ – assuming your server is called win2003 – whereas the backup has a store called ‘Mailbox Store (SERVER1)’. NTbackup can’t fathom the possibility that we actually want to restore to a store on this server without the exact name match so it fails.

Solve this by right-clicking on the store, renaming it to the old name and restarting the restore. It will run now.

On a side note – this was not the end for me. I got event id 1088 after I managed to restore it: Distinguished Name is not the same for the Store and the server. I can’t grasp why them Redmond idiots haven’t made it possible to simply rename the DN of the store to make it work in case of a migration like now.

I tried renaming the legacy DN using the ADSI editor and the LegacyDN tool from the site. I couldn’t get it to work after trying 50 guides so finally I tried to uninstall the server software. This failed (of course) and left me with a system in which I couldn’t resume the setup. So after a new installation and 2 hours of waiting/babysitting I am back where I started, ready to restore my Exchange backup…

Categories
General blog entries

Why I don’t like Ventrilo

Recently I installed Ventrillo because some red necks decided we needed a voice server for EVE Online and the in-game stuff won’t cut it. Ventrillo advertises with ‘advanced’ features like surround positioning and useless crap like that.

At first glance I’d say the GUI is old-skool, bit too plain and awkward to set up for the first time. It annoys the heck out of me where all panels are placed and how it all comes together.

Perhaps profiles are useful for some but not for me: I need a separate name for all servers I use in voice chats so profiles separate from the server settings is as useful as picking up your hamburger at a different counter from your fries…

Next up is the fact that it won’t minimize into the system tray, leaving me with yet another window to lug around.

Finally it has no Linux client. Seriously. It is in the works (or so the site says) but the do have a linux server, leaving me puzzled why linux is not supported in the first place.

The only cool thing that Ventrillo has (and Teamspeak will get in version 3.0 which is currently beta) is the surround stuff… Which I can’t try because I don’t have a surround setup on this computer…

Ow I long for the days where everyone would just stick to Teamspeak, which is still masterfully better suited for voice chat than all the other programs around…

Categories
Linux / Gentoo Linux

Why Pulseaudio sucks…

A while back, I got really annoyed from the fact that when I was running Gentoo and I decided to play a game (Wine/Cedega) like EVE Online, I either have the sound from EVE-Online, or from my desktop – but not both.

This is usually due to a crappy sound card (no hardware mixing) and a driver which fails to fix this. I knew ALSA had dmix for software mixing but I read somewhere that pulseaudio was the new hot shot in the mixing scene. I was wrong.

You see, after enabling pulseaudio in Gentoo, rebuilding a number of packages to support it (Xine-lib for example) and following the guides to make ALSA-only applications use pulseaudio as well (in fact by looping the sound back from ALSA to pulse and again to ALSA), it should just work ™.

My first attempts were fine, I used aplay to select the pulse channel, played 6 songs at once and all was well. When it was time to make Phonon (KDE4) use the new pulseaudio sink, nothing happened. I even used the workaround as explained on the pulseaudio page – but nothing helped. I finally made the default audio-sink pulseaudio.

Next up: Wine. The first attempt to start Winamp went fine, except for the fact that I didn’t hear no sound. Looking in the logs, I see wine attempting to open the ALSA/Pulseaudio library from ‘/lib32’. For the more perceptive of you: yes, it want 32-bit libraries on my 64-bit system. Normally this is handled by a emulation package but guess what? The Gentoo emulation packages don’t feature these only slightly vital libraries.

After reading the bug page which explained the problem, I found a site of someone who provided the 32-bit binary drivers for ALSA/Pulseaudio. And indeed, after extraction into ‘/lib32’, sound came to life from the mysterious world inside Wine.

Then I tried to start World of Warcraft. The stuttering sound of a screwed up sound mixer emerged from my speakers and no matter how I started the game, the sound was useless. Finally I gave EVE-Online a try and it had the same, horrible sound output…

So I reverted everything I did, read up on how dmix was supposed to work (which seemed like a lot less work after following the ‘simple’ guide on the pulseaudio site), set up a software mixer and made it default and there we go – audio output for all!

Now I don’t know who decided that pulseaudio was ‘lightweight’ and ‘fast’ but I know for sure that its neither – the default dmix extension for ALSA works a million times better…

Categories
General blog entries

Review of Ergo Proxy

Last week I finished watching Ergo Proxy, an series of 23 episodes and I just can’t resist to put up a small review about it.


Click for full version

The story begins in a futuristic domed city called Romdo, built to protect its citizens after a global ecological disaster. In this utopia, humans and androids coexist with each other peacefully under a total management system. For some reason, some androids go on a killing spree. Re-l Mayer (see image) is assigned to investigate some of the murders with her android partner Iggy.

Ergo Proxy has it all: dark, sinister surroundings, animation which is far above standard – I dare say most of the time on par with Ghost in the Shell 2 (which I consider the ultimate anime style, a mix of computer generated and good old hand work). The main character has a gothic like appearance and she is just plain hot. During the series we get a few shots of the female lead in her undies, even a short flash of some under-boob but nothing more than that: kiddy-save and not even close to the ecchi category.

So far, its all the ingredients far a kick ass show… But wait, it gets even better. During the series we get some awesome action scenes and all of the eye candy is accompanied by a truly awesome soundtrack. Actually the production team of Manglobe did pretty much everything right to create a truly fantastic series.

So here comes the ‘but’. The animation, sound, characters – all great, but the story just blows… Its horrible: the first half of the series everything slowly becomes clear and everything is peachy – no even better than peachy as I was sitting on the edge of my seat. But after 14 or so episodes you get this uneasy feeling that something is off.

I still can’t pinpoint it but by the time it goes really off the rails you have been watching for some time while having this suspicion that its all wrong – just plain wrong. I still had high hopes right up until the end – I mean, a show which has such outstanding looks can’t just suck, right?

Unfortunately the ending does not safe this sinking ship. I have to applaud the creator of this masterpiece of an ending: it was certainly nowhere near what I would expect. I’m still pondering if I think it makes sense – so far I concluded the beginning and the end must be the product of different writers while a 3rd attempted to link the 2 together.

To be honest, this show is one of my biggest disappointments: I randomly ended up with Ergo Proxy and after 2 episodes I was hooked and expected a treat like GITS was (which one? Pretty much all GITS series/movies) but was seriously let down. I’m giving the show a 5 out of 10 rating for the simple fact that it was cool to watch (most of it anyway), but for the shear lack of a decent story it doesn’t get a single point more…

Rating:

  • Animation: 9 / 10
  • Sound: 8 / 10
  • Characters 7 / 10
  • Story: 3 / 10
  • Overall: 5 / 10
Tags van Technorati: ,
Categories
How-To's

How to make Bleezer look good

Like I posted in a previous entry, I hate the way Bleezer looks on linux. The screenshots look great but I guess the author is using MacOS.

Personally, I like the Substance Look and Feel, even if its a bit heavy to render (the GUI gets a little sluggish if the windows get complex). I downloaded the 4.3 release from the Substance site and used the docs to figure out what argument to feed Java.

Note that Substance has multiple skins, all are a little bit different from eachother. This is why the Substance package has multiple classes you can select for the L&F.

Back to Bleezer. I tried making Bleezer use the Substance L&F by means of the command line. Something like this was supposed to work:

java -Dswing.defaultlaf=org.jvnet.substance.skin.SubstanceBusinessLookAndFeel -cp .:substance.jar -jar Bleezer.jar

However, it did not. For some reason you get this:

Exception in thread "main" java.lang.Error: can't load org.jvnet.substance.skin.SubstanceBusinessLookAndFeelat javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1337)at javax.swing.UIManager.initialize(UIManager.java:1418)at javax.swing.UIManager.maybeInitialize(UIManager.java:1406)at javax.swing.UIManager.getUI(UIManager.java:1003)at javax.swing.JPanel.updateUI(JPanel.java:109)at javax.swing.JPanel.<init>(JPanel.java:69)at javax.swing.JPanel.<init>(JPanel.java:92)at javax.swing.JPanel.<init>(JPanel.java:100)at javax.swing.JRootPane.createGlassPane(JRootPane.java:527)at javax.swing.JRootPane.<init>(JRootPane.java:347)at javax.swing.JFrame.createRootPane(JFrame.java:260)at javax.swing.JFrame.frameInit(JFrame.java:241)at javax.swing.JFrame.<init>(JFrame.java:164)at com.bleezer.Bleezer.<init>(Bleezer.java:112)at com.bleezer.Bleezer.main(Bleezer.java:1556)

After trying a million tests to make sure the JAr file was included I finally ran a decompiler over Bleezer and it looks like Bleezer will only attempt to set the L&F on Windows and MacOS. This means the linux users are stuck with the Metal L&F and Bleezer does not provide an option to change the skin.

In a previous post I showed how you can override the L&F for Bleezer using the command line. For some reason, that same trick won’t work here so we’ll work around it.

The solution is to add the Bleezer JAR to the class path and then manually specifiy which class should be run. Using this trick, you can make Bleezer use the new L&F.

Putting it all together you could make a launch script to fire up Bleezer using the new Look and Feel:

#!/bin/bashjava -Dswing.defaultlaf=org.jvnet.substance.skin.SubstanceBusinessLookAndFeel -cp .:substance.jar:Bleezer.jar com.bleezer.Bleezer

And here is the end result, before:

…and after:

Technorati: