I found myself having odd problems connecting to WPA2 encrypted wireless networks with a new laptop. There must be more elegant solutions to this problem, but this worked for me. The problem was that I couldn’t connect to a nearby hotspot secured with WPA2 whether I used the default config tool for mint, Wicd Network Manager, or the command line. Errors were either “bad password” or the more detailed errors below.
As with any system variation mileage may vary, my errors look like:
wlan0: CTRL-EVENT-SCAN-STARTED wlan0: SME: Trying to authenticate with 68:72:51:00:26:26 (SSID='WA-bullet' freq=2462 MHz) wlan0: Trying to associate with 68:72:51:00:26:26 (SSID='WA-bullet' freq=2462 MHz) wlan0: Associated with 68:72:51:00:26:26 wlan0: CTRL-EVENT-DISCONNECTED bssid=68:72:51:00:26:26 reason=3 locally_generated=1
and my system config is reported as:
# lspci -vv |grep -i wireless 3e:00.0 Network controller: Intel Corporation Wireless 7260 (rev 6b) Subsystem: Intel Corporation Dual Band Wireless-AC 7260 # uname -a Linux dgzb 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
The following successfully connects to a WPA2-secured network:
$ sudo su $ iw dev ... Interface [interfacename] (typically wlan0, assumed below) $ iw wlan0 scan ... SSID: [ssid] ... RSN: (if present means the network is secured with WPA2) $ wpa_passphrase [ssid] >> /etc/wpa_supplicant.conf ...type in the passphrase for network [ssid] and hit enter... $ sh -c 'modprobe -r iwlwifi && modprobe iwlwifi 11n_disable=1' $ wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
(open a new terminal leaving the connection open, ending the command disconnects)
$ sudo su $ dhclient wlan0
(should be connected now)
Mosh is a pretty good tool, almost indispensable when working in places with crappy internet. While it is designed to help with situations like “LTE on the beach,” it actually works very well in places where internet connectivity is genuinely bad: 1500msec RT, latency, 30% packet loss, and frequent drops in connectivity that last seconds to hours, otherwise known as most of the world. On a good day I lose an SSH connection randomly about every 3-6 hours but I’ve only ever lost a Mosh session when my system went down.
It does a lot of things, but two are key for my use: it syncs user input in the background while local echoing what you type so you can finish your command (and correct a typo) without waiting 1500msec for the remote echo to update; and it creates persistent connections that survive drop off of almost any type except killing the terminal application on one end or the other (anything between can die and when it recovers, you catch up). This means compiles finish and you actually get the output warnings…
…some of them. Because Mosh’s one giant, glaring, painful, almost debilitating weakness is that it doesn’t support scrollback. So compared to tmux or something else that you can reconnect to after your SSH session drops, you really lose screen content, which is a PITA when ls-ing a directory. I mean, it isn’t that much of an efficiency gain to have to type “ls | less” instead of just “ls” every time you want to see a directory.
I found a solution that works for me. I also use Tmux with Mosh because Tmux will survive a dead client and working with Windows client reboots are a fact of life (I know, sad, but there are some tools I still need on windows, hopefully not for much longer).
Tmux has a facility for creating a local log file, which I then “tail -f” using a separate SSH window. If the SSH client disconnects, no loss, I can pick up the log anytime. It is just mirroring everything that the mosh terminal is doing and the scroll bar scroll back works fine. And it is a raw text file, so you can pipe the output through grep to limit what’s displayed to something of interest and review the log asynchronously as, say, a build is progressing.
Although there are some nice advantages to this, when/if Mosh supports scrollback, it’ll be far more convenient having it in the same window, but for now this is the easiest solution I could come up with.
# portmaster sysutils/tmux # portmaster net/mosh # ee ~/.tmux.conf -> bind-key H pipe-pane -o "exec cat >>$HOME/'#W-tmux.log'" \; display-message 'Logging enabled to $HOME/#W-tmux.log' -> set -g history-limit 30000 Start a Mosh session (for example with Mobaxterm on windows) # tmux # [CTRL]-b H start SSH session (Mobaxterm or Putty on windows) # tail -f csh-tmux.log ("csh" will be the name of the mosh window - so really "(MoshWindowName)-tmux.log"
You can tmux the ssh session too and still have scrollback and then just reconnect into the same tail command, which preserves the whole scrollback. If you’re on a connection like I’m on, your scrollback logfile will drop off a couple of times a day, but you won’t lose your Mosh session, and it’ll be waiting for you when you’re reminded that you need to see those security warnings from the compile that just scrolled off the Mosh screen forever.
PIMs (Personal Information Managers, what we used to call things like Outlook, or Sunbird, or Lightning, or Zimbra before they were integrated with email) haven’t progressed much in the last 20 or so years. Actually, neither have email clients. Perhaps the most essential of our daily tools, these classes of products have failed to progress much at all over the decades.
Sure, email has styled text now and you can compose a message in Outlook using Word, but these wizzy tricks distract from the function of email–communicating the written word. There’s rarely any reason to style text in email and HTML mail has only been a boon for spammers and a distraction for users. One of the few useful enhancements is inline images which I do find useful.
The best email clients ever, Eudora and Mulberry (the BAT might qualify too, though I haven’t used it) have failed to keep up in OS level support. Thunderbird is OK, and pimped out with extensions to enable proper formatting, forwarding, text wrapping, etc. it is usable, though it still doesn’t handle frequent IMAP disconnections all that gracefully (it pains me to admit it, but only Outlook does this really well).
PIM functionality has actually gone backwards as the years have gone by. Calendar programs have always handled reminders and notifications and scheduled events fairly well. DateBook was great in 1990 and there’s very little useful that has been added since . In the mid-90’s Motorola shipped a great little PIM along with their TimePort phones called TrueSync Desktop. You could create an event in a time zone other than the one you were in. Wow. Amazing. The developers actually considered the possibility that you, the user, might have some business in a time zone other than the one you’re in. At the time, some people pointed to Outlook’s then “dual time zone” functionality as the be-all end-all. True, two time zones are better than one, but hardly a solution suitable for the whole of the US, let alone the world and the pixel heavy dual time zone stripe precluded anything more comprehensive. At the time, the official M$ work-around was to change your computer’s time zone to the time zone you wanted to create the event in, create the event, then change the time zone back. Brilliant.
Lightning (for Thunderbird) and Sunbird (stand alone) Calendar programs have finally incorporated some timezone functionality, you can at least set the starting and ending time zone of an event independently and differently from the time zone you’re in:
It is a start, but the time zone picker is still pretty much unusable:
This is a huge enhancement though, one I’ve been pushing for a long time:
The right answer is a simple pop-up menu with my favorite time zones in it. I can use the semi-infinite list of seemingly random city names as a geography quiz along with Wikipedia to figure out what my favorite time zones are as long as I don’t have to spend 10 minutes scrolling through them every time I’m trying to find America/New York for ET or America/Los Angeles for PT (or America/Dawson Creek for MST, no DST).
Oddly, Lightning actually has a half-decent map view that shows you the time zone you’ve selected, but you can’t click on it to pick the time zone you want (!?):
I really like worldtimezone‘s view as a graphical picker:
Something like this, plus a search tool into a database of time zones for cities would be just perfect for creating my list of favorite time zones. Even the most worldly traveler is unlikely to need more than a dozen time zones in their favorites list and thus a popup would make selecting the start and end time zones very straight-forward. Way back at the start of 2007 I proposed something like:
Which is pretty much a copy of Starfish’s TrueSync Desktop (though TSD didn’t support different starting and ending time zones). Someday… maybe someday I’ll have a calendar program as advanced as they were in 1993.
Time Zones are a peeve of mine I’ve been trying to get sorted out for years. I’m not alone either, at least one rant has been cross-posted. The gist of the problem is embodied in the following:
You are in California on the phone with someone in Boston planning a phone conference from 10:00-11:30 am for next week at which time you’ll be in London. What time should you set the conference for? Can you do the math? How about if you’re in Phoenix in April? There are 31 time zones and almost all contain some regions that observe and some that do not observe DST. This is the sort of irritating arithmetic my computer should do.
Time zones are actually very easy to handle – and it is also easy to give reminders to people as to what time zone they are in all in one simple modification to the “new appointment” and “new task” dialogs: just add a start and end time zone for each that defaults to the current time zone the computer is in. Why both start and end? Because when you get on a plane you very frequently start in one time zone and end in another and airlines give you takeoff and landing times in the local time zones.
We’re using Zimbra ZCS these days, a pretty nice program, but they handle time zones worse than any modern program I’ve used. Hopefully they’ll fix it to something like this:
26c3 was a blast, as was Berlin. It’s a good conference in the olde school hacker style: mostly younger people, mostly wearing black. There weren’t a lot of women, but Carolyn, Isabella, and Meredith tried to even out the ratio a bit.
Some of the best lectures included one by some German engineers working on the lunar x-prize. They had their prototype rover with them and gave a great talk about the various challenges.
Another great one was Dan Kaminski’s talk on PKI. I don’t agree with the premise that SSL should be a reliable method for identifying the owners of websites as people just can’t tell the difference between bankofamerica.com and bancomerica.com and so it doesn’t make anyone safer if the bankofamerica site is super green if bancomerica.com is also super green, and so the complexities of getting an accepted certificate simply reduce the use of secure connections and the overall security of the internet. But he had some pretty great attacks on the security of SSL that causes problems no matter what.
We enjoyed fuzzing the phone as well. It was a very entertaining talk on attacking phones with crafted SMSes. The method of creating the attacks was very clever – rooting the phone, redirecting the radio to a wifi link to a CPU so they could try zillions of SMS and see what would happen. In the process they discovered they could remotely root the communications manager (which runs as root). And %n to specific windows phones and they’ll crash and fail to reboot until the SMS is cleared out of the inbox.
Berlin is a great city and it was fun working in the shadow of the TV tower.
We made reservations for lunch but we could tell it wasn’t going to be a great day. In the end it was a very intimate lunch with pretty clouds pressing against the glass.
The fog lifted but was replaced by snow, which is a lot of fun in a city when you don’t have to drive.