Apple Messing You Up With MeshCentral

wiki.TerraBase.info
Revision as of 16:50, 28 August 2026 by Root (talk | contribs)
Jump to navigation Jump to search

...try the below to reset things, then set permissions as dialogues pop up, and remember, the thing that needs to be set is behind the window that pops up, and another permissions popup window will appear, hiding what you needed to click on. Good job moro..., err, Apple!

Rough Script Below

USER_NAME="$(stat -f '%Su' /dev/console)"
USER_UID="$(id -u "$USER_NAME")"
MESH="/usr/local/mesh_services/meshagent/meshagent/meshagent"

echo "Console user: $USER_NAME UID=$USER_UID"

pkill -u "$USER_UID" -f "$MESH -kvmagent" 2>/dev/null

launchctl asuser "$USER_UID" sudo -u "$USER_NAME" \
	/usr/bin/tccutil reset Accessibility

launchctl asuser "$USER_UID" sudo -u "$USER_NAME" \
	/bin/killall tccd 2>/dev/null

launchctl kickstart -k system/meshagent

sleep 2

launchctl asuser "$USER_UID" sudo -u "$USER_NAME" \
	open 'x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility'

echo
echo "ENABLE MeshAgent under ACCESSIBILITY."
echo "Then disconnect/reconnect the MeshCentral Desktop session."