Add PATH Environment Variable to launchd Scripts

Recently I was having an issue with Node.js not being detected in my PATH with a Python script executed by launchd. This was bizarre to me for a couple of reasons.

First, I’ve been using launchd for awhile now, and any LaunchAgents run under my profile usually has detected anything in my path, including Homebrew installed binaries.

Second, when testing the script via Terminal it worked perfectly.

After reading the available launchd keys, I discovered you can add an EnvironmentVariable with a list of your PATHs that will be executed before the ProgramArguments key.

It worked perfectly, and since it seems to be little used, I thought I’d post it here. Here is an example of the format you want to use in your launchd item:

 

Posted in macOS, macOS Server, Tech Trinkets | Leave a comment

Gatekeeper & App Translocation on macOS

This is a quick trinket to fix an issue with App Translocation and Gatekeeper.

Starting with 10.12 an App from outside the App Store when run from a disk image or the downloads folder, path translocation kicks in to protect the system and runs the app in a contained read-only environment.  At least from what I can understand from the documentation.

What is supposed to happen is when a user copies that app into the Applications folder (or really most anywhere else that is valid) and run again, Gatekeeper pops-up and asks if you’re really sure you want to run it because it’s from an unknown developer and that you need to visit System Preferences -> Security to Allow it.

Somewhere along the line, an attribute is set to turn off the quarantine for the read only mode and make the app behave normally.  For whatever reason, this sometimes fails causing the app to not be able to save files or even it’s own preferences.

To fix this, you can use the xattr command via the Terminal to manually remove the quarantine attribute like so:

Posted in macOS, Tech Trinkets | Leave a comment

YouTube – AvE

This guy is so much fun to listen to. While often speaking in the common man’s tongue with a Canadian flair, you quickly realize that he’s extremely smart and has a lot of real world experience.

From machining, to electronics, to engines, to taking apart brand new tools and gizmos to see how they work, this fellow is hours upon hours of entertainment.

He often says, “the world is so much easier when you realize it’s made of Legos.” That seems to be his approach for everything, just breaking it down into its Lego block and explaining how it works in a way you can understand.

You may even learn a thing or two, just don’t get the pixies angry and let out the smoke!

Find him on YouTube.

Posted in TV | 1 Comment

Synctunes – iTunes to Android Music Sync

Synctunes is an app for Android with a desktop counterpart (macOS or Windows) that will let you sync your iTunes library, or selected playlists from an iTunes library to your Android device.

I looked at quite a few of these and settled on this one as it met all my requirements:

  1. Sync over wireless.
  2. Sync selected playlists.
  3. Use “standard” or custom locations on my android phone so that the native apps could find my media in expected location(s).
  4. Not be a service that is constantly running on my phone and consuming battery life.
  5. Sync all meta data like artwork, tracks, album and so on.
  6. Sync only changed/new tracks on subsequent syncs.

Synctunes does the job perfectly. Below are a few screen shots to show you how simple it is to use. The screenshots of the desktop app are for the macOS version, but the Windows version is nearly identical.

You’ll also note that I have SynctunesPro. The free version can sync up to 100 songs, but that gives you a good idea for testing its capabilities. As soon as I realized that it did what I wanted, I spent the $2.99 for the Pro app with unlimited sync. Money well spent considering the app is also “family sharing” enabled so everyone in the household can sync their own iTunes libraries too!

First, download the app and open it up. You can choose a location and see how many items are already on your device from any previous sync. It also gives you your Wifi information.

Open up the desktop app and you’ll see that it auto detects your device(s) in the right box. Just click to select it and then click connect.Select the playlist(s) you want, click Sync and off you go!You can watch the progress on your phone, complete with album art, as it syncs too! (Excuse the art mismatch with the actual sync metadata below. That’s me unable to get a screenshot during the sync that matched. My library is up-to-date and as it is scanning it is so fast the album information is literally “blink of an eye” quick! When it actually has something to transfer it appears as it should.)

Posted in macOS, Tech Trinkets, Windows | Leave a comment

YouTube – ChuckE2009

One of the last things I thought I’d subscribe to on YouTube is a metalworking channel. I guess that’s a compliment to how entertaining ChuckE2009 is to watch. He seems to always have an interesting project or review going on and I just find people who can work with steel and weld really well fascinating.

I also like this guy in general because, if you go back in his channel, he started it a long while ago when he was still living with his folks. He went to school, got multiple trade certifications, did welding out of his garage, and now has his own successful shop and business.

Check out his channel!

Posted in TV | Leave a comment

Washing Machine Filter Upgrade

Something that always bugged me are the inset washing machine filters. You know, unhook the hoses in the back and you have archaeological dig in the machine with needle-nose pliers to unscrew them all the while contorting into various positions around or on top of the machine? This also assumes they don’t crumble and disintegrate due to cheap material in the process, thus starting a quest to find the correct one at an outrageous price.

That was me, but no longer. A little research showed that the pictured filters, often used with power washers, has the same screen micron size that the washing machine specification listed for OEM filters. Upgrade time!

A couple of hoses and fittings later, we now have an easily accessible filter with a simple screw off base, and should be easy to clean under a little hot water many times before it needs to be replaced. Plus, a lot more surface area means cleaning will be less often, on the order of a decade in our case.

Posted in Family, General Happenings | Leave a comment