Cyrillic (and other language) support for the Pebble Watch

The stock firmware of the Pebble Watch only seems to support English and other western languages out of the box. As I sometimes receive messages and notifications in Cyrillic, it was annoying that these were not displayed correctly (i.e. all the unknown characters were replaced by a rectangle)

On the Pebble site itself there is nothing mentioned on how this can be enabled, so it looks like it is not supported out of the box. Fortunately the smart people of PebbleBits have found a way around this and offer modified firmware versions with support for additional character sets and also a small number of other patches. They state clearly that their site is not operated by or affiliated with Pebble in any way but it offers a very interesting Firmware Generator, which offers support for a number of language sets:

  • Symbols, Emoji
  • Latin-based: English, Croatian, Czech, Danish, Dutch, Estonian, Finnish, French, German, Hungarian, Icelandic, Italian, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Slovak, Spanish, Swedish, Turkish
  • Cyrillic: Belarusian, Kazakh, Macedonian, Russian, Ukrainian
  • Other: Greek, Hebrew, Thai, Vietnamese

For modern firmwares (v2.5+) there seems to be sufficient place to add a number of languages, older firmware versions have some limitations. In addition to adding characters, it is also possible to apply a number of patches to the firmware itself:

  • Disable default watchfaces
  • Disable default main menu entries
  • Display phone number instead of contact name on incoming call
  • Additional quick launch options for apps
  • Change buttons layout of stock Music app (my favorite as it adds the option to control the volume)
  • Translate the interface to a another language

After the selection is made, the custom firmware can be downloaded. This should be done from a smartphone that is connected to the Pebble watch, the site works great on a mobile phone, but also provides a QR code that can be scanned by the phone to download the firmware. The installation is seamlessly done by opening the file with the Pebble app, which guides you through the process.

So far I have noticed that the watch works fine with the patched firmware and supports (in my case) Cyrillic notifications perfectly now.

For reference: here is a  link to the configuration I use.

Got a Pebble watch from Дед Мороз

pebble_watchLooks like Дед Мороз did not want me to completely get rid of Pebble as he brought me a Pebble Smart Watch for New Year!

The Pebble Watch is already on the market for quite some time and well supported by iPhone and Android applications. I will probably need some time to really find out what it can do, the notifications and music control are already nice features on top of being a nice watch. I know that Runkeeper also supports it, so something to check out the next time I go out for a run.

Once caveat I already found is that it does not support all characters in notifications out of the box and Cyrillic does not seem to be supported at all… something to dive into.

Happy New Year!

Happy New Year 2015Happy New Year and best wishes for 2015!

A new fresh year and wish you all the best for 2015, let it be a great year in which things only get better again for all.

As you can see also a new fresh website for my blog. I have moved over to WordPress as it suited my needs better and allowed me to simplify my setup (as I am hosting it myself).  During the course of last year I ran into small problems and issues with my setup of the Pebble blogging software I used. I still think Pebble was a great platform when I started using it a long time ago. There have hardly been any updates to the platform, which did not really bother me from a functional perspective, but did make me wonder whether there are really no security issues with it (or that they were just not found & fixed as it has a very small usage footprint). Besides the anti-spam mechanisms it had turned out not to work so I ended up manually removing spam comments just too often. Last but not least it required too much system resources as it requires a Java Servlet container that I do not need for anything else (anymore).

Therefore I decided last year to migrate my own and a few other blogs I host to a single WordPress 4 Network Instance. Migration was not flawless and I am still in the process of migrating the articles from last year (doing that manually) so expect some more content to be added the coming days/weeks. The design is still quite basic, I will clean that up once I find the time for that.

Let 2015 be a very good and productive year!

Piwigo LDAP module blocks upgrade to 2.7 :-(

Today Piwigo 2.7 became available (for info on what’s new refer to their announcement). While upgrading I noticed that the Ldap Login module I depend on is not supported and according to this announcement on the Piwigo forums probably never will be.

I did try to perform the update and patch the LDAP Login plugin, but had to five that up after spending more than an hour on it as it turned out that something had changed in the way authentication is handled in Piwigo. Since I was running out of time I had to leave that for now as it turned out not to be a simple fix.

For me this is bad news as I am depending on LDAP integration so for now I cannot upgrade. Since the 2.7 version is still very fresh (i.e. only announced today) I will just defer the upgrade to see if there is any movement on this plugin. If not, I will have to look for another solution unfortunately….

Will document any alternative solution here as well once I find it to help others with a similar dependency.

Clean Photo Album permalinks with Piwigo

I am playing for some time now with Piwigo to replace my Menalto Gallery3 online photo gallery. Key reason to look at another solution is that after the move from Gallery 2 to 3 the project (which took ages as it was a major overhaul of the code), the projects seems to have stalled.

So far I really like Piwigo as it has everything I need including iPhoto integration and a (simple) iPhone app. LDAP support is available through a plugin that is basic but suffices for my need. However, one of the key gaps for me was that it did not have any way to generate nice and simple URLs to albums that you can share easily (verbally). Although it was possible to define permalinks for an album, the URL remained ugly in my opinion.
Today I hacked a small patch together for the Piwigo 2.6 codebase that changes the URLs for photo albums to something like:


which is exactly the way it worked for me fine (like I had with Gallery3). This only works for albums with a permalink defined, default album URL will retain the /category/<albumid> format, which is fine for my situation.

Steps to obtain more clean album URLs are:

  1. Apply this patch: piwigo-url-patch
  2. Add the following mod_rewrite rewriting rules to your Apache configuration
    RewriteRule ^/category/       /index.php/%{REQUEST_URI}               [L]
    RewriteRule ^/[^.]+$          /index.php/category/%{REQUEST_URI}      [L]

Again, in my setup this worked, I am still testing this so any feedback to improve is welcome. I did notice that occasionally the patch results in a / too many in URLs generated by piwigo, but that is silently ignored and does not affect the functionality.

To actually use the patch, define a permalink under [Administration] –> [Albums] –> [Manage] on the [Permalinks] tab.

Change Gitlab homepage using Apache’s mod_rewrite

For some time I have been looking for a way to share public projects easily using GitLab. With the Public Project option of GitLab this was already possible for some time, but it did not work quite as I would like to (i.e. I would like http://gitlab.mydomain.tld to be the URL for all public projects). Due to the way GitLab is setup, the default URL will redirect the user to the login page, which does provide a link to the Public Projects page, but was not quite what I want.

Of course, as GitLab is open source, I could change the code directly, but as I would have to do that after each upgrade of GitLab (which is monthly!) I did not want to do that. Today I found a way around changing the code by using the following mod_rewrite rules to my Apache configuration (I placed this in the <VirtualHost> configuration but should also work from a .htaccess file):

# Redirect /users/sign_in to /public unless it has a local refferer
# This makes the public projects page the homepage instead of the login page
RewriteCond   %{HTTP_HOST}@@%{HTTP_REFERER}    !^([^@]*)@@https?://1/
RewriteRule   ^/users/sign_in$                 https://%{SERVER_NAME}/public/          [R,L]

This is inspired by a blog post on referer checking from the Apache .htaccess file. To get to this solution I just had to realize that an internal redirect by the application clears the referrer and apply the opposite logic to intervene when this happened (no referrer implies a redirect, when the user clicks on a link the request will have a referrer). How this works is:

  1. The user visits http://gitlab.mydomain.tld/
  2. GitLab redirects this request to its sign_in page
  3. The browser requests the sign_in page, as this was a redirected page the referrer will be empty
  4. The above mod_rewrite rule kicks in and redirects the user to the public projects page

For me this setup works as I expect. The only caveats are that users with browsers setup not to provide a referrer (e.g. for privacy reasons) may no longer be able to login and that a direct link to the sign_in page won’t work (the user will be redirected to the public projects page and has to click the sign_in button). For my setup both are no issue, let me know through the comments if there are other issues or perhaps solutions for this.

Login issues after upgrade to GitLab 6.5

I have been playing around with Gitlab, the open-source self-hosted Github clone for a while now. I plan to use it to publish the scripts and small programs I did over the last few years and will still create later this year.

After the upgrade to Gitlab version 6.5.1 (which was a breeze BTW thanks to their excellent upgrade script) I noticed I could no longer login. to the server. In the logfile log/production I found messages like:

Started POST "/users/sign_in" for 2001:XXX:XXXX:X:XXX:XXXX:XXXX:XXXX at 2014-02-02 13:53:46 +0100
Processing by Devise::SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"XXXXXXXXXXXXXXXXX", "user"=>{"login"=>"XXXXXXX", "password"=>"[FILTERED]", "remember_me"=>"0"}}
Can't verify CSRF token authenticity
Redirected to https://gitlab.mydomain.tld/
Completed 302 Found in 123ms (ActiveRecord: 7.3ms)
Started GET "/" for 2001:XXX:XXXX:X:XXX:XXXX:XXXX:XXXX at 2014-02-02 13:53:46 +0100
Processing by DashboardController#show as HTML
Completed 401 Unauthorized in 1ms
Started GET "/users/sign_in" for 2001:XXX:XXXX:X:XXX:XXXX:XXXX:XXXX at 2014-02-02 13:53:46 +0100

This turned out to be a known issue with the installation of Gitlab. Since Gitlab is only supports NGinX while I am running it on Apache, I needed to dig a bit further for the solution. The problem was caused by a security enhancement in Gitlab 6.5 in combination with HTTPS. Since the SSL processing is handled by Apache, which uses mod_proxy to connect to GitLab only using HTTP, cookies no longer worked properly. The solution was pretty simple, it required the following statement to be added to the Apache Virtual Host configuration:

RequestHeader set X_FORWARDED_PROTO 'https'

Please note that this does require mod_headers to be enabled, if this is not enabled, issue to following two commands to enable it:

sudo a2enmod headers
sudo /etc/init.d/apache2 restart

Factory reset after firmware upgrade of TP-Link SG3424

Since about a year I have a TP-Link SG3424, a manageable 24-ports gigabit switch that so far has proven to be table and reliable and was a good deal when I bought it compared to similar devices. It’s not a Cisco switch, but honestly I do not know what I am missing out on given the feature set is has. So far it covered my needs and has been operational without any noticable issues or hiccups. The only drawback (for me) so far was that it lacked IPv6 support, but that’s optional on an internal network anyway.

Today I noticed that TP-Link released a new firmware version in December for the SG-3424 switch that added IPv6 support and is available from their support site’s download page. I followed the installation guide, which was completely correct, but a bit incomplete as I had a few surprises during my upgrade:

  1. The installation manual instructs you to change your network settings to the 192.168.0.X network. As I have an operational environment using another IP range, I happily ignored this and was able to perform the upgrade. However, after the upgrade, I could no longer reach my switch until I changed the IP address of my laptop to the 192.168.0.X network. This is not an issue for someone that knows what he is doing, but should have been mentioned in the installation manual in my opinion…
  2. After the firmware update, the switch was back at its factory settings and lost all configuration settings (including the logins, so I had to login with admin/admin again). This is bad TP-Link, even if your update process requires a full reset, PUT IT IN THE UPGRADE MANUAL at least…
    Fortunately I have a tendency to make backups before I change things and did create a backup before the update , but it was a surprise one would not expect.
  3. When restoring the configuration, all settings were restored correctly EXCEPT the logins and password of the admin user. Again, not a blocker, but a surprise and something NOT DOCUMENTED.

All in all minor things that one can resolve pretty easily, but not something you would expect from a company that positions the product at the professional market… Cisco-like 10+ upgrade guides are a pain to get through, but a 2-pager with only half of the information doesn’t help either.

Apart from these glitches, the upgrade was worthwile as the switch now has IPv6 support, which functions great and has (as always) all features one can imagine (like being able to add manual addresses next to the auto-negotiation addresses, support for RA and DHCP6, support for IPv6 on all services like SSH and SNMP) appear to work fine.

Mac OS X Lion (10.7) on my (upgraded) Late 2006 Mac Mini

After yesterday’s upgrade of my Late 2006 Mac Mini (MacMini1.1) it was time today to see if I could get OS X 10.7 (Lion) working on it. As per  discussions on Apple’s discussion forms this should be possible (as the hardware supports after the upgrade I did). However, the standard OS X Lion installation did not want to install on this hardware yet. As per the discussion on I had to remove the file


before the installation wanted to start. Once I did that, I could do a clean install on the new SSD Harddisk withougt any issues or additional hacks needed. Also transferring the users, apps and settings from the old system still on the external USB harddisk went fine and actually totally surprised me (I never used it before) as it turned the clean install in a totall usable system including the configuration of the OpenDirectory server.

After the installation it is important to enable Trim support on OS X to extend the lifetime of my SSD harddisk with the excellent tool Chameleon.

Right now I am very happy with the end result: a Late 2006 Mac Mini running OS X Lion (10.7):
Late 2006 Mac Mini after upgrade

Obviously only 3 Gb of memory is available as that is the max. the hardware supports, but still this is a very good solution to have a 2nd Mac Mini system for my children.

Upgraded my MacMini1.1 to a MacMini2.1 :-)

As I already wrote in my last post, I was looking into upgrading my old late 2006 Mac Mini to extend it’s techinical live. Today I have successfully managed to upgrade the hardware of the old machine and it is running fine again. The steps I did were:

  • Replaced the Core Duo 1.66Ghz CPU with a Core 2 Duo 2Ghz CPU
    The exact CPU I purchased for about €25 through e-Bay was an Intel Core 2 Duo T7200 SL9SF 2.0GHz/4M/667 Laptop CPU. To install it I basically followed the steps as in the iFixIT step-by-step guide to replace a MacMini CPU, which were pretty straightforward.
  • Booted OS X from the MacMini’s USB harddisk while the machine was still open to install the MacMini2.1 firmware
    As per this NetKas forum guide, the firmware must be updated before adding the additional memory or the Mac Mini won’t boot. The links to the firmware were broken, I actually downloaded them MediaFire and followed the steps from the French Mac forum post that linked to them.
  • Replaced the 2x 1Gb memory with 2x 2Gb memory modules
    Through Marktplaats.NL I acquired 2 used memory modules for only €35. As the machine was still open it was pretty straightforward to replace the memory modules.
  • Replaced the 80Gb broken harddisk with a 60 Gb SSD Drive
    I purchased an ADATA S511 60GB SSH Harddisk online for only € 39,00. Again installing it was straightforward as the machine was still open.

After all steps were completed, the Mac Mini was still working as before on Mac OS X Snow Leopard (10.6.8) without problems. The extra memory did help, but as it was still booting from an USB Disk it was still very slow.

As extra bonus I noticed that the Mac Mini now supported the modern Mac keyboards (the flat iron ones) during the BIOS startup. Before this update I always needed the old (plastic) keyboard I got with the machine to be able to intervene in the boot process, but now this also worked with the modern keyboards :-).

Tomorrow I will look into upgrading OS X and see how that goes. So far so good, the machine is working faster already and for about €100 in total not a bad investment to keep using it.