Categories
General blog entries

Configuring custom remote buttons for XBMC

When you are the proud owner of a MCE remote, you are set for use with XBMC. However, if you are using a custom remote (like the one that came with my Thermaltake DH-101 MediaLab kit) – you might wonder how you are going to get all the buttons to work. Short answer: you won’t by using the Lircmap.xml file.

I configured my remote using Lircmap.xml like it stated on the site and it worked fine. I modified the bit in both Lircmap.xml and Keymap.xml until the point came where you want to add buttons that are not on the standard remote.

I figured, I could just add another button to the section of Keymap.xml – in my case XBMC.EjectTray() but although XBMC started fine, you wind up with this:

ERROR: Remote Translator: Can't find button eject

This is because XBMC uses a fixed map to determine which buttons are valid. Instead of simply adding buttons by name, they have identifiers for each button so adding your own buttons won’t work.

At this point, you have 2 options:

First, if you only have a few buttons you could recycle unused buttons. Open up http://xbmc.org/trac/browser/trunk/XBMC/xbmc/ButtonTranslator.cpp and look for the function called ‘CButtonTranslator::TranslateRemoteString(const char *szButton)’; ctrl+f it if you can’t find it, right now it is at line 777. See the lines following it? Those are the valid button names. For example: ‘if (strButton.Equals(“left”)) wButtonCode = XINPUT_IR_REMOTE_LEFT;’ – in this line the name ‘left’ is specified. Look for buttons you are not using and override their action in Keymap.xml.

The second option is a bit trickier. First, create ‘advancedsettings.xml’ in de userdata folder and put ‘true’ inside the file. Restart XBMC and start monitoring the XBMC log (by default under /var/tmp/xbmc-user.log’).

Start pressing all remote buttons and note which obc code they produce. Add all these codes to Keymap.xml under the tag – create it if you have to. A valid piece would look like:

[keymap]
[global]
[universalremote]
[obc30]XBMC.EjectTray()[/obc30]
[/universalremote]
...

Note that I replaced the tag start and endings with ‘[‘ and ‘]’ because my site seems to eat the correct ones.

Good luck taming XBMC and if you can’t figure out how to read the source file with the button names, you can look at this wiki article from the XBMC website. Note that it is usually out of date.

Update: the OBC codes only worked when I was using my universal remote with the XBox setting – unfortunately, this does not seem to work for specific remotes. Drat.

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
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

New Laptop

It has been quiet a while on this site while I was working and painting my living room. After the necessary stress of the ‘hollidays’ I decided it was time to buy myself a new laptop to replace my old 17″ HP laptop.

I finally settled for a 15 inch Dell XPS in Tuxedo Black. After 2 anxious weeks, the laptop arrived a week before the planned delivery date. Even though I was still pretty sick, I took some pain meds and manned up to get my new toy.

Currently I’m trying out all the software on this baby and some of it has to go. First thing up: ditch Internet Explorer, Windows Mail and Windows Media Player and replace them with Firefox, Thunderbird and Winamp.

After tuning Windows Vista and its software I’ll start installing Gentoo Linux – I can’t wait ^^.

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
General blog entries

MoveableType Plugin Joomla! enhanced

Joomla can be used in a blog like manner using the XML-RPC interface. Unfortunately, Joomla only provides a Blogger API plugin which is rather limited.

Luckely, some Japanese people created a plugin which improved the supported XMLRPC API’s. It’s called MoveableType XML-RPC Plugin and can be found on the Joomla site.

Technically this is not only a MoveableType implementation as it supports all functions needed for MetaWeblog and Blogger as well as Google Docs (since version 2.1.0).

The only thing driving me nuts is the fact that some blog tools refuse to work because the plugin refuses to return a list of supported functions (most programs just assume everthing is supported, which is wrong as almost everything is optional).

Fortunately this is solved quickly by adding a few lines of PHP to the plugins/xmlrpc/movabletype.php file. Find the following section (around line 790):

function mt_supportedMethods()    {       return (new xmlrpcresp(new xmlrpcval(array(), "array")));    }

Replace this with the following:

function mt_supportedMethods()    {       global $xmlrpcString, $xmlrpcArray;       $functions = array();       foreach(array_keys(plgXMLRPCMovableType::onGetWebServices()) as $function_name)          $functions[] = new xmlrpcval($function_name, $xmlrpcString);       $struct = new xmlrpcval($functions, $xmlrpcArray);       return new xmlrpcresp($struct);    }

And voila, there you have it, a fully working function listing enabling your favorite blog program to do its job properly…

Categories
General blog entries

Outlook and winmail.dat

In the legal world in the Netherlands the importance of email and websites is slowly starting to emerge. Of course, the huge, almost American-style law firms are using these techniques for years and years now, but the smaller law firms and the government itself always had a negative standing towards these modern day communication channels.

One of the most common complaints was the fact that the channels were not secure (this was one of the statements around the year 2000 while the rest of the world was starting to live and breath online). Now (2008) they are slowly dumping the fax machines (like those are secure) in favor of email. One of the things that became clear was the fact that they started using plain email. No PGP, no encryption, no secure mail storage – none of the above, which sort of surprised me (still does in fact).

If I have to be honest, both the fax and email are methods of communication that are pretty hard to intercept. You would need some decent skills to get even close to intercepting the communication and even now, the most important documents (originals and private documents) are still sent by postal mail. Thats right, normal old-skool hard copies. Probably one of the safest ways to sent stuff like that around. The only downside: transport can take a while, making rush jobs impossible (you probably would not want that anyway).

But I’m starting to side track here. The point is that they are finally starting to use email. Normal (status) communication is handled this way, think listings and charts, and has replaced the printed out versions that were driven between offices in the past. The downside of it all is the fact that these forms are now send around in Microsoft Word format, making conversions between offices error prone (try to explain that to them: Word = Word in the mind of an average legal secretary) and in fact, those errors have occured before. Think pages gone missing, tables out of alignment making the data useless etc. Mix in Open Office and you have yourself quite the party. I tried to explain that PDF might be a good option as prepared lists don’t need to be altered after they’ve been mailed to another office, but that suggestion has as much chance of becoming reality as me winning the lottery.

But that is the sort of crap we can handle. Everyone knows it is flawed so they expect problems. But now someone at the court of justice found the option in Microsoft Outlook to use RTF for the mailings. Probably to make pretty colors appear in the mailings or something. The result: the message (in RTF format) and the attachments are compiled into a winmail.dat binary and sent along with the plain text message.

Now, Outlook (and maybe Outlook Express) can do something with that, however Mozilla Thunderbird can not (any non-Microsoft mailer for that matter). I tried installing a 3rd party TNEF decoder, which worked but required a lot of extra steps. I finally found this Thunderbird add-on called LookOut, which in fact is an embedded TNEF decoder. After installing, any winmail.dat attachment found in a email will be decoded on the fly – showing the components inside as separate attachments.

Even though this sort of provides a work around, tomorrow I’ll call the department and have them check out who sent those mails. It a P.I.T.A. to fix each quirk those idiots come up with and frankly – they should get their act together, not all the law firms in The Netherlands have someone to fix these kinds of issues…

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
General blog entries

Integrity issues

That’s what I get for toying with stuff I should leave alone… I tried to merge the articles from my other Joomla installation back into my main site. After clicking around for a bit it seemed like the manual database merge worked out.

Next I found a number of modules with version number 1.0.x – assuming these were remains of the original 1.0.x installation I selected them all and hit delete. On the page refresh I noticed something was off… The menu was gone! Most of the Joomla Administrator panel was working but without a menu, a lot of sections are unavailable…

After installing a second installation over the existing one I managed to get the missing modules back (note to self: make sure to download the full package AND copy all the files…) by copying tables between the 2 installations. Finally I had a working installation again but now the other users (a.k.a not me) did not show up anymore…

After Googling for weeks I finally found a thread in which somebody made a whole database schema for Joomla! 1.5. The schema can be found here.

Even though I had restored most of the key references within Joomla! I somehow missed the ‘jos_core_acl_groups_aro_maps’ table – this only had one entry: for admin only. As soon as I realized my mistake, I manually added the missing rows and everything started working properly again.

Note to self: stop breaking the site…

Categories
General blog entries

Bugatti Veyron widescreen wallpapers

After watching Top Gear and the Bugatti Veyron I looked for some decent wallpapers for widescreen laptops. Guess what, there are none! Rediculously most wallpapers out there are 800×600 or if you’re lucky 1024×768 – a resolution none of my computers uses anymore.

So I decided to whack up some of my own and while I was at it I thought about sharing them 🙂

Mind you that this first batch is all the same wallpaper but with different finishing touches. Right now I made them at 1440×900 as thats my native resolution. If and when I create more wallpapers I will post it here. Meanwhile, use the Contact form for requests 🙂

You can find the wallpapers in the gallery, under the random storage gallery (hard to miss as it shows the first wallpaper as a highlight 😉 )
Previews: