Thursday, November 20, 2014

3 days using Android Lollipop on Nexus 5

Have heard all the good things about Andriod Lollipop, and eagerly waiting for the released. When the factory image was out, I was going to install the image on my Nexus 5 myself, but latter found that the platform tools of the SDK has only 32-bit binaries, although I had downloaded a 64-bit version of the SDK. It seems this is a known problem and ignored by Google, saying install a 32-bit compatible layer should do the trick. I don't want to install megabytes of 32-bit layer on top of my pure 64-bit installation system!

Well, I waited not long after, the OTA came and I quickly installed the upgrade (Nov 18). The new GUI does not really impress me, but so long as it does it job, I am fine with it. But compare with the older one from KitKat, I like the KitKat one more.

The new clock application use current time to change its background color, that annoying me greatly, and it has no option to turn that off! It may look nice on the presentation, but it give no value to me. I like to look at the clock on a black background! The layout of the international clock changes to a list from the 2 column layout in KitKat. I think the 2 column layout give me a better presentation.

Browser tabs, I could not find the handle of tabs in the browser, I did not recall I had allowed the browser to merged tabs with apps. Well, at least this time I have a setting to turn "Merge tabs and apps" to off.

The battery saver mode is fine. But why should it insist to change the status and home buttons bar to orange background? With the battery saver icon on the status bar, it is already obvious, why on earth change those background color? I know what I am doing, and does not need such thing to remind me I am in battery saver mode. And no option to turn the color change off.

For media video playing, the volume control button no longer work as expected, instead, I have to click on the button, then tap on the speaker symbol to get sound changes, and dragging on the sound meter bar no longer work. This is really bad engineering.

Skype could not login any more after upgrade to Lollipop, even upgrade to the latest version. One commenter said it needs to be removed and re-install, I follow suite, it could log in again and skype test call works ok, I haven't try the video call yet, will see.

Lollipop defaults to use white background, it hurt my eyes. The color theme of KitKat looks more comfortable to the eyes.

Except those complains, so far so good, the battery usage maybe improve a little, but hard to tell for I am a light user, will see for a longer period of usage.

Wednesday, November 19, 2014

Simple EC CA script for use with OpenSSL

For some testing purposes, I need to create some elliptic-curve certificates. There is no script from OpenSSL that could create the certificate directly. So I modified the supplied CA.sh to create a ecCA.sh.

The usage is almost the same as CA.sh, plus some EC specific commands.
ecCa.sh -h
usage: ecCA.sh [-curve name] -list-curves|-newcert|-newreq|-newreq-nodes|-newca|-sign|-pkcs12|-verify

Use -list-curves to list out all the supported curves. The default CA curve is secp521r1 and default certificate curve is prime256v1.

Here are some simple step to create a EC CA and a signed EC certificate.
  1. Run command "ecCA.sh -newca", which will then ask you a serious of questions to create your CA certificate. You could use the default but do remember to enter a common name for the cert, otherwise you won't be able to create one. You will have a demoCA subdirectory created under the current directory.
  2. Run "ecCA.sh -newreq", and answer the questions, you will have a new key and certificate request with name "newkey.pem" and "newreq.pem".
  3. Run "ecCA.sh -sign", and follow the instruction, you will have a signed certificate "newcert.pem".
  4. Run "ecCA.sh -pkcs12", will create a PKCS12 formated file "newcert.p12", which could be used to import the certificate into browser.
You could download the ecCA.sh script here.

Tuesday, November 18, 2014

Google Chrome and IPv6 literate address

I don't have an established IPv6 network, only a small LAN with 3 machines for occasional IPv6 testing. So only literate address is using, for my laziness, I gave the machines the addresses of 10:10::1/96,10:10::10/96 and 10:10::20/96 accordingly.

When I try to access the web server at URL http://[10:10:20], the address works fine with Firefox, but Chrome give me DNS error.  Why a literate address need DNS resolving?  Searching around, and found a very old bug report issue 39830, it seems Chrome could not recognise my IPv6 network and startup without IPv6 support at all.

After adding the flag "--enable-ipv6" to the command line, it works again. Chrome is too "smart" to work correctly on my network.

Thursday, November 6, 2014

Run fcgiwrap with nginx under Slackware

I need to do some test on perl CGI scripts, but with NGINX server, it is not supported directly to run those CGI scripts.  Search around, there is this fcgiwrap tool.  It looks exactly like what I need for the simple test.

Fcgiwrap depends on fcgi library, which has a SlackBuild script.  I install the fcgi library with sbopkg, and proceed to write a SlackBuild script for fcgiwrap.  The fcgiwrap is a very simple program, it has only one C file for the main program.  But it needs a spawning parent to control it, the author provide a simple perl script (on the main page of the fcgirwap project.) to spawn the fcgiwrap program.  I also borrow the startup script from Nginx's FastCGI example and modified a little and name it rc.spawn-fcgi.  Both the scripts are included in the SlackBuild package that I have submitted.

After installing it, I add the following section into the server section of nginx.conf file:
  location ~ \.pl$ {
     root /var/www/cgi;
     try_files $uri =404;
            include        fastcgi_params;
     fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
     fastcgi_pass unix:/tmp/cgi.sock;
   }
After started the spawn-fcgi and reload nginx's config, the perl CGI works without problem.

Tuesday, November 4, 2014

OpenVMS got a new life

Well, it is an old news actually, but still new to me. I was not reading the OpenVMS news group for awhile. When one day I have some free time, I read it, and found this interesting news:

On July 31, 2014, HP and VMS Software, Inc. (VSI) announced, VSI has entered into a license agreement with HP to develop and release future versions of OpenVMS and most OpenVMS layered products (OpenVMS eco-system).

I have a hobby license (VAX/OpenVMS) and run a small installation through SIMH simulator, but I have not boot it up for quite a while, I hope I could still remember the administrator's password ^_^. My interest of this OS comes from my university days, when all students use the VAX/OpenVMS system for email or some school assignments. I thought it is so much better than the DOS used in the PC, but unfortunately there is no PC version. But then DEC was bought by Compact then by HP, but it is not treated well over these new owners and HP put its future to doom until this announcement. I think HP make a big mistake for not doing any meaningful development on it and bet its future on the dying Itanium chip.

VSI seems re-united a few folks from the original DEC team and hope it will bring a much bright future for the 37 years old OS. It seems, there will be an x86 port of the OS. Not sure when it will be finished? Would it be available for the hobby program? We'll see what come out from VSI.