Mac Terminal view is Screen Sharing is Enabled

print

You can do so by checking for the existence of the launchd files in /etc:

[[ -f /etc/RemoteManagement.launchd ]] && echo 'enabled' || echo 'disabled'

or for screen sharing:

[[ -f /etc/com.apple.screensharing.agent.launchd ]] && echo 'enabled' || echo 'disabled'

0


sudo launchctl list com.apple.screensharing which will succeed if it’s running, hence enabled.

sudo launchctl list com.apple.screensharing which will succeed if it’s running, hence enabled.

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -allowAccessFor -allUsers -privs -all -clientopts -setmenuextra -menuextra yes
Starting...
Warning: macos 10.14 and later only allows control if Screen Sharing is enabled through System Preferences.
Activated Remote Management.
Set the client options.
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.