Archive

Archive for September, 2011

Git Quick Reference Card

September 24th, 2011 No comments

Git has a lot of commands. Well over 100 of them. Most of the times you only use a handful of them, but if you’re a power-user, every once in a while you’re looking for that elusive command that you remember reading about. This Git quick reference card sums them all up for you so you can look up the details using Git’s help system (git help <command>).

Git Quick Reference Card - Page 1

Git Quick Reference Card - Page 2

The reference card is available as a PDF so you can print it out. The PDF version is derived from the TeX file which is hosted at http://github.com/gburca/git-qrc so anyone can update it.

Categories: Uncategorized Tags:

How to make wpa_cli talk to wpa_supplicant in Ubuntu

September 15th, 2011 5 comments

On a stock Ubuntu 11.04 distribution, wpa_cli can not talk to wpa_supplicant. Regardless of the options used, wpa_cli will always report:

Could not connect to wpa_supplicant - re-trying

That’s because wpa_cli expects to talk to wpa_supplicant over a control socket, but the default wpa_supplicant command line options don’t create a control socket (only the D-Bus interface is activated).

The fix is fairly easy. Modify the following file:

/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service

and pass the -O option to wpa_supplicant by replacing the

Exec=/sbin/wpa_supplicant -u -s

line with

Exec=/sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant

Notice, that’s a capital-o, not a zero in the command line.

Restart the supplicant with: sudo killall wpa_supplicant and run ps auxww | grep wpa_supplicant to verify that the new options are being used.

If you notice that your changes are ignored, try making the same changes to:

/usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service

You should now be able to run wpa_cli without any command line options (or with wpa_cli -p /var/run/wpa_supplicant) and talk to wpa_supplicant.

Categories: Uncategorized Tags: