Post

Replies

Boosts

Views

Activity

Reply to Make a Finder window open when a disk image mounts
I think I've got it. The Finder info of an old disk image that auto-opens its root directory: 00000000 00000000 00000002 00000000 00000000 00000000 5A156DD7 DA8B129A The Finder info of a newly created read-write disk image: 00000000 00000000 00000000 00000000 00000000 00000000 28F57114 97D99395 In both cases, the frOpenChain field (the 4 bytes starting at offset 20) is zero, so that doesn't seem to be what's used for this purpose. One clear difference between the two is the frLocation.v field, the 2 bytes at offset 10. That appears to be the iNode number of the folder you want to open as a Finder window, represented as a bigendian 16-bit number. Setting that does seem to do what I want!
Jun ’24
Reply to Make a Finder window open when a disk image mounts
@DTS Engineer Can you give me a clue on how to access Finder info for a volume? I know that there's an extended attribute for Finder info, but getxattr takes a path, and I don't know how to make a path that refers to a volume rather than its root directory. I tried the deprecated function FSGetVolumeInfo, but it returned paramErr when I passed kFSVolInfoFinderInfo.
Jun ’24
Reply to Network framework on macOS
I did the test again on a different Mac on the same local network, this time running macOS 14.5. And then I saw the flowsw thing instead of 10 TCP sockets. Another difference between the machines is that the one running Ventura has an Intel CPU, while the one with Sonoma is M1.
May ’24
Reply to Network framework on macOS
By the way, since the skywalkctl command was recommended here, I want to make a couple of comments about it. First, it can only be run using sudo. Second, the man page says you can get help on a command using skywalkctl COMMAND help, but that doesn't work.
May ’24
Reply to Shutdown event in macOS
The documentation of NSWorkspaceWillPowerOffNotification says To receive this notification, use notificationCenter to register for it. If you use a different notification center to register, you won’t receive the notification. That is, when you add the observer, you need to use NSWorkspace.notificationCenter instead of NotificationCenter.default.
Topic: UI Frameworks SubTopic: AppKit Tags:
May ’24
Reply to Make a Finder window open when a disk image mounts
I think I've got it. The Finder info of an old disk image that auto-opens its root directory: 00000000 00000000 00000002 00000000 00000000 00000000 5A156DD7 DA8B129A The Finder info of a newly created read-write disk image: 00000000 00000000 00000000 00000000 00000000 00000000 28F57114 97D99395 In both cases, the frOpenChain field (the 4 bytes starting at offset 20) is zero, so that doesn't seem to be what's used for this purpose. One clear difference between the two is the frLocation.v field, the 2 bytes at offset 10. That appears to be the iNode number of the folder you want to open as a Finder window, represented as a bigendian 16-bit number. Setting that does seem to do what I want!
Replies
Boosts
Views
Activity
Jun ’24
Reply to Make a Finder window open when a disk image mounts
@DTS Engineer Can you give me a clue on how to access Finder info for a volume? I know that there's an extended attribute for Finder info, but getxattr takes a path, and I don't know how to make a path that refers to a volume rather than its root directory. I tried the deprecated function FSGetVolumeInfo, but it returned paramErr when I passed kFSVolInfoFinderInfo.
Replies
Boosts
Views
Activity
Jun ’24
Reply to Network framework on macOS
I did the test again on a different Mac on the same local network, this time running macOS 14.5. And then I saw the flowsw thing instead of 10 TCP sockets. Another difference between the machines is that the one running Ventura has an Intel CPU, while the one with Sonoma is M1.
Replies
Boosts
Views
Activity
May ’24
Reply to Network framework on macOS
By the way, since the skywalkctl command was recommended here, I want to make a couple of comments about it. First, it can only be run using sudo. Second, the man page says you can get help on a command using skywalkctl COMMAND help, but that doesn't work.
Replies
Boosts
Views
Activity
May ’24
Reply to Shutdown event in macOS
The documentation of NSWorkspaceWillPowerOffNotification says To receive this notification, use notificationCenter to register for it. If you use a different notification center to register, you won’t receive the notification. That is, when you add the observer, you need to use NSWorkspace.notificationCenter instead of NotificationCenter.default.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’24