Category Archives: Ubuntu

Fixing libcoolkey…

With my new CAC card, I found that libcoolkey.so was not working with Firefox correctly.  The new, 144k CAC cards do not play well with the old version of libcoolkey.  I did find that the ‘experimental’ release of libcoolkey will fix this problem, here is the fix:

amd64 (64bit)

sudo su
apt-get purge coolkey libckyapplet1 libckyapplet1-dev
wget http://ftp.us.debian.org/debian/pool/main/c/coolkey/libckyapplet1_1.1.0-7_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/c/coolkey/libckyapplet1-dev_1.1.0-7_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/c/coolkey/coolkey_1.1.0-7_amd64.deb
dpkg -i libckyapplet1_1.1.0-7_amd64.deb libckyapplet1-dev_1.1.0-7_amd64.deb coolkey_1.1.0-7_amd64.deb

i386 (32bit)

sudo su
apt-get purge coolkey libckyapplet1 libckyapplet1-dev
wget http://ftp.us.debian.org/debian/pool/main/c/coolkey/libckyapplet1_1.1.0-7_i386.deb
wget http://ftp.us.debian.org/debian/pool/main/c/coolkey/libckyapplet1-dev_1.1.0-7_i386.deb
wget http://ftp.us.debian.org/debian/pool/main/c/coolkey/coolkey_1.1.0-7_i386.deb
dpkg -i libckyapplet1_1.0-7_i386.deb libckyapplet1-dev_1.1.0-7_i386.deb coolkey_1.1.0-7_i386.deb

A side note, if you are registered with https://software.forge.mil/, then there is a fix in the project ‘Community CAC’ that includes libcackey which offers a fix for this as well.

Garmin Wardriver – Part 2

I’m very happy to say, this is a simple project, to get working in its most basic form.  Note, I said it’s most basic form so no hate mail on the fact that this is nothing more than a quick script!  There are plans to actually go deeper, make this open to more than my device, not use already existing programs, etc.  But for the basic concept and starter, I’ve made this program use gpsbabel to get the gps information and iwlist to get the network information.  I had started with pywifi but found this to be a problem because there was an overbound error.  This bug will be reported, it seems it has a problem with converting an integer to a float on a 64bit machine.

So with no futher ado, here is the script:

#!/usr/bin/env python
import os, re, time

# DEATH FUNCTION
def die(msg):
	print ' [*] ERROR: %s' % msg
	exit(1)

# ENSURE WE ARE ROOT
def checkroot():
	if os.getuid() != 0:
		die('Run this program as root.')
	return

# GET NETWORK INFO
def getessid(dev):
	nets = os.popen('iwlist %s scan' % dev).read()
	pat  = re.compile(r'ESSID:".*"')
	mess = re.findall(pat, nets)
	found= []
	for find in mess:
		found.append(find.split('"')[1].split('"')[0])
	return found

# GET GPS INFO
def getposition(dev):
	pos = os.popen('gpsbabel -i garmin,get_posn -f %s' % dev).read()
	pos = pos.splitlines()[1].split(' ')
	return [pos[1],pos[2]]

# RUN IT
def main():
	checkroot()
	found = getessid('eth1')
	pos   = getposition('/dev/ttyUSB0')
	for find in found:
		print 'ESSID: %s @ %s | %s' % (find,pos[0],pos[1])
	exit(0)

if __name__ == '__main__':
	main()

So what you see here is that I’m using os.popen() to call my programs to draw data.  Unfortunately, iwlist is painfully slow, to the point there’d be a five second delay on some slower machines between the call and having the data ready.  This is why I want to develop the application to not be dependent on other programs, but for the time being, this works as proof of concept in the data gathering stage.  It’s now just a matter of adjusting the code to run this constantly and load data to an overlay when entering and leaving an ESSID’s area.

Any comments for improvements?  Don’t forget, you can join this project any time on SourceForge!

Ubuntu 10.04 – Fixing Title Bar Buttons (Place on the right)

After downloading Ubuntu 10.04 Lucid Lynx, I noticed that the biggest user interface change is the title bar buttons.  Unlike Windows or Mac, the buttons are located on the left side.  This is not too bad if you can get used to it, but I found several complaints online.  So, for those who are not used to gconf-editor, here are instructions to fixing the title bar.

  1. Open a terminal or use Alt+F2 and type ‘gconf-editor’.
  2. In the tree menu on the left side go to: apps -> metacity -> general
  3. On the options menu (right side of the editor) find the option midway down for ‘button_layout’.
  4. Editing these options can let you customize the menu, here’s how:
    • The colon ‘ : ‘ sets the middle, so anything on the left of the colon is on the left of the title bar.
    • Settings are comma separated values of menu, minimize, maximize, close, separator
      • Duplicates and unknown values are silently ignored.
    • Example #1: menu:minimize,maximize,close
    • Example #2: close,minimize,maximize:
    • Example #3: minimize,maximize,close:

See, one of the great things with Linux is that these configurations are available.  If you take a moment to look around your gconf-editor, you’ll see how powerful this tool is to your user interface customization.  Feel free to contact me or comment here with questions regarding this process.

Ubuntu 10.04 Alpha 2 – Review

So I decided to update my laptop to Ubuntu 10.04.  This process got off to a rough start because a pesky dog ran into my laptop, shutting the lid and causing a sleep halfway through the upgrade.  The problem came in that the computer was not set to be able to resume and so I only had half the updates done.  So when I rebooted, there was no graphical display, and for awhile, not even the ability to use a terminal.  Thankful, grub had been updated and I was able to boot into the recovery counsel, compile a wireless driver, get an internet connection and download and install the rest of the updates manually rather than through ‘sudo upgrade-manager -d’.  Once that was done, I was amazed at the new Ubuntu.

Improvements that I noticed:

  1. Better Graphical Display (Finally away from the orange/brown theme!)
  2. Applets, as per the past four releases, are better in bothe appearance and use.
  3. Ubuntu is keeping with its integration of web based applications and social networking through the Desktop.

There are many more improvements but these are the ones that I’ve noticed first.  I’ve also seen through Launchpad that bugs are being addressed, which in this pre-review from last year, it would appear the the integration of fixes for the bugs in Linux has improved quite aways in the past year, and this release appears to be continuing the quality product of Ubuntu Linux!