2

Is there a way to use Terminal to check to see if Screen Sharing/Remote Desktop is enabled? Or is there a file which will have a YES/NO of it?

The one catch; it must work without sudo or admin privileges.

2 Answers 2

5

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'
2

You can check if rfb port is opened (5900) with:

netstat -atp tcp | grep rfb
1
  • 1
    That will show if Screen Sharing is running, but not Remote Management.
    – da4
    Commented Oct 22, 2014 at 15:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .