Post

Replies

Boosts

Views

Activity

Comment on Accessing Window Server and other GUI services when running tests via SSH vs LaunchAgent
I've since learned about launchctl asuser, which allows me to launch a process over SSH with an Aqua session, and with stdin/out/err attached: torarne@macos-15-5-0 % ./foo Session ID: 100044 sessionIsRoot: false sessionHasGraphicAccess: false sessionHasTTY: true sessionIsRemote: true ^C torarne@macos-15-5-0 % sudo launchctl asuser 501 ./foo Session ID: 100003 sessionIsRoot: false sessionHasGraphicAccess: true sessionHasTTY: true sessionIsRemote: false ^C
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’25
Comment on Local Network Access Permission requires binary to have LC_UUID load command
It's a reasonable bug, however, IMHO the "fix" here should be to reject the extension as invalid at load time. Executable need to include build UUIDs. Agreed. A clear indication up front (UI or warning/error in system logs or as detailed in the returned error in the network API layer) that the executable can't even ask for network permissions would have helped diagnose this.
Jul ’24
Comment on Key equivalent matching for non-US English keyboard layouts
The reason for the synthetic event not behaving the same as the real key event was that the synthetic event didn't have an eventRef, causing _matchesKeyEquivalent to bail out early. Calling syntheticEvent.eventRef (https://developer.apple.com/documentation/appkit/nsevent/1525143-eventref?language=objc) forces NSEvent to lazily create the eventRef.
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’23
Comment on Accessing Window Server and other GUI services when running tests via SSH vs LaunchAgent
I've since learned about launchctl asuser, which allows me to launch a process over SSH with an Aqua session, and with stdin/out/err attached: torarne@macos-15-5-0 % ./foo Session ID: 100044 sessionIsRoot: false sessionHasGraphicAccess: false sessionHasTTY: true sessionIsRemote: true ^C torarne@macos-15-5-0 % sudo launchctl asuser 501 ./foo Session ID: 100003 sessionIsRoot: false sessionHasGraphicAccess: true sessionHasTTY: true sessionIsRemote: false ^C
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’25
Comment on Local Network Access Permission requires binary to have LC_UUID load command
It's a reasonable bug, however, IMHO the "fix" here should be to reject the extension as invalid at load time. Executable need to include build UUIDs. Agreed. A clear indication up front (UI or warning/error in system logs or as detailed in the returned error in the network API layer) that the executable can't even ask for network permissions would have helped diagnose this.
Replies
Boosts
Views
Activity
Jul ’24
Comment on Key equivalent matching for non-US English keyboard layouts
The reason for the synthetic event not behaving the same as the real key event was that the synthetic event didn't have an eventRef, causing _matchesKeyEquivalent to bail out early. Calling syntheticEvent.eventRef (https://developer.apple.com/documentation/appkit/nsevent/1525143-eventref?language=objc) forces NSEvent to lazily create the eventRef.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’23