From 5ff3862c73d27e8d4f3c965d2ee60990acbb8561 Mon Sep 17 00:00:00 2001 From: Sun Knudsen Date: Tue, 5 Jan 2021 06:22:25 -0500 Subject: [PATCH] Renamed launch agents guide --- .../README.md | 46 ------- .../README.md | 120 ++++++++++++++++++ .../core-sync.png | Bin 3 files changed, 120 insertions(+), 46 deletions(-) delete mode 100644 how-to-disable-app-launch-agents-daemons-and-extensions/README.md create mode 100644 how-to-make-sure-app-is-not-running-in-the-background/README.md rename {how-to-disable-app-launch-agents-daemons-and-extensions => how-to-make-sure-app-is-not-running-in-the-background}/core-sync.png (100%) diff --git a/how-to-disable-app-launch-agents-daemons-and-extensions/README.md b/how-to-disable-app-launch-agents-daemons-and-extensions/README.md deleted file mode 100644 index 502d78d..0000000 --- a/how-to-disable-app-launch-agents-daemons-and-extensions/README.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# How to disable app launch agents, daemons and extensions - -## Guide - -> Heads-up: following steps are used to “tame” Adobe Creative Suite, but same logic can apply to all apps. - -### Step 1: disable launch agents and daemons - -> Heads-up: don’t worry if you see “Could not find specified service” warnings. - -```shell -launchctl unload -w {,~}/Library/LaunchAgents/com.adobe.*.plist -sudo launchctl unload -w /Library/LaunchDaemons/com.adobe.*.plist -``` - -### Step 2: disable extensions - -Open “System Preferences”, then click “Extensions” and disable “Core Sync / Finder Extensions”. - -![core-sync](./core-sync.png?shadow=1) - -### Step 3: append kill function to `.zshrc` - -> Heads-up: following step assumes macOS is configured to use “Z shell” (running `echo $SHELL` should return `/bin/zsh`). - -```shell -cat << "EOF" >> ~/.zshrc - -# Kill Adobe -function kill-adobe() { - pgrep -afi adobe | xargs sudo kill 2>&1 -} -EOF -``` - -👍 diff --git a/how-to-make-sure-app-is-not-running-in-the-background/README.md b/how-to-make-sure-app-is-not-running-in-the-background/README.md new file mode 100644 index 0000000..af7ff23 --- /dev/null +++ b/how-to-make-sure-app-is-not-running-in-the-background/README.md @@ -0,0 +1,120 @@ + + +# How to make sure app is not running in the background + +## Caveats + +- When copy/pasting commands that start with `$`, strip out `$` as this character is not part of the command +- When copy/pasting commands that start with `cat << "EOF"`, select all lines at once (from `cat << "EOF"` to `EOF` inclusively) as they are part of the same (single) command + +## Setup guide + +> Heads-up: following steps illustrate how to make sure “Adobe Creative Suite” is not running in the background, but same logic should apply any app. + +### Step 1: find app launch agent and daemon bundle identifier prefix + +```console +$ ls -A1 {,~}/Library/LaunchAgents/ /Library/LaunchDaemons +/Library/LaunchAgents/: +at.obdev.LittleSnitchHelper.plist +at.obdev.LittleSnitchUIAgent.plist +com.adobe.ARMDCHelper.cc24aef4a1b90ed56a725c38014c95072f92651fb65e1bf9c8e43c37a23d420d.plist +com.adobe.AdobeCreativeCloud.plist +com.adobe.GC.AGM.plist +com.adobe.GC.Invoker-1.0.plist +com.adobe.ccxprocess.plist + +/Library/LaunchDaemons: +at.obdev.littlesnitchd.plist +com.adobe.ARMDC.Communicator.plist +com.adobe.ARMDC.SMJobBlessHelper.plist +com.adobe.acc.installer.v2.plist +com.adobe.agsservice.plist +com.apogee.DuetDetect.plist +com.apple.installer.osmessagetracing.plist +local.pf.plist +local.pmset.plist +local.spoof.plist +org.virtualbox.startup.plist +org.wireshark.ChmodBPF.plist + +/Users/sunknudsen/Library/LaunchAgents/: +com.adobe.GC.Invoker-1.0.plist +local.borg-wrapper.plist +org.virtualbox.vboxwebsrv.plist +``` + +com.adobe + +👍 + +### Step 2: disable app launch agents and daemons + +> Heads-up: don’t worry if you see “Could not find specified service” warnings. + +```shell +BUNDLE_IDENTIFIER_PREFIX="com.adobe" +launchctl unload -w {,~}/Library/LaunchAgents/$BUNDLE_IDENTIFIER_PREFIX*.plist +sudo launchctl unload -w /Library/LaunchDaemons/$BUNDLE_IDENTIFIER_PREFIX*.plist +``` + +### Step 3: disable app extensions + +Open “System Preferences”, then click “Extensions” and uncheck app extensions (if any). + +![core-sync](./core-sync.png?shadow=1) + +### Step 4: add `kill-apps` helper to `.zshrc` + +> Heads-up: following step assumes macOS is configured to use “Z shell” (running `echo $SHELL` should return `/bin/zsh`). + +```shell +cat << "EOF" >> ~/.zshrc + +# Kill apps that match string +function kill-apps() { + if [ -z "$1" ]; then + printf "%s\n" "Usage: kill-apps string" + return 1 + fi + printf "%s\n" "Finding apps that match \"$1\"..." + pgrep -afil "$1" + printf "%s" "Kill apps (y or n)? " + read -r answer + if [ "$answer" = "y" ]; then + pgrep -afi "$1" | xargs sudo kill 2>&1 && echo "Done" + fi +} +EOF +source ~/.zshrc +``` + +👍 + +## Usage guide + +### Make sure “Adobe Creative Suite” is not running in the background + +```console +$ kill-apps adobe +Finding apps that match "adobe"... +46639 /Library/Application Support/Adobe/Adobe Desktop Common/IPCBox/AdobeIPCBroker.app/Contents/MacOS/AdobeIPCBroker -launchedbyvulcan /Applications/Adobe Premiere Pro 2020/Adobe Premiere Pro 2020.app/Contents/MacOS/Adobe Premiere Pro 2020 +46645 /Library/Application Support/Adobe/Creative Cloud Libraries/CCLibrary.app/Contents/MacOS/../libs/node /Library/Application Support/Adobe/Creative Cloud Libraries/CCLibrary.app/Contents/MacOS/../js/server.js +46653 /Applications/Utilities/Adobe Creative Cloud Experience/CCXProcess/CCXProcess.app/Contents/MacOS/../libs/Adobe_CCXProcess.node /Applications/Utilities/Adobe Creative Cloud Experience/CCXProcess/CCXProcess.app/Contents/MacOS/../js/main.js +46655 /Applications/Adobe Premiere Pro 2020/Adobe Premiere Pro 2020.app/Contents/MacOS/LogTransport2.app/Contents/MacOS/LogTransport2 86E222CE52861AEA0A490D4D@AdobeID 1 0 NOVALUE NOVALUE +Kill apps (y or n)? y +Password: +Done +``` + +Done + +👍 diff --git a/how-to-disable-app-launch-agents-daemons-and-extensions/core-sync.png b/how-to-make-sure-app-is-not-running-in-the-background/core-sync.png similarity index 100% rename from how-to-disable-app-launch-agents-daemons-and-extensions/core-sync.png rename to how-to-make-sure-app-is-not-running-in-the-background/core-sync.png