Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

LaunchAgent issues with Monterey #136

Open
wreck-gar opened this issue Mar 10, 2022 · 3 comments
Open

LaunchAgent issues with Monterey #136

wreck-gar opened this issue Mar 10, 2022 · 3 comments

Comments

@wreck-gar
Copy link

Im not having any luck getting SplashBuddy to automatically launch after install as intended.

I've updated the postinstall and SplashBuddy.Launch.sh for python changes, but the bootstrap command in the postinstall script gives an input/out error. The SplashBuddy.Launch.sh script doesn't work either, I think it is related to the finderRunning function.

As a work around I have just made the postinstall script just open the app with -

/usr/bin/open -a "/Library/Application Support/SplashBuddy/SplashBuddy.app"

Not sure if this is a Monterey thing, or just a 'me' thing, anyone else having issues?

@dkw7703
Copy link

dkw7703 commented Mar 18, 2022

We are experiencing the same issue, along with an additional one. Thanks to your script tweak, @wreck-gar, Splashbuddy will now launch. However, none of the items are updated as they are completed, nor does the Restart button become useable.

@Bot-Igor
Copy link

Hey there,
For us it helped to remove the call of the finderRunning function and the function itself in the SplashBuddy.launch.sh file.

@macgod73
Copy link

macgod73 commented Apr 29, 2022

I noticed the issue with Monterey 12.3.1

I modified the postinstall script to

#!/bin/bash

loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
loggedInUID=`id -u ${loggedInUser}`

if [[ ${loggedInUID} -gt 500 ]]; then
	echo "Launching SplashBuddy for user ${loggedInUID}…"
	sudo -u \#${loggedInUID} launchctl enable gui/${loggedInUID}/io.fti.SplashBuddy.launch
	sudo -u \#${loggedInUID} launchctl bootstrap gui/${loggedInUID}/ /Library/LaunchAgents/io.fti.SplashBuddy.launch.plist
	sudo -u \#${loggedInUID} launchctl kickstart gui/${loggedInUID}/io.fti.SplashBuddy.launch
fi

Modified the SplashBuddy.launch.sh
I changed the python portion to
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

Commented out the finderRunning function

# function finderRunning {
#    /usr/bin/pgrep Finder && return 0 || return 1
#}

Removed the function from the following

if appNotRunning \
	&& appInstalled \
	&& [ "$loggedInUser" != "_mbsetupuser" ] \
	&& [ ! -f "${doneFile}" ]; then

    /usr/bin/open -a "$app"
	
fi

Removed the xattr attribute from the app (except I did this from composers build location).
sudo xattr -r -d com.apple.quarantine /Library/Application Support/SplashBuddy/SplashBuddy.app

Repackaged all components in Composer and rebuilt the package.

Everything is working as expected in Monterey. I haven't backwards tested with Big Sur yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants