#67170 closed defect (fixed)

yabai @5.0.3: uses startupitem.autostart yes

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports@…
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: yabai

Description

When the yabai port is installed, a dialog box is displayed that reads:

“daemondo” would like to control this computer using accessibility features.

Grant access to this application in Security & Privacy preferences, located in System Preferences.

[Open System Preferences] [Deny]

I encountered this dialog box when I logged into our buildbot workers today. yabai had been the last port that had been built on them but I didn't know that yet, and I was surprised to see such a dialog, and I didn't want anything to control those machines, so I clicked Deny, but the dialog box simply reappeared.

This is happening because the Portfile contains the line:

startupitem.autostart   yes

I questioned why this was being done when you originally added this port:

https://github.com/macports/macports-ports/pull/9006#discussion_r516368930

You said you would remove it, but evidently didn't.

So, again, shouldn't we remove that line, so that the user can choose when to load the software? I don't think users are expecting a dialog box from Accessibility Access to appear when installing a port.

I'm also not wild about the fact that it is apparently daemondo that is being granted access to control the system. It seems like that permission should be granted much more narrowly, to an executable related specifically to yabai, and not to daemondo which is called from the launchd plists installed by most ports.

Change History (4)

comment:1 Changed 20 months ago by TheKevJames (Kevin James)

My bad for dropping the ball on that PR. Somewhere in the three months it took to get reviews on it, I must have forgotten to remove that line.

I can indeed go back and remove it -- though I would be curious if macports has a policy on this sort of thing? Personally, I would assume most folks using yabai actually do want it to autostart by default, the use-cases for installing an alternate Window Manager and only enabling it manually after each restart seem less likely than having it enabled on each reboot. My guess would be more folks would want that on than off, thus why I picked it by default in the first case.

For daemondo, that could entirely be my inexperience with OSX showing! I was just following the macports guide (https://guide.macports.org/chunked/reference.startupitems.html) on how to set things up. If there's a better way to do things, I'd be all ears!

In case it's helpful to you, you can unload a startupitem roughly as follows:

sudo launchctl bootout gui/$(id -u $(whoami)) /Library/LaunchAgents/org.macports.yabai.plist

comment:2 in reply to:  1 Changed 20 months ago by danielluke (Daniel J. Luke)

Replying to TheKevJames:

I can indeed go back and remove it -- though I would be curious if macports has a policy on this sort of thing?

startupitem.autostart should be used very rarely (see also this thread https://lists.macports.org/pipermail/macports-dev/2013-August/023788.html).

Personally, I would assume most folks using yabai actually do want it to autostart by default, the use-cases for installing an alternate Window Manager and only enabling it manually after each restart seem less likely than having it enabled on each reboot. My guess would be more folks would want that on than off, thus why I picked it by default in the first case.

An end user would just need to run port load once if they wanted it to always run.

comment:3 in reply to:  1 Changed 19 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to TheKevJames:

[...] only enabling it manually after each restart [...]

Just to make sure it's understood: we're not talking about having to enable something manually after every restart. We're talking about having to enable something manually one single time after installing the port, using the instructions (running sudo port load) that the port will display to the user after installation. After running that one single command, the software will run immediately and will run after every subsequent restart, forever, until such time as the user unloads or uninstalls the port.

I was just following the macports guide (https://guide.macports.org/chunked/reference.startupitems.html) on how to set things up.

I see the guide doesn't provide any guidance on when and when not to use startupitem.autostart, so someone should add that.

comment:4 Changed 14 months ago by TheKevJames (Kevin James)

Resolution: fixed
Status: assignedclosed

In 039f8c865f7b9d50ca8745c1ef4afe2adc72c72f/macports-ports (master):

yabai: update to version 5.0.8

Closes #67170

Note: See TracTickets for help on using tickets.