Saturday, January 28, 2012

Solution: Displaying KTimeTracker results chronologically

KTimeTracker is very cool. It automatically adds events to an .ics file for events on the computer.

But it has no way to display the record in a chronological fashion.

The solution is a bit of a hack, but after several hours of googling about it seems to be the only way:

1. Load the .ics file as a new calendar in Thunderbird's Lightning calendar application (Sunbird is defunct, Evolution does not offer the conversion).
   File > Open > Calendar File > (Navigate to the .ics file)
  
   This will display most of the events as "Tasks" but not to worry, we are just using the file conversion feature of Lightning.
  
2. Export it as a .csv file:
       Right click on the calendar file in the left panel (e.g. chronology), select Export Calendar,
       select Outlook Comma Separated Values (.csv) as the output file format,
       and choose the filename (which in this case defaults to chronology)
       (Delete the calendar in Lightning: right click and choose Delete...)
   
4. Open the exportedfilename.csv in Excel or OpenOffice Calc. This will trigger the text-to-columns editor. Ensure you select Separated by: Commas and especially, Detect special numbers or else the times will be imported as text fields with a text delimiter I cannot figure out how to delete.
  
5.  Format the date and time columns as desired. I prefer 24 hour formats, which at a touch confirms that the times have been properly imported.
  
6. Sort the result as you wish.

Easy when you know how...
As I said, this is a hack. It only gives the result at a snapshot of time. I wish KTimeTracker would just offer a chronological sort presentation, which would show ongoing results. But it doesn't.

Wednesday, January 18, 2012

NDAA, SOPA, PIPA, MPAA, RIAA, and Life, Liberty, and the Pursuit of Happiness

18 January 2012 was an historic day, mark my words:
WE THE PEOPLE spoke with unequivocal clarity: 
     Yoh! Government! Butt Out!
There is a clear, dangerous, and hideous trend here:
  • NDAA: Elimination of habeas corpus protection, after 900 years
  • SOPA/PIPA: 
    • Elimination of due process: arbitrary website shutdowns on suspicion of malfeasance broadly defined
    • Redirection of web access ("DNS" filtering): effectively reporting you to authorities for even trying to access certain websites
I won't sea-lawyer the details here, there are plenty of other sites that explore all the niceties. If you don't know the acronyms then Google and Wiki-dive when you can. 
The point is that there is a collusion afoot between our elected representatives and big business "content vendors" (MPAA, RIAA) to restrict our historically defended (um, with blood, need I remind you) rights to freedom of body, speech, privacy, and spirit.
So what can you do?
MAKE A NOISE. Complain. Write. Join. Post. 
If you just let it happen, if you insist on being politically correct, you have no one to blame but yourself. That is what happened in Germany in the 1930s.
Anyone who is purposely trying to hurt you is NOT your friend. Not family, not associates, especially not politicians.
So, MAKE A NOISE.
As for the MPAA, RIAA, News of the World, all the "Times", and the newspaper industry in general, consider the following:
  • Studies have shown that if someone likes a product they'll usually end up paying for it. That certainly goes for me.
  • On the other hand, I don't pay for trash.
  • Most of the movies out there are trash. Violence, foul language, stress... who needs it? 
  • Packaging a ton of trash with the one good song is common recording industry practice. If you want the one good song you have to pay for all the trash you don't want.
London Times does the equivalent. You have to buy an entire week of papers to get Internet access to their site. I don't have time to read all that trash!! So I canceled my subscription, and haven't missed it a day.
I can go on and on. But the bottom line is that most people are decent. The people they are trying to get with these measures will find another way and most are just doing for fun or bragging rights anyhow. So they are cutting off their noses to spite their faces.
And when you do that at the expense of my freedom, liberty, and privacy, then I get mad.
Fighting mad.
And not just I.
LISTEN UP!! WE THE PEOPLE!!
As for actual measures to fix the problem:
Term Limits
We need to change the kind of people that are drawn to elected Government positions.  That means changing the system fundamentally from risk-averse to risk-prone people. People willing to stand up and strike out.
Like me.
But people like that will burn out. So they won't stand for the twenty or so years it takes to get into a position in which you can actually accomplish something.
So the system needs to change to let people like me get in, fix things, and get out.
And that means TERM LIMITS. Three strikes and you're out:
  • First term to figure out what's happening
  • Second term to actually try to do something
  • Third term to start to become cynical and conniving.
And that's it, bubba, home for you.
It's no coincidence that that is why the military typically limits tours to three years. It works for action- and results-oriented people.
So:
Make a noise: write your representatives, post to your friends and the web. Do Something!
If not, you have only yourself to blame.

Thursday, September 29, 2011

Linux Anti-Virus: Klamav

For a number of reasons, I reinstalled Linux openSUSE 11.4, which then meant reinstalling all the apps, including clamav, the popular anti-virus app for Linux.

This time I discovered klamav, a KDE GUI for the underlying command line interface (CLI) clamav. (There is also a Gnome GUI, but I haven't used it yet.)

klamav is a true pleasure. Very well thought out and complete, as far as it goes.

And it goes quite a way.

Use it to:
  • Schedule virus scans on any number of directories, either recursively or not: it has a very easy functional decomposition tree of the directories. If you want to go recursively there is a simple click box: click it and any particular directory in the tree and all the children are automatically checked.
  • Conduct a scan immediately. Simply click scan.
And much more.

Of course, it has a few problems:
  • It offers only two email programs to be scanned dynamically as the messages arrive: kmail and Evolution. I searched, there was a Thunderbird ("T-bird") addon that supposedly solved this, but it has disappeared for version 7.0. But that doesn't really matter, as you can manually and on schedule do the scan, as noted above. And frankly, dynamic scanning is an exercise in paranoia for most Linux users...
  • It tags and (with your permission) quarantines the entire subdirectory containing a suspect file. And it does this by default if it finds stuff it doesn't understand, like any binaries or encrypted files. But this is not a problem unless you are doing a lot of encrypted PDF and binary transfers by email, which you shouldn't be doing anyhow. Use http, ftp, BitTorrent, or whatever else, not email... And even then, it has a 'way cool "check it out" feature: once the files/messages are quarantined you can right click to have their "problem" checked out online, (I found the google link the most helpful), and then with one click, restore them.

    Most of the problems were of the "not understood" variety. I did find one file that possibly had a real virus, and deleted it.
    But it would be nice if the author were to enable quarantining just the single offending file (rather than the entire subdirectory) and include Thunderbird in his list of supported email clients, or else offer a website posting on what it would take to create a filter to do so...

    So very well done, and well recommended. Infinitely better and easier than struggling at the CLI.

    Saturday, July 30, 2011

    Screwtape Zero, Andy One


    This summarizes the features of the fresh water system in M/V Pilgrim and measures taken to repair the problem of the fresh water pump failing to turn on until pressure is non-existent.

    The freshwater pump was replaced in July 2010. The water pressure was falling to 0.5 bar before the pump would come on. It would then cut out at 1.7 bar. If you were in the shower you would have to get out of the shower to open the sink tap to trigger the pump to come on so that you could complete the shower.

    At the end of the day, the problem was the selection of pressure switches. The original installation had an outboard pressure switch installed, but the new pump had an integrated switch. Loathe to foul things up I installed the new pump without modification, bypassing the outboard switch and using the integrated switch. It turns out that the pressures on the integrated switch are too low for our needs so we needed to reinstall the original outboard switch.

    The second problem was determining maximum system pressures. There are at least six different choices, depending on which component you examine. Documentation is poor. We were unable to find documentation for the installed semi-rigid blue piping, but research indicated that most PVC piping can sustain pressures much higher than the accumulator tank (10 bar) or installed pressure gauge (4 bar). So in the end we adopted the maximum of the installed pressure gauge.

    The third problem was then adjusting the outboard switch to fall within this range of pressures. We were not able to determine whether the switch had differential setting capabilities so had to experiment. It appears that it does not. Thus we had to settle for a 2.0 bar differential between cut-in/-out. The “green zone” maximum of 2.5 was adequate but this would cause a 0.5 bar cut-in, which is too low. So we accepted 1.2/3.2 bar.

    A remaining problem may be final tweaking of the accumulator tank air pressure. It should be 0.15 bar below the pump cut-in switch. We have it somewhat less than that.

    And then finally we need to investigate why the hot water side is substantially lower than the cold water. But tomorrow is another day.

    It all looks terribly simple in the result, but life is easy when you know how and terribly difficult when you do not.

    I do now know how, at least on this bit.

    We have cut-in at 1.2 bar, cut-out at 3.2 bar, well within the pressure limits of the installed pressure gauge, accumulator tank, piping, and pump. And we no longer have to get out of the shower to open a tap to trigger the pump. Life is good.

    Full report at
    http://tinyurl.com/3j42vhp

    Friday, July 29, 2011

    Screwtape one, Andy zero

    Well maybe not.

    There were just too many moving parts, too many things amiss, so I have decided to stay until next summer.

    In the meantime, working to fix stuff.

    Starting with the anchor windlass. But the switch had packed up. So I ordered a new one.

    Incredible but true: there seem not to be any shops in London into which you can walk and obtain a part or a tube of caulking. So it is all by mail order, with the attendant delay.

    So we got the new switch, but it requires NON-silicone caulk, so we're waiting for THAT by mail.

    OK, then let's attack the water system.

    Sigh. See the attached report.

    OTOH, I get to stay in London.

    So who really won?

    Life is tough when you pay attention.

    Saturday, July 23, 2011

    Screwtape doesn't want us to leave London

    http://www.metoffice.gov.uk/weather/marine/shipping_forecast.html#All~All
    
    Oh well... :-( We wouldn't have gone anyhow, even if the windlass HADN'T packed up. Force EIGHT!! Good grief!! That's FORTY KNOTS!
    
    http://en.wikipedia.org/wiki/Beaufort_scale
    
    Gentlemen do not sail to windward. It tends to get rough and sloppy and spills the champagne and hors d'oerves, and that's simply not right.
    
    Especially at forty knots.
    
    !!!  
    
    Screwtape definitely doesn't want me to leave.
    
    In my underway checks I fixed the wrench for the cooling system, but then found that the transfer valve was frozen. So I worked that with WD-40 for a while and then it broke free - literally, with an ominous "crack" sound. Now it is *too* free. So I need to finish checking that out to see if I need to replace the valve.
    
    As for the windlass, the circuit breaker had tripped, but when I reset the breaker I found the foot switch had packed up in the UP ON position, so the windlass was continually on, even though the anchor was fully up. So I need to replace the switch.
    
    And then the cooling system cap was leaking - the gasket had expired, so I trekked to Halfords on One Mile Road. Mine is set for 19 psi but the biggest they had was 13  psi. So I bought it and then swapped out the gasket...
     
    Wow. When you go past Wapping suddenly you are in Pakistan... THAT was an experience...
    
    And then there are three connectors on a wiring harness that are dangling loose. I don't know what they are for but have kind of figured out they are connectors for a module that is not installed. But I need to confirm that,  with either the manufacturer or experimentation.
    
    And then there is the deck washing pump that brings up seawater to wash the decks, it isn't pumping except a trickle...
    
    These things happen with boats when you don't use them for a while ...
    
    So I'll get all these squared away and if there is still time head out, otherwise will leave the boat here for another year and have it all squared away and ready to sail NEXT summer...
    
    I really got spoilt having it in NL under the care of the marina - so much so that I have forgotten a lot of the details. I have them in my files but am now refreshing myself.
     
    The more you know the more you know how little you know. 

    Thursday, July 21, 2011

    Travels with Mobile Broadband

    We're on travel in the UK aboard a boat in St. Katherine's Dock, London. There are some 33 different WiFi access points, the stronger two being Boingo.com and WiFiHotzone.com. But even these have spotty connectivity. So we sought a different solution. This relates our trials (and success) in employing "Mobile Broadband" solutions.

    One alternative to WiFi is to use 3G Mobile Broadband "dongles" offered by BT, Vodafone, ThreeNet, and others. We chose Vodafone, which currently (July 2011) offers the ZTE K3570-Z "dongle".

    These dongles are essentially a cellphone on a USB stick. They appear as a CD ISO containing Mac and Windows software but then are "Modeswitched" to appear as serial modems. This is all bleeding edge technology: easy if you know how but frustratingly difficult to figure out how if you don't. It took us about a week of experimentation and googling to finally crack it.

    Part of the problem is the "can't get there from here" problem: You need to download software to install to have the thing work, but if you can't get it to work you can't connect to download! The WiFi connections have a very short timeout, the native Windows apps are huge (88MB). So finding an amazingly simple solution is amazingly difficult to do. But we did and here is how.

    First, do your homework. We went around Robin Hood's barn but by then had learned enough to be able to responsibly get an appointment with a Vodafone technician at one of the stores. The first thing he did was transfer the 88 MB software and set it up on Windows (We're running Windows XP on VirtualBox). But then two hours elapsed while he fiddled with APNs, PINs, passwords, and other things, none of which worked. So as it was time for lunch I thanked him for his time and for the software and left.

    When I got home the first thing I discovered was that he had created a second modem. I deleted it and off we went - but on Windows. Still no joy on Linux.

    There is a site (http://www.betavine.net/) that offers a bunch of Linux programs under a Vodafone logo but they are for the older Huawei modems and don't seem to work with my unit.

    But finally I found

    They have two programs: one with and one without the usb-modeswitching software. The latter uses the modeswitch software installed on your system, the former provides its own.
    • Full version embeds latest Usb-ModeSwitch version along with its device database. You should choose it if your distribution does not provide a recent Usb-ModeSwitch version, and you intend using a switchable USB modem.
    • Binary free version is architecture independent but it requires Usb-ModeSwitch being installed on your system.
    I first installed Sakis3G binary free. It connected to "Interface #3" but no packets were exchanged and ping did not respond from the gateway.

    So I deleted that and tried the full version.

    Still no joy. It connected to the network but no communications occurred. Checked the firewall, no problem...

    But then I realized that knetworkmanager was still running. Shut it down, tried again, success!

    Woohoo! Finally!

    There are some tricks picked up in the earlier travels (travails?):

    • Run the command as root. Getting the root password doesn't seem to work on my system.
    • Get the correct APN. Sakis3G helpfully lists the various options for vodafone. In my case it is the "new" PAYG APN: ppbundle.internet
    • Get the PIN and PUK codes printed on the back of the SIM card card before you throw away the residue! If you fail in this regard (throw away the residue before recording the PIN and PUK) you can read the phone number off the SIM then use the Vodafone site to request the PIN and PUK(assuming you can get some connectivity to reequest them). The PIN is 0000 by default.
    • Get the correct phone number to dial. In my case it was *99***6#. The dongles have a number of different "connection profiles" (sets of Internet settings) that vary with manufacturer and service. Here the 6 refers to the sixth connection profile.
    • Consensus of my research is that /dev/ttyUSB3 is the only one, of the five serial ports generated, that responds. Presumably this is the only one that corresponds to a modem interface on the ZTE K3570-Z.
    • Make sure you have changed the network to NOT use a network manager. Under openSUSE 11.4 this is accomplished with yast2 network > Network card > Global Options > Traditional Method with ifup. You don't actually have to use ifup since Sakis3G does that for you, but you have to do this to allow it to do it for you.

    If you want to learn more about serial ports and modems then Sakis has a comprehensive tutorial at 

         http://wiki.sakis3g.org/wiki/index.php?title=USB_interface


    So other than that, Mrs. Lincoln...

    Easy when you know how.