Linux Chrome and Self-Signed SSL Certificates

I use an OpenSSL certificate for a private ColdFusion app that I use for a link management and calendar app. For months I've been trying to get Google Chrome for Linux to recognize the certificate and remember it between sessions. I followed the instructions here but couldn't get it to stick.

I chanced upon the solution when it became time to re-generate the SSL certificate, which I do annually. It turns out that Chrome expects the Organization Name, Organizational Unit Name and Common Name to be the same as the fully qualified domain name, in my case, www.linkstart.com.

Here then are the instructions to create a self-signed certificate and get Chrome to permanently recognize it. I'm assuming the SSL module has already been set up in Apache.

On the server:

cd /etc/apache2

Substitute the .key and .crt file names as you require in the the following:

sudo openssl req -config openssl.conf -new -pubkey -keyout linkstart.key -out linkstart.crt -x509 -nodes -days 365

When prompted, set these as per your site - remember to use the full website address for the Organization Name, Organizational Unit Name and Common Name:

  • Country Name (2 letter code) [AU]:CA
  • State or Province Name (full name) [Some-State]:ON
  • Locality Name (eg, city) []:Richmond Hill
  • Organization Name (eg, company) [Internet Widgits Pty Ltd]:www.linkstart.com
  • Organizational Unit Name (eg, section) []:www.linkstart.com
  • Common Name (eg, YOUR name) []:www.linkstart.com
  • Email Address []:oliverm@linkstart.com


To enable this cert in Google Chrome, do this on the client:

Go to the URL of your site, eg. https://www.linkstart.com/

Get Certificate Information by clicking on the https part of the URL

Export the certificate to the Desktop as Base64-encoded ASCII, single certificate

cd Desktop

sudo certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n www.linkstart.com -i www.linkstart.com

certutil -d sql:$HOME/.pki/nssdb -L

this should show: www.linkstart.com             C,,

Re-start Google Chrome

Apache: Password Protecting Directories

I always forget how to add simple password protection with Apache 2 so here's a reminder to myself.

1. Add directive: "AllowOverride All" (no quotes) into the protected <Directory> configuration entry. Depending on your setup, the <Directory> entry may be under /etc/apache2/apache2.conf or /etc/apache2/sites-available.default. For example:

DocumentRoot /home/omerk/wwwroot
<Directory />
   Options FollowSymLinks
   AllowOverride All
   SetOutputFilter Deflate
</Directory>

2. Open a shell prompt and cd into the protected directory

3. Run: htpasswd -c .htpassword yourname
Enter your password when requested.

4. Also in the protected directory, create .htaccess file with the following content:

AuthType Basic
AuthName "restricted area"
AuthUserFile /{full path from the root of the drive}/.htpassword
require valid-user

5. Restart apache with: sudo /etc/init.d/apache2 restart

That should be it.

Removing Namoroka/Shiretoko from Ubuntu

Every once in a while I get a system update notification in Ubuntu and it (rudely) replaces my generic Firefox installation with the Namoroka/Shiretoko versions packaged with Ubuntu. It seems to work fine, but I prefer having plain old Firefox.

To get Firefox back, do the following:

System >> Administration >> Software Sources >> Other Software: disable or remove: ubuntu-mozilla-daily ppa

At the terminal:

sudo apt-get remove firefox
sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install firefox-3.6

Voila! Good old Firefox classic!

Navicat on Linux

I love using Navicat for MySQL. I've tried a lot of different UIs for MySQL administration and this one is worth the price.

And I applaud PremiumSoft for having a Linux version. Unfortunately, the Linux version is really the Windows version with an included version of Wine, tweaked to run Navicat. Seems kind of strange to have 2 versions of Wine on my system.

So I purchased a copy of the Windows version and set to work figuring out how to get all the features to work and how to make it look like a native app as well.

In order to do things like saving data transfer profiles, you'll need to do the following.

1. Use Google to find download links to Pgmr101.ocx, msxml3.dll and msxml3r.dll or get them from a Windows XP distribution. Copy these to Wine's system32 directory, overwrite as required (but backup any existing files just in case). In my case, I copied them to /home/omerk/.wine/drive_c/windows/system32/

2. Run a DOS (yes DOS) terminal:
env WINEPREFIX="/home/{your_home_dir}/.wine" wine "C:\windows\system32\cmd.exe"

3. Paste these DOS commands and hit enter for each:
regsvr32 msxml3.dll
regsvr32 /s msxml3.dll
regsvr32 msxml3r.dll
regsvr32 /s msxml3r.dll
regsvr32 Pgmr101.ocx
regsvr32 /s Pgmr101.ocx

You may need to cd into the system32 directory for this to work.

4. In Ubuntu, open Applications > Wine > Configure Wine.

5. In Libraries > Existing Overrides:
msxml3.dll(native, builtin)
Note that the order is important: native, then builtin.


6. Install the Windows version of Navicat via Wine and you should be good to go.

In terms of fonts, they can be tweaked either at the Wine level or in the application itself. Note that if you change fonts in the application, you must re-start it to see the changes.

Mine looks like this...


QuickFolders for Thunderbird

Just found a great extension to Thunderbird that has cut down on the amount of time I spend sorting through the daily email flood. QuickFolders is a project created by Alexander Malfait and Axel Grude. They've obviously put a lot of time, thought and care into crafting this very configurable add-on.

Here's a screen shot from their site:

As you can see, you create a tool bar of your most-used email folders for easy access. You can also drag emails onto these tabs for quick organization. And there are lots of settings to play around with until you get it looking just right.

I think this is such vital functionality that it should be part of the next version of Thunderbird.

The project home page is at quickfolders.mozdev.org.

If you're a Thunderbird user, this one's a must-have.

Flash Player 10 released

It's here! An the Linux version has a .DEB installer: Download the Linux version here. Other versions here. The debug Linux version is here.

NBC Alienates Users

Not only forcing Silverlight down our throats (see Ben Nadel's hilarious post), but Windows as well.

And the hypocrisy of using Flash all over their homepage is brilliant.

Nice work NBC.

Thank you from all the Linux and Mac users around the world who are shielded from viewing your advertising. The wonderful things that happen when two great companies get together!

Webmin: Web-based System Administration

If you're running Apache, MySQL or just about any other service, this one's for you. I ran into Webmin over the weekend as I embarked on re-building my home server (all Linux!).

I was finding the new Apache configs a bit of a handful so I started searching. Didn't take long to find this amazing tool for Linux (there's a Windows alpha available as well).

And of course, it's free.

Useful Windows Utility: allSnap

One thing I love about KDE is its default snapping behavior for all desktop windows. When I go back onto my work laptop (Windows) I miss this simple feature.

A fellow Toronto developer, Ivan Heckman from U of T, has created a great free utility that mimics this behavior in Windows. Check it out here.

So what's your favorite free Windows utility?

[Thanks Ivan!]

Flash Switcher

Flash Switcher is a Firefox add-on by Allessandro Crugnola for those developers concerned with Flash Player versions. I tried it a while back when it was Windows-only.

It's now got Linux and Mac capability as well and works with FF3!

Get Flash Switcher

Also check out his Flash Tracer if you haven't already.

Thanks Allessandro!

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.