Configuring WiFi adaptors on Linux via the command line

EdimaxHardly an original post but there are so many variants around that, when I need to do this and have (as usual) forgotten how to do it, I can’t find anything that works! So here is my variant…

Add an entry for wlan0  to the /etc/network/interfaces file:

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

Then, create /etc/wpa_supplicant.conf to use WPA encryption (this link  has examples of other modes):

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
fast_reauth=1
network={
         ssid="your_ssid"
         scan_ssid=1
         key_mgmt=WPA-PSK
         psk="your_passphrase"      
}

 That’s it for DHCP. To use a static IP address, change the /etc/network/interfaces entry (with the appropriate customizations) to be:

auto wlan0
iface wlan0 inet static
    address 192.168.2.3
    netmask 255.255.255.0
    gateway 192.168.2.1 
wpa-conf /etc/wpa_supplicant.conf

Mac Mail app crashes on launch – rebuild the envelope index

For no good reason at all my Mac Mail app started crashing on launch and would not stop. A quick Google search found this article – the key bits are reproduced here to make things easier.

Open Finder and select the Go menu option. While holding down Option, select the Library option (which is otherwise invisible). Navigate to Mail/V2/MailData. In that folder there will be a number of files starting with “Envelope Index”. Move (not copy) all of these out to the Desktop or somewhere safe just in case. Then, launch the Mail app. It will re-import the messages (which might take a long time depending on how many there are – about 20 minutes in my case) and then everything should be back to normal. If that worked, the original index files can be deleted.

Linux: setting permissions for USB serial ports using udev rules

USBIt’s pretty annoying that, by default, USB serial devices come up with somewhat restricted permissions. Sometimes adding the user to the dialout  group works, sometimes it doesn’t. The most reliable way to fix this for all time is to add a udev rule but I can never remember the syntax, hence this post…

Continue reading “Linux: setting permissions for USB serial ports using udev rules”