Adding a Certificate Authority to the Trusted List in Ubuntu

Sometimes, working with SSL certificates isn’t all it’s cropped up to be. Heck, most of the time it’s not. It’s painful, time-consuming work.

However, it’s actually not so hard to install a self-signed certificate authority in Ubuntu, using a few commands.

First, install libnss3-tools, which contains the certutil command:

sudo apt-get install libnss3-tools

Next, we’ll copy the public certificate authority file to the certificate store:

sudo cp my_ca.crt /usr/share/ca-certificates/

We’ll now recompile the SSL CA list for Ubuntu, adding our certificate:

sudo dpkg-reconfigure ca-certificates

This will lead to a ncurses menu. In this menu, choose ask, and scroll through the long list of trusted CAs until you find your ‘my_ca.crt’ certificate authority file. Mark it for inclusion with Space, then hit Tab then Enter to finish up.

The last step is to install the certificate into Google Chrome’s registry. (If you’re using Firefox or otherwise, your mileage may vary.) Let’s add it with this command:

certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n "My Homemade CA" -i my_ca.crt

Great! Now restart Google Chrome and you should now see your sites signed with this CA as being trusted :)

Intel Graphics on a 2011 MacBook Pro in Linux

TerminalOne of the headaches of running Linux on a 2011 MacBook Pro is the bad battery life, heat generation, and the nearly incessant fan noise. As it turns out, this is largely caused by using the dedicated ATI high-power graphics card all the time, as it’s not as easy to get graphics-switching configured on Linux. On OSX, this feature comes out of the box, which is why battery life and heat-generation is so good. I finally got fed up with the heat, noise, and short battery life and took the plunge into configuring onboard Intel Graphics on my MacBook Pro.

Continue reading

Adding Icons to a Theme in Elementary Luna

Elementary Luna IconSince I’m using Elementary Luna as my daily driver, I’m using it with a lot of apps not designed with it in mind. Rather, the Elementary icon set doesn’t include icons for these programs, such as Eclipse, NVIDIA X Server Settings, Skype, etc. Luckily, a beautiful icon set called Faenza does. By installing Faenza and patching our Elementary icon set with links to Faenza icons, we can fill in the gaps in our icon set.

Continue reading

Creating Long-Term Backups with Amazon Glacier on Linux

Amazon Glacier LogoIf you haven’t heard about Amazon Glacier already, it’s definitely something to be excited about. Amazon Glacier is a service that makes it extremely affordable to store gigabytes upon gigabytes of data for the long term in the cloud. Your data is stored immediately, but retrieval requests take at least 4 hours to make your data available again for your downloading. Let’s back up a ton of files on Linux to Glacier.

Continue reading

A Better Magic Trackpad Experience in Linux

If you’re like me, you own a nice Apple Magic Trackpad. You’ve also paired it with your Linux box and it’s working great. However, it could probably work better. The defaults for the device are, in my opinion, pretty unresponsive and at times really bizarre. Let’s walk through some hacks and fixes in order to get things working better.

Continue reading

Patching btusb to enable compatibility with the BCM20702A0 chip

I just recently built a brand new machine and noticed that I wasn’t seeing my Bluetooth chip. After a bunch of digging, I found that my Broadcom combo chip which came with my ASUS Maximus V motherboard hosted both a BCM43228 WiFi module and a BCM20702A0 Bluetooth module. Stranger still is that the Bluetooth chip is actually an embedded USB device running on the PCI port.

Continue reading

Fix Bluetooth on a MacBook Pro 8,1/2/3 with B43

If you’ve been following the blog, you probably noticed that I recently had a lot of issues with Bluetooth on my MacBook Pro running Ubuntu, and then had them resolved by an awesome commenter. Apparently, if you disable Bluetooth coexistence protection in the B43 driver, then Bluetooth will be able to coexist with WiFi. I have no idea how this makes sense, so don’t ask :)

I demonstrated how to do this with modprobe:

# remove b43
sudo modprobe -r b43
# reinsert b43, with the right settings
sudo modprobe b43 btcoex=0

Unfortunately, this doesn’t work permanently, as whenever you reboot, the B43 driver is loaded with the evil Bluetooth coexistence setting enabled (again, this means that Bluetooth will not work). Thus, we need a permanent solution! Pop open your favorite text editor as root and edit /etc/modprobe.d/options and append the following line:

options b43 btcoex=0

Voila! Go ahead and reboot to test your settings. No more modprobing every time you boot!

MacBook Pro 8,1/8,2/8,3 Bluetooth Issues on Linux


Oh, by the way, I just got a shiny new MacBook Pro to run Linux on! Hooray! It’s an awesome machine, but I just wanted to post this bug to the general public to save people the 3 days I’ve spent trying to figure it out.

Essentially, what it boils down to is this: the b43 Linux driver that you’ve compiled and installed interferes hardcore with the adjacent Bluetooth chip on your MacBook.

Let’s do a little test to demonstrate. While connected to a WiFi network with b43, put a Bluetooth device into pairing mode near your machine. Make sure the bluez package is installed. Next, run the following:

$ hcitool scan
Scanning...

You’ll probably see it say Scanning... and then… nothing. It won’t see your device. Period.

Let’s continue with our experiment. Unload the b43 module with sudo rmmod b43. Your internet will go down if you’re on WiFi. Now, run hcitool scan again.

$ hcitool scan
Scanning...
    XX:XX:XX:XX:XX:XX    Nexus One

Aha! Found you! So, it seems that the problem is with the driver itself. This is kind of a bummer, to say the least, but hopefully they’ll have it patched soon. Until then, sudo modprobe b43 and continue on, weary warrior.

For the record and for Google, I’m running a 2011 MacBook Pro 8,3 with Ubuntu 11.10 Oneiric Ocelot 64bit/amd64.

Update: A Working Workaround!

As noted by Benoit in the comments below, you can actually get things working with a little workaround. First, unload the b43 driver from the kernel:

$ sudo rmmod b43

Next, reload the module, turning Bluetooth coexistence support off:

$ sudo modprobe b43 btcoex=0

As counterintuitive as it seems, it works! Hooray! I’m now able to listen to music with my Bluetooth headphones and use the built in B4331 wireless card in my MacBook at the same time!!! The only issue I’ve encountered is that when you’re spiking and getting really high upload/download rates, you’ll notice that Bluetooth audio skips a bit. Luckily, this is a pretty minimal problem and doesn’t prevent you from using your Bluetooth or your B4331 WiFi card in your MacBook Pro.

New Site! Enter TerminalLinux.org

Ever wanted to learn to make the most out of your Linux? Enter TerminallLinux.org, a site dedicated to teaching you some of the most incredible things that can be done with Linux. This is a personal learning project for me and as I learn new commands, you will too. Be sure to subscribe to the RSS feed and to follow us on Twitter!

Terminal Linux: Tips, Tricks, and Code to Rock Your World.