TextEdit and Blank Documents

From Mountain Lion and beyond, launching TextEdit results in being confronted with the Document Picker. Fortunately, the old behavior can be restored by running a simple defaults write command in Terminal.

defaults write -g NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false

The post-Lion behavior can be re-enabled by running a defaults delete command in Terminal.

defaults delete -g NSShowAppCentricOpenPanelInsteadOfUntitledFile

Valid DVD Drive could not be found -70012

Long story made short, I use my SuperDrive in an external USB enclosure.

When opening DVD Player.app, it will present an error stating: Valid DVD Drive could not be found [70012]

A little web search turns up a thread with a great solution on tonymacx86.com.

Step one is making a backup copy of DVDPlayback.framework with this command in Terminal.

sudo cp /System/Library/Frameworks/DVDPlayback.framework/Versions/A/DVDPlayback /System/Library/Frameworks/DVDPlayback.framework/Versions/A/DVDPlayback.bak

Step two is to patch the DVDPlayback.framework file with this command in Terminal.

sudo perl -pi -e 's|\x49\x6E\x74\x65\x72\x6E\x61\x6C|\x45\x78\x74\x65\x72\x6E\x61\x6C|g' /System/Library/Frameworks/DVDPlayback.framework/Versions/A/DVDPlayback

The thread on tonymacx86.com didn’t explain what the above command does exactly, so being the curious type, I wanted to find out what operations the command performs. The simple explanation is that the command uses Perl to add a line of text to the DVDPlayback.framework file.

The more detailed explanation of the flags used with the perl command are below, found on StackOverflow.

  • -p: Places a printing loop around your command so that it acts on each
    line of standard input. Used mostly so Perl can beat the
    pants off awk in terms of power AND simplicity.
  • -i: Modifies your input file in-place (making a backup of the
    original). Handy to modify files without the {copy,
    delete-original, rename} process.
  • -e: Allows you to provide the program as an argument rather
    than in a file. You don’t want to have to create a script
    file for every little Perl one-liner.

If for some reason the DVDPlayback.framework file needs to be restored from the backup that was created in step one, just reverse the command. The restoration command is below for easy copypasta into Terminal.

sudo cp /System/Library/Frameworks/DVDPlayback.framework/Versions/A/DVDPlayback.bak /System/Library/Frameworks/DVDPlayback.framework/Versions/A/DVDPlayback

This issue occurs and is resolved for myself on macOS High Sierra.

Issue with Deluge not seeing all torrent data

I have ran into this issue a couple of times, and each time it happens, I forget the solution.

On occaision, when I create a new .torrrent file and open it in Deluge, not all of the data will be seen or accounted for. This happens in spite of knowing that all of the correct .torrent data is in the proper location.

After much head scratching, I realized that Deluge does not like accents in any file name in the torrent. After removing any accents and creating a new .torrent file, Deluge will now see all of the .torrent data.

This issue occured for me with Deluge version 1.3.13 running as a service on Debian Stretch.