Dynamic MMap ran out of room error when adding new source in Debian

kernel.org was compromised, and the debian mirrors taken offline in the fallout from that. Switched to just using ftp.debian.org, but then when running apt-get update, would get the error:

Reading package lists... Error!
E: Dynamic MMap ran out of room
E: Error occurred while processing ntp (NewVersion1)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

Solution is to make sure cache limit for APT is high enough, and that there’s enough room under /var to handle the cache. To up the limit to 50M, I set

APT::Cache-Limit "50000000";

in /etc/apt/apt.conf (had previously upped it to 20M).

(NTS: check df output; /var should never be so close to being full that space available there should matter, but to be safe, might as well do a

apt-get clean

to empty the cache.)

Posted in Uncategorized | Leave a comment

CoRD.app from the command line

Basic usage:

open "rdp://${REMOTE_USER}:${PASSWORD}@${HOST}/${DOMAIN}?screenWidth=${WIDTH}&screenHeight=${HEIGHT}"

where most of that is optional.

If any of those vars include chars that are delimiters for command-line invocation (i.e. colon, at sign, ampersand, question mark), need to URL-encode them (NOT escape them) for CoRD to understand them and send them correctly. Simple way in zsh to do so is:

PASSWORD=${PASSWORD//\@/%40} PASSWORD=${PASSWORD//:/%3A} PASSWORD=${PASSWORD//\&/%26} PASSWORD=${PASSWORD//\?/%3F}

and similar for each var. Should really just do all of that in perl, though, and iterate across a hash…

Posted in Uncategorized | Tagged , , | Leave a comment

Live Blogging Irene

Apparently, if you believe the news in DC, the world will end tomorrow when Irene arrives. I think I shall live blog this.

Continue reading

Posted in Uncategorized | Leave a comment

Converting iBooks to ePub

iBooks uses ePub, but stores them unzipped on the iThing, so that if you want to pull the files off of the iThing, you need to re-zip them to make them usable as ebooks again. Continue reading

Posted in Uncategorized | Leave a comment

Manually adding keys to Debian apt-key

For errors like:

W: There is no public key available for the following key IDs: 64481591B98321F9 W: You may want to run apt-get update to correct these problems

if apt-get update doesn’t work, try

apt-key update

and if that doesn’t work, then manually import by missing KEYID:

gpg --keyserver subkeys.pgp.net --recv-keys KEYID apt-key add .gnupg/pubring.gpg apt-get update

Probably ought to clear out pubring.gpg first, or use some other tempfile to store it in, but that works for mow. Need to poke into secure apt more and figure out what is going on better. I hate cargo cult sysadmin.

Posted in Uncategorized | Tagged , , , | Leave a comment

resolv.conf on OSX

resolv.conf isn’t used except by a few tools that access it directly (e.g. host(1)). To look up or change DNS lookup settings, use scutil; scutil -dns is syntactic sugar to pull the current settings, but it looks like scutil -set would need to be used to change them. Note that scutil only changes the dynamic setting, i.e. any changes made via it are only changed for the current configd session, so any time configd is restarted (including on reboot), /Library/Preferences/SystemConfiguration/preferences.plist is re-read and any scutil changes are lost. To edit that plist for more permanent changes, muck about with it manually, or change via Network sys pref panel, or use ncutil.

Posted in Uncategorized | Tagged , , | Leave a comment

VOIP @ Home

Note to self: check this out:

http://michigantelephone.wordpress.com/2011/01/22/review-of-the-obihai-obi110-voip-device-part-1-use-your-phone-with-google-voice-for-free-incoming-and-outgoing-calls/

Maybe switch to that and drop the voice portion of Cox interwebs?

Posted in Uncategorized | Tagged , | Leave a comment

Print To PDF from iThing

  1. Install CUPS-PDF:

    https://bitbucket.org/codepoet/cups-pdf-for-mac-os-x/downloads

    Install CUPS-PDF printer using installer.

    http://cinnamonthoughts.org/2010/11/27/print-pdfs-from-ios-using-airprint/

  2. In System Preferences, share CUPS-PDF printer.

  3. Enable AirPrint on Mac, using AirPrint Activator:

    http://netputing.com/airprintactivator/airprint-activator-v2-0/

    (No reboot needed as of v2.)

But doesn’t work… iThing returns error that CUPS-PDF printer is offline. Why?

Posted in Uncategorized | Leave a comment

Auto-importing photos from iThings to iPhoto

OK, this works in at least Snow Leopard:

  1. Browse in Finder to ~/Pictures. Right-click on iPhoto Library and select “Show Package Contents” to pull up a Finder view of that folder rather than the photo browser that would normally come up if you opened the library. Right-click on Auto Import and select “Make Alias”. Move alias into ~/Pictures and (if desired) rename to something like “iPhoto Auto Import” from “Auto Import alias”. (Note to self: possible to do via symlink? Probably not, knowing Apple…)

  2. Attach an iThing to the computer.

  3. Open Image Capture. Select the iThing in “Devices”. In the lower left, click the triangle to show device settings for the iThing if they aren’t visible. Change “Connecting this iThing opens:” to AutoImporter, and check “delete after import”. (Ignore the “Import To” settings on the right; those are only for manual imports from within Image Capture.) (Note to self: does “delete after import” here do anything? It appears not; needs to also/instead be set via AutoImporter.)

  4. Browse in Finder to /System/Library/Image Capture/Support/Application/, and then open AutoImporter from Finder. (As per this OSX Hints tip, if you use open(1) to try to open AutoImporter from the command line (i.e. open /System/Library/Image\ Capture/Support/Application/AutoImporter.app), it will close before letting you do anything. Stupid Apple apparently only allows AutoImporter to run when invoked from the Finder.)

  5. Go to AutoImporter->Preferences, and change Import Folder from Pictures to iPhoto Auto Import (or whatever alias to Auto Import was named). Note that after selecting the alias, AutoImporter will dereference the alias so that the original “Auto Import” folder is what will show in this dropdown. Check the box for “Delete items from camera after successful import”. (Potentially also set up subfolder names if desired, although subfolders will be deleted whenever autoimport is finished so it’s only useful for browsing through to-be-autoimported photos if you open iPhoto infrequently.)

All good now: attach your iThing, and the photos will be moved into the iPhoto Auto Import folder, and then the next time you open iPhoto they will automatically be imported without any prompting.

Posted in Uncategorized | Tagged , | Leave a comment

Sweth would never stack Google in his favor.

Via Medium Large, a good idea that everyone should follow to help manage their online presence: Continue reading

Posted in Uncategorized | Tagged | Leave a comment