Coercing DéjàDup to run a full backup
Posted: 2021-February-19 Filed under: Computers Leave a comment »A while back I started using a Librem 13 laptop running PureOS which is derived from Debian Linux. It has a built-in backup program called DéjàDup which "really just a clever graphical wrapper around the command line backup tool duplicity." It runs incremental backups daily and will "occasionally make fresh full backups for you". The documentation is crap (as of 2021-Feb) so there's no way to make it do such a backup on-demand.
One issue I have discovered is that its incremental backup only looks at the file times (presumably the modified time) to determine which files are new. Ordinarily this is no problem, but I recently migrated thousands of files from my old computer and maintaned the dates. As such, DéjàDup just ignored them. I needed to get it to do a fresh backup.
I found a note on the developer site which suggested editing the settings manually "(dconf-editor or the gsettings command line might work)". I dug around with using gsettings
and found the following things that might help:
Command | Notes |
gsettings list-recursively org.gnome.DejaDup | Lists all the settings for DejaDup. |
gsettings get org.gnome.DejaDup full-backup-period | Displays the current number of days between "fresh full bakcups". |
gsettings set org.gnome.DejaDup full-backup-period 1 | Sets the number of days between "fresh full bakcups" to 1 day. |
What I did was to close Gnome Backups (the front-end name for DéjàDup) then execute:
gsettings set org.gnome.DejaDup full-backup-period 1
I then launched Gnome Backups again and started a backup. It fortunately said it was doing a full backup. I immediately reset it on the command line but it changed behavior and did an incremental backup instead so I had to wait until it finished, then went to the command line again and reset it, this time a little shorter than the default:
gsettings set org.gnome.DejaDup full-backup-period 60
This seemed to do what I wanted.
Call with Google Voice through your own phone
Posted: 2020-August-26 Filed under: Computers Leave a comment »In August, 2020, Google Voice shut down the "classic" user interface on their website. It was far faster than the bloatware version, so I had been using it for a long time. One feature that appeared to go missing on the new version was the ability to place a call by having Google call you on your phone then connect you to the desired caller—the new version only seemed to support calling through your computer.
I didn't find a way to do this until I was digging around in the settings. In the "Calls" section, there is a switch to "Always use my phone to place calls" and they describe it, "[w]hen you start a call on the web, answer your phone to finish connecting the call". Switching this on will use your phone to connect calls.
Also, there is an option to deactivate placing or receiving calls on the web. I find it annoying that if I have a Google Voice tab, a call coming in will "ring" through the speakers even though I never use the web calling feature.
Disabling the Local Control on a SR227 X-10 SuperSocket
Posted: 2019-December-29 Filed under: Electrical Leave a comment »X-10 is a system for controlling various modules (such as dimmer-controllable lamp modules and on/off only appliance modules) using signaling sent through the electrical system of a house. According to the Wikipedia article on the standard, the standard was created in 1975 and works on various international household voltages and frequencies. I have a system in my house which uses a Tandy Model 102 computer running my own BASIC program to provide home automation, interfaced to the X-10 system using a Marrick MA-RS232L LynX PLC Interface.
Most appliance and lamp modules had a feature called "local control" which worked by switching the appliance or lamp's switch off-on-off somewhat quickly to make the module switch on. I've generally disliked this feature as it fails in a couple ways. If if a device cycles on-and-off periodically itself (like a space heater), it will often trigger the local control and turn on unexpectedly. Second is if a device has "futuristic circuitry" (e.g. made after 1975) like switching power supplies or LED lamps it tends to trip up the local control circuitry and turn on automatically. Fortunately, it seems the designers realized some people would dislike the feature, so they often included a jumper wire right on the circuit board inside the module which could be cut to disable it.
I searched for an article specifically addressing the SR227 X-10 SuperSocket for the North American market (120VAC, 60Hz) but didn't find anything. This article on X10Community.com1Internet Archive link outlines the basics, including a circuit diagram for the appliance module, and is the basis for my own tests on the SR227. I took it apart and found it used the same 78570 chip as the appliance module in the aforementioned article.
As it turned out, there was indeed a jumper tied to pin #7 that could be cut.
It is located near pin 1 of the 78750 chip next to the diode. There is a second jumper near pin 16 but it is part of the circuitry to select the module and house number.
You might have noticed that my module has a red wire that comes through the electrical wiring hole near the upper right corner of the circuit board. I soldered this to the relay output so the inside of the electrical box could have access to the controlled circuit. In fact, that's specifically why I wanted to use this module: simply to have a switch for a circuit inside an electrical box. If you have enough experience with electronics, it is obvious where and how to solder on such a wire. (Not to be too snide, but if it's not obvious, please refrain from attempting it.)
Zippo Blu2 Lighter Cleaning
Posted: 2018-September-6 Filed under: Cleaning | Tags: Blu2, butane, flint, lighter, piezoelectric, Zippo 1 Comment »About 3 years ago I bought a Zippo Blu² lighter (which, apparently, has not only been discontinued in 2016, it has been completely eradicated from the Zippo website). I liked it because it was a flint-based lighter (I had heard piezoelectric ignitors would not work at extremely cold temperatures), because it was butane (I don't smoke so liquid-fuel Zippo lighters would evaporate before I could use them), and because it was a genuine Zippo (thus, likely to work correctly all the time and for a long time.) It generally worked just fine—I don't use it much at all, though, so any frequent user will likely have encountered these problems already. I refilled it numerous times over the years and, in general, it worked great. (I did read online a recommendation to completely empty the lighter of butane before refilling by depressing the fill-valve until the "tank" is empty. I'm not sure if that's necessary, though.)
Recently, though, I started getting a really anemic flame. It was enough to make fire, but nothing like the torch-like behavior I was used to. It was such a weak flame that you could blow it out—so much for "windproof"!
I checked online to see if this was a problem and if there was a solution. I found Mark Shell's video on fixing his Zippo Blu which is basically exactly what I'm about to outline here, so if you'd prefer to watch a video, then Mr. Shell's is as good as any.
Indeed, flint and debris filled the vent holes around the lighter burner—almost certainly the cause of the small flame:
I used a straight pin like Mr. Shell and poked the vents clear:
As you can see, the vent holes are now rather clear by comparison:
Unlike normal people, I don't have a spray-air can around so I resorted to an air compressor blower to get rid of the rest of the loose dust and dirt:
Finally the results: a nice strong flame again:
WordPress Static Front Pages with Sidebars
Posted: 2018-June-4 Filed under: Computers Leave a comment »On another site I have, I had changed the front page to a static front page and noticed the sidebar was missing. I didn't really mind much but finally got around to fixing it. I did an inordinate amount of digging, but finally found this WordPress forum topic that asked the same question.
The answer is simple: change the template for the static page to one that includes sidebars. I'm using a child theme of Twenty-Eleven so the page has a default template of "Default Template", but by switching it to "Sidebar Template", the sidebars appeared.
And here I was digging around in the PHP code to try and find out how to do it. Nonetheless, given how much out-of-date and mis– information there is out there, I thought I'd go ahead and make this post to hopefully save someone else the trouble.
Avoid windshield ice scraping by shutting off the defroster early
Posted: 2018-February-5 Filed under: Travel | Tags: freezing, ice, windshield Leave a comment »When the temperature stays a few degrees below freezing all day, the ice and snow melted by a car's defrosters will refreeze and need to be scraped off next time. I wondered if I could alleviate this problem and I tried it on a day when it did stay so cold—and when it was snowing.
About 5 minutes from my destination, I turned off the car's interior heat altogether. It didn't affect the interior temperature too much, but I figured the windshield surface would quickly cool to freezing as well. (The cooling of the windshield was enhanced by car's forward motion equating to a stiff wind blowing on it.) I minimized use of the windshield washer, only enough to keep the windshield clear.
The next day, the car was covered in snow. But the surface of the windshield—and all the glass for that matter—was free of ice. The snow had not melted-then-froze (on what would have been the warmed glass) so there was nothing to scrape, and it swept off cleanly. Trying it several more times, it appears to work when the air temperature is far below freezing (lower than -5°C / 20°F) otherwise the glass just doesn't cool enough.
Paleocord v1.21 Testing Results
Posted: 2017-January-29 Filed under: Paleocord Adapter 1 | Tags: Altoids tin, KiCAD, micro-USB, paleocord, Paleocord Adapter 1, RJ11, RJ14, RJ25, RJ45, USB, USB-A, USB-B Leave a comment »Although it's been on my desk for the better part of a month, I finally had a chance to check out the latest version 1.21 of the Paleocord Adapter 1 board. (Note that the version numbers correlate to the internal CVS version numbers I'm using, so they are not sequential.)
I made the following changes:
- The outermost pair on the RJ25 (the 6-pin version of the telephone jack) is now connected to the first line of the opposite connector. Thus, "line 3" of the Main jack is wired to "line 1" of the Aux jack and vice versa. If you use an RJ14 or RJ11 socket or cable, these pins are not used and won't bother that type at all.
- I changed the surface-mount pad sizes for the micro-USB-B connectors so now they're much easier to solder by hand.
- I moved the USB-A jacks inward 0.075" each and that makes them fit an Altoids tin much easier.
- I added a gap between the headphone jacks so now the panel-mount nuts can be installed without hitting one another.
- I corrected the labeling on the color codes so solid-color wires are "rings" and white/color stripes are "tips".
- I redesigned the labeling to reference the central RJ45 connectors' pin numbers instead of color-coded pairs. At first I didn't like it, but it has grown on me as it's more complete and clear. I think it was just a case of it being "new".
For the most part, this makes the project a satisfactory "done". Nonetheless, here's a couple updates I might make in future revisions:
- Looking through my bin of adapters, I realized if I move the headphone jacks just a little farther apart, they should work with airplane headset adapters.
- If I can find a way, I'll add pads to install a stereo headphone jack so a monaural connection would be wired correctly.
- I'm on the fence about the "on the go" (OTG) jumper. I don't think there exists a 5-pin to 5-pin micro-USB cable, so it isn't actually good for anything (e.g. to notify a device to host USB instead of act as a device.) Nonetheless, someone might want access to that spare pin and they could solder onto the pad. If I do anything, I'll remove the jumper bridge and replace it with a through-hole pad so it's easier to make use of.
See the Paleocord 1 main page for updated details and ordering information.
Paleocord v1.15 Testing Results
Posted: 2016-December-5 Filed under: Paleocord Adapter 1 | Tags: Altoids tin, KiCAD, paleocord, Paleocord Adapter 1, RJ11, RJ14, RJ25, RJ45, USB, USB-A, USB-B Leave a comment »I finally got and tested a few Paleocord 1 boards from OSHPark and found a couple minor problems. For reference, the source files are still available—v1.15, 2016-Nov-7.
The good news is I tested all the connectivity and it is correct. The bad news is the labeling is wrong. There was no pin #7 on the main RJ45 jacks, and I had reversed all the wire color-codes: all the solid-color wires should have been rings and the white/color stripes tips. I also didn't like how the labeling appeared once it was finally on the silkscreen. And when I was fitting it to an Altoids tin, it was a pretty tight fit since the USB-A connectors stuck out pretty far. I had tested using headphone jacks with threaded barrels, and the nuts for those jacks would actually touch.
So the following are changes for the new release v1.21, 2016-Dec-4:
- Wire outer pair on RJ25 jack (formerly unconnected; if you use an RJ14 or RJ11 socket or cable, it will still be.)
- Move USB-A jacks inward 0.075" each.
- Add a gap between the headphone jacks.
- Correct color codes so solid-color wires are "rings" and white/color stripes are "tips".
- Redesign labeling to reference the central RJ45 connectors' pin numbers instead of color-coded pairs.
See the Paleocord 1 main page for updated details and ordering information.
Work Around Address Book's Rollover Suite Bug to Calculate Age
Posted: 2016-May-16 Filed under: Computers | Tags: 10.6.8, Address Book, OSX, Snow Leopard Leave a comment »This is a start to working around a known Rollover Suite bug in Apple "Snow Leopard" OSX 10.6.8's Address Book application, version 5.0.3 (as noted on Apple's support group). The application contains a really cool feature where one can write AppleScripts that appear as pop-up menu choices. A built-in example is the way you can click on an address field and "Copy Mailing Label" which does an okay job formatting a mailing label for that person's address.
This is accomplished by writing an Applescript that has the following form:
using terms from application "Address Book"
on action property
return "" -- a string of "maiden name", "phone", "email", "url", "birth date", "custom date", "related name", "aim", "icq", "jabber", "msn", "yahoo", or "address"
end action property
on should enable action for thePerson with theEntry
return true -- if the menu choice should appear
end should enable action
on action title for thePerson with theEntry
return "" -- the text of the menu choice to display
end action title
on perform action for thePerson with theEntry
-- Perform the action if the user clicks the menu choice.
end perform action
end using terms from
So if you plug in something like this:
using terms from application "Address Book"
on action property
return "phone"
end action property
on should enable action for thePerson with theEntry
return true
end should enable action
on action title for thePerson with theEntry
return "Dial number"
end action title
on perform action for thePerson with theEntry
-- Dial the number.
end perform action
end using terms from
And you save it as a compiled script in ~/Library/Address\ Book\ Plug-Ins/ (that is, your user account's Library/Address\ Book\ Plug-Ins/), then the next time you restart Address Book, it'll activate. If you click on the label for a phone number, you'll see a new menu choice like this:
As I had mentioned, there's a known bug where this, in many cases, doesn't work—with birthdays, custom dates, or related names, for instance. I took a wild guess as to the problem and did make a workaround for birthdays and made a working way to simply display the age of someone in the "birthday" field.
The trick was that the Address Book application doesn't execute the should enable action, action title, nor (presumably despite not testing it explicitly) perform action script terms correctly. In short, it doesn't specify thePerson nor theEntry. For things like custom dates this is a problem because I think you'd need theEntry variable to figure out which custom date is being clicked. But for things like birthdays you can fake it by using the current selection of the address book.
At least assuming only one entry is selected.
So I made up a script that calculates the age of a person and adds that to a menu choice on jeir birthday. Here's the script:
using terms from application "Address Book"
on action property
return "birth date"
end action property
on action title
tell application "Address Book"
try
set theCurrentPeople to selection
if (number of items in theCurrentPeople) is 1 then
set theCurrentPerson to item 1 of theCurrentPeople
set theBirthdate to (theCurrentPerson's birth date as date)
tell me to set theAge to roundOff from (((current date) - theBirthdate) / (365.25 * days)) to 1.0E-3
return "Age " & (theAge as text) & "."
else
return "Select one person."
end if
on error msg
return "Error: " & msg
end try
end tell
end action title
on should enable action
return true
end should enable action
on perform action for thePerson with theProperty
return ""
end perform action
end using terms from
on roundOff from num to precision
set theFixed to round (num / precision)
return (theFixed as number) * precision
end roundOff
And it looks like this:
Removing Duplicate Messages in Apple's OSX Mail
Posted: 2016-February-26 Filed under: Computers | Tags: Apple, Apple Mail, OSX, Python, Snow Leopard, UNIX 5 Comments »I'm still running Snow Leopard (a.k.a. OS X 10.6.8) and using Apple's Mail version 4.6. I also tend to keep everything, so Mail is bloated with thousands of e-mails dating back to—believe it or not—October 14, 1990 (and checking, it's actually just shy of 100,000 messages). Over the years, Mail has created duplicate messages now and then. I did a bit of research and there are some tools to do it. For instance, Bohemian Boomer's article on Remove Duplicate Messages refers to the so-named AppleScript that does what it says. While I gather it would eventually work, scripting Mail with AppleScript is not exactly fast, and I found it was processing thousands of messages per hour and not the most robust architecture for such a huge project so I stopped it.
Nick Shubin's article on Finding Duplicates in the Mail Database talks about how each message is stored in the ~/Library/Mail/Mailboxes tree in its own *.emlx file. He used a program called Find Duplicate Files by Araxis which would probably work fine.
My technique was similar, although I didn't clean up the attachments files at all. I had written a Python script that would scan files and find duplicates. The original purpose was to replace the duplicates with UNIX "hard links"—where two or more files would point to the same data on disk (as opposed to a "soft link" where on directory entry points to another, much like a Finder alias). There's a whole history about how the data on disk is just stored in chains and is referenced by a link to the data's inode, so the UNIX remove (rm) command is also called the less-ominous and more-accurate unlink. (Something like that anyway … it's been decades since I looked at file systems that closely.)
Anyway, I added a couple options so I could delete files instead (omitting the ln commands to build the links). I closed Mail and ran it on my tree. In a half an hour, it found tens of thousands of duplicates. I had confidence in the program I wrote (having tested it in the past) so I went ahead and removed the duplicates.
Back in Mail, I figured it would be wise to select all the affected mailboxes and Mailbox:Rebuild them. Once I was done, I noticed a few duplicates still appeared in Mail.
It turned out—probably because of some odd rule I had added to Mail—that one message would have a color key in its XML extension and the other would not. Specifically, the difference between two duplicates was only:
<key>color</key>
<string>000000</string>
So I used TextWrangler to search all the files and simply remove that combination (figuring it was not harmful since it was setting some color to black which was probably the default anyway.) Running my script a second time, I got another few thousand messages and removed them. There may be more, but I haven't found them yet and I'm satisfied.
And yeah, someday I'll put that Python script in open source somewhere or other. For now, it's not adequately commented so I'll hold off on publishing it.
Recent Comments