0

[MacOS Monterey 12.7]

sharingd looks related with a weird window flash popup on desktop right after booting. As I researched, this daemon has to do with services that I don't need (AirDrop, Handoff, Instant Hotspot, Shared Computers, and Remote Disc). At the same time when explored this daemon:
launchctl print gui/$(id -u)/com.apple.sharingd

...
    path = /System/Library/LaunchAgents/com.apple.sharingd.plist
    state = running

    program = /usr/libexec/sharingd
    inherited environment = {
        DISPLAY => /private/tmp/com.apple.launchd.NycH5eDM3b/org.xquartz:0
        SSH_AUTH_SOCK => /private/tmp/com.apple.launchd.9u8d0kZoxg/Listeners
    }
...
    properties = keepalive | runatload | supports transactions | system service | exponential throttling
...

Two weird sockets that at the same time I am not capable to explore/guess what are their functions.

Those are the reasons I wanted to unload this plist:

/System/Library/LaunchAgents/com.apple.sharingd.plist

I had no problem unloading other plists (i.e. an Epson printer daemon that surfaced with nmap listening in a port), but when I try with this one, this happens (tried with normal, sudo, root. Everything) [And this plist is not present in LaunchDaemons folder, just in LaunchAgents]:

Nor with unload

Library root# sudo launchctl unload /System/Library/LaunchAgents/com.apple.sharingd.plist
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
`launchctl bootout` is a recommended alternative.
Unload failed: 5: Input/output error
Try running `launchctl bootout` as root for richer errors. 

Nor with bootout

Library root# sudo launchctl bootout /System/Library/LaunchAgents/com.apple.sharingd.plist
Unrecognized target specifier.
Usage: launchctl bootout <domain-target> [service-path1, service-path2, ...] | <service-target>
<service-target> takes a form of <domain-target>/<service-id>.
Please refer to `man launchctl` for explanation of the <domain-target> specifiers.
Library root# 

This Listeners thing, happens to be a socket (I have no experience at all with sockets). So any attemp to explore it in a file fashion way, failed.

% cd /private/tmp/com.apple.launchd.9u8d0kZoxg/         
% ls
Listeners
% ls -lrt
total 0
srw-rw-rw-  1 myhost  wheel  0  2 abr 09:05 Listeners
% cat Listeners 
cat: ai_family not supported: Undefined error: 0
cat: Listeners: Invalid argument
% less Listeners 
Listeners is not a regular file (use -f to see it)
% less -f Listeners
Listeners: Operation not supported on socket

Poping window on startup
(snapshot is from Internet, but is same as mine. Other users experienced this):

15
  • Please edit your post with a clear description of the issue and why you think unloading a plist will solve it.
    – Allan
    Apr 2 at 21:46
  • sharingd does not create “weird window popups;”. You also didn’t show which sockets it was bound to…you provided environment variables. To be candid, the whole post is rife with syntactical errors (not grammar, but usage) that indicates you’re quite new at this. Before tinkering with daemons, boot into Safe Mode (diagnostics mode) and see if you still get the problem. Also create a temp user, login to that account and see if the popup remains. Let’s start there
    – Allan
    Apr 2 at 22:03
  • Mr. @Allan can you help me in some way? I think you are beyond capable of understanding what are my concerns about all this. From your words I infere that sharingd is a totally harmless process and does not need to be cancelled? Even if you are not using all those services? Even more, have dependencies that are not good to tweak with?
    – nostromo
    Apr 2 at 22:16
  • A huge and welcomed start, would be how to do this: "You also didn’t show which sockets it was bound to…". How can I do that?
    – nostromo
    Apr 2 at 22:17
  • "Also create a temp user, login to that account and see if the popup remains. Let’s start there". Ok, this will be another starting path. But I am very interested in this: >> "You also didn’t show which sockets it was bound to…". How can I do this?
    – nostromo
    Apr 2 at 22:21

0

You must log in to answer this question.

Browse other questions tagged .