human choroinic gonadotropin


The notes of a madman

Archive for the ‘Ubuntu’ Category

Posted by grigsby on September 25, 2012

After a recent nuke and pave on my Ubuntu 12.04 to attempt to deal with random Unity crashes I was met with a challange. I had kept all of my sources.list.d/* ppa entries but after attempting an apt-get update all I got was errors. Lots of errors just like this one:

W: GPG error: precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXXXXXXXXX

I had written a script a while ago to find all of the missing keys, download them, and install them, but I lost it in the upgrade. Instead of reinventing the wheel, again, I started searching and I find that somebody else had created a simlar script, but was smarter than I was as they actually published it.


sudo apt-add-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install launchpad-getkeys

Once the installation is complete, run this:

sudo launchpad-getkeys

And no more missing keys. A big thanks to Alin Andrei for having the forethought to publish his work when I didn’t…

Cursor (arrow) Keys not working in Ubuntu Terminal Server Client

Posted by grigsby on March 13, 2010

Running Ubuntu 9.04, 32bit, I noticed that the cursor (arrow) keys were not functioning on Terminal Server Client which I use constantly to connect to XP machines for work. I use the Terminal Server Client Applet to easily access the machines I’m working on and it had worked in the past. I found, after some digging, that the keyboard setting had gotten changed for all of the saved machines from en-us to us. So, the fix is as follows:

  1. Open the Terminal Server Client
  2. Enter the machine details
  3. Select the Local Resources tab
  4. set the keyboard to en-us
  5. Save the session to the Quick Connect Profile

The cursor (arrow) keys not work as expected.

Deluge torrent client broken after Jaunty upgrade

Posted by grigsby on June 22, 2009

Just finally upgraded on of my desktop systems to Ubuntu Jaunty 9.04. Well, I upgraded it again. After the initial upgrade I was getting continuous hangs (scroll and caps lock flashing). At the time I didn’t have the energy or time to resolve the issue, so I nuked and went back to 8.10 on just this system. Well, today, I finally resolved the issue (long story, probably a future post).

Anyway, after the upgrade completed, and I beat Xorg into line, I went to restart my Fedora 11 torrent so I can do some testing with that. And, something else broke: My favorite torrent client Deluge. Launching the client would result in a white window with no text (i.e. complete unresponsive window). After some digging I found a cryptic post about a libtorrent-rasterbar update that seems to be the culprit. The fix, is even easer:

sudo apt-get install libtorrent-rasterbar4

As soon as I got libtorrent-rasterbar version 0.14.4-2 installed, deluge was happy again.


GPG error while doing a aptitude update

Posted by grigsby on January 31, 2009

There have been a number of new keys issued for PPA on the Launchpad site. If you are getting an error similar to the following, then here is how you fix it.

W: GPG error: intrepid Release: The following signatures couldn't be verified because the public key is not available:
NO_PUBKEY 60D11217247D1CFF
W: You may want to run apt-get update to correct these problems

Execute the following command replacing with the alpha-numeric string after the NO_PUBKEY message. In the example above the key was 60D11217247D1CFF

gpg --keyserver --recv _missing key_

Followed by this command:

gpg --export --armor _missing key_ | sudo apt-key add -

This will download the missing public keys and add them to the apt key repo.

Note: There may be multiple keys that are missing. Simply repeat for each missing key.

UPDATE: ‘blackgr’ on the ubuntuforums released a script to automate this. If you have an account there and are missing a number of keys, this can speed things up considerably. This script can be found on post #43 on this page:

UPDATE 2: Here are details about what is happening.

twhirl on Linux

Posted by grigsby on December 18, 2008

EDIT: Added a couple of other things I found that *might* be necessary. Let me know if people are running into stuff that still doesn’t work…

The latest version of twhirl (0.8.7) came out last week to deal with changes in the twitter API. All well and good. Until I tried to update twhirl on my laptop, and my desktop. What’s this? It requires Adobe Air 1.5? But Air 1.5 isn’t available on Linux yet… Sad is me, until today. Today Adobe moved Adobe Air from the Beta column on Linux to the full release with version 1.5. All is good. Except for getting the new version installed and getting twhirl working is a bit of a chore. After a bit of googling I have figured out the secret sauce required to get it to work. And I share this secret sauce with you here. (this was done on Ubuntu 8.10 but the process should be similar on any flavor of Linux just substitute the appropriate package management commands and you should be golden).

Start by downloading Adobe Air 1.5 and twhirl 0.8.7 and save them somewhere handy. I choose the Desktop.

sudo aptitude remove adobeair1.0 adobeair-enu
sudo aptitude search twhirl (note the package name)
sudo aptitude remove ${name of twhirl package from above}
sudo rm -Rf /var/opt/Adobe AIR/ /opt/Adobe Air/
rm -Rf ~/.adobe/ ~/.macromedia/
sudo rm -Rf /root/.adobe /root/.macromedia
chmod +x ~/Desktop/AdobeAIRInstaller.bin
Install twhirl-0.8.7.air

That’s it. You should now be ready to share your uber witty comments with the rest of the world.

Update: Somebody has claimed that there was a typo in this post. That, of course, is a blatant falsehood and the person claiming this should be ashamed.

Adding keyboard shortcuts to Ubuntu Hardy

Posted by grigsby on May 13, 2008

I wanted to set three shortcut combos that I use in Windows all of the time. After a bit of work I managed to get all three defined. Here are the shortcut keys I wanted to ma:

  1. Super Key – L -> Lock the screen
  2. Super Key – C -> Open shell
  3. Super Key – E -> Open Nautilus

The first thing you need to do is to enable the Super Key (I.e. the windows flag key) to work as a meta key (e.g. alt, super, ctrl). To do this select:

  1. System - Preferences - Keyboard
  2. Select the Layouts tab
  3. select the Layouts Options... button.
  4. Expand the Alt/Win key behavior option
  5. Select Super is mapped to the Win-keys.

The shell shortcut is easy. This can be added by doing the following:

  1. System - Preferences - Keyboard Shortcuts
  2. In the desktop section select Run a Terminal
  3. Hold the Super Key and the c key
  4. Select the Lock Screen and delete the existing mapping

For some reason the Home Directory and Lock Screen selections don’t work. You can map them, but nothing happens. I found a way around using gconf-editor. It takes a few steps, but it gets it done.

  1. select Alt-F2 and enter gconf-editor
  2. select apps - metacity - global_keybindings - run_command_1 to <Mod4>L
  3. select apps - metacity - global_keybindings - run_command_2 to <Mod4>E
  4. select apps - metacity - keybinding_commands - command_1 to gnome-screensaver-command --lock
  5. select apps - metacity - keybinding_commands - command_2 to nautilus

Now exit the Configuration Editor and that’s it.

Update: Just found a bug report on this on Launchpad. Looks like gnome does not like super-L, and super-E. Other keys seem to work. Odd, eh? Link

“Reading files needed to boot”

Posted by grigsby on May 13, 2008

After upgrading to Hardy, hibernate stopped working. Usplash would show the animated splash screen for a few seconds on boot, then it would go away an I would see a text boot screen starting with the “Reading files needed to boot” text. The system would go into hibernate normally, but would never boot back to where I was, it was like I’d never hibernated. After a bit of digging, I found the problem. The UUID for my swap file system was not the same as the value entered for the resume file system in initramfs. Here is the steps required to fix this problem:

1. Make sure you have the initramfs-tools update

sudo apt-get install initramfs-tools

2. Run the blkid util to show what your existing UUIDs are.

root@hardy-desktop:~# sudo blkid
/dev/sda1: UUID="a76fe101-7951-4a65-af1e-50b2902c5b35" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="8dd072f1-25b3-4a7f-888f-2314697d60b9"

3. Verify that the UUID listed for the swap partition in the previous step matches what is listed in /etc/fstab

root@grigsby-desktop:~# cat /etc/fstab
proc /proc proc defaults 0 0
# /dev/sda1
UUID=a76fe101-7951-4a65-af1e-50b2902c5b35 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=8dd072f1-25b3-4a7f-888f-2314697d60b9 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

4. Modify the UUID in /etc/initramfs-tools/conf.d/resume file to match the UUID listed for the swap partition from blkid.

root@hardy-desktop:~# cat /etc/initramfs-tools/conf.d/resume
root@hardy-desktop:~# sudo vi /etc/initramfs-tools/conf.d/resume

5. Update the initramfs.

sudo update-initramfs -u

6. Restart the system.

Sorting IP addresses

Posted by grigsby on January 17, 2008

I recently had to sort a large list of IP address numerically. My first few passes didn’t work. Finally I pieced the following together. This is using sort from the GNU coreutils, version 5.97, running on a CentOS 5.0 box. Should work on anything running GNU Sort. It might work on other versions of sort, but I had issues with it on HP-UX. This worked in a few seconds for well over 50k addresses. Enjoy.

sort -t'.' -nk 1,1 -k 2,2 -k 3,3 -k 4,4