launchctl

launchctl 打印系统打印“外部激活计数 = 1”和“正在进行的引导 =1”
launchctl

launchctl 打印系统打印“外部激活计数 = 1”和“正在进行的引导 =1”

我一直在调查安装 Red Giant Software 后出现的一个有趣的用户帐户,名为 _redgiantservice。我使用以下命令来调查用户 ID: launchctl print user/1001 我收到了下面的输出。我在 man 或在线中找不到有关此输出所包含字段的任何信息。我​​最关心的是外部激活计数(假设它可能意味着什么)以及正在进行的引导程序……但我承认我对这个输出一无所知: com.apple.xpc.launchd.domain.user.1001 = { type = user handle = 1001 active coun...

Admin

如何增加 macOS Big Sur 中的最大打开文件数量?
launchctl

如何增加 macOS Big Sur 中的最大打开文件数量?

我听说 sudo launchctl limit maxfiles 64000 unlimited 和 conf=/etc/sysctl.conf if sudo cat $conf | command rg kern.maxfiles ; then ecerr "kern.maxfiles is already set in $conf" else sudo echo 'kern.maxfiles=40480 kern.maxfilesperproc=28000' >> "$conf" fi 适用于以前版本的 macOS,但这些都不...

Admin

如何查找并删除没有 .plist 的 LaunchAgent
launchctl

如何查找并删除没有 .plist 的 LaunchAgent

我的 macOS (v11.2.1) 有许多不需要的 LaunchAgent 随系统一起加载,导致系统臃肿。其中一些我能够成功删除(只需找到它们的 .plist)。但是,对于其他一些,我无法简单地识别它们在启动过程中的加载方式,因为它们没有可识别的 .plist。 这篇文章专门针对 VoxAgent(由 Vox 音乐播放器推出,www.vox.rocks),但这种烦恼也发生在其他应用程序中(CleanMyMac X,Hazel......) 我可以使用 终止该服务launchctl remove com.coppertino.VOXAgent,但每次系统启动...

Admin

如何在 macOS 上使用“at”在指定时间运行“say”?
launchctl

如何在 macOS 上使用“at”在指定时间运行“say”?

在 macOS 上运行echo "say hello" | at now+1应该会将一个任务排入队列,以便一分钟后执行:说你好。 发出say hello可以正常工作, 也可以echo "touch a-file" | at now+1,但组合则不行。 我认为launchd执行的运行时环境atrun(at守护进程)受到限制,无法完成指示的语音合成say。但是,我无法轻易确定是否是这种情况。 问题是什么? ...

Admin

OS X 在哪里保存 launchctl 更改
launchctl

OS X 在哪里保存 launchctl 更改

我在 OSX 中使用以下命令激活我的 AFP 服务器: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist 它现在正在运行,但我感到疑惑,因为文件没有任何变化!?系统将设置保存在哪里? ...

Admin

plist 和状态 - “127 指定的服务未随操作系统附带”
launchctl

plist 和状态 - “127 指定的服务未随操作系统附带”

我正在尝试通过 launchd 运行一个脚本,但加载后状态一直为 127。我检查了 plist 和脚本的所有权、权限和绝对路径等。我在装有 macos 10.13 的 Mac 上运行它。这是 plist: <dict> <key>Label</key> <string>com.parkridge.UrlHistory</string> <key>StartInterval</key> <integer>2160...

Admin

launchctl unload 说:找不到指定的服务
launchctl

launchctl unload 说:找不到指定的服务

我正在尝试制作一个 plist 文件以便在启动时启动 nginx。启动 nginx 时launchctl它会启动该服务。但它无法卸载它,并打印“找不到指定的服务”。 $ ps aux | grep nginx me (...) grep nginx $ sudo launchctl load /System/Library/LaunchDaemons/nginx.plist (no output) $ ps aux | grep nginx me (...) grep nginx nobody (...) nginx: worker process ...

Admin

如何使用 launchd 在 MacOS 上安排“docker-compose”的运行
launchctl

如何使用 launchd 在 MacOS 上安排“docker-compose”的运行

我正在用构建一些软件docker-compose,我想按计划运行它。 因此,我需要在 MacOS (High Sierra,10.13.3) 上安排运行docker-compose up,使用启动。这是我正在使用的 LaunchAgent 配置。 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> &l...

Admin

在 macOS(OSX)上删除 Apache httpd 中的构建
launchctl

在 macOS(OSX)上删除 Apache httpd 中的构建

我有一台 Mac Mini,在家里运行私人服务器。它运行的是 macos High Sierra (osx),之前使用过“Apple Server”来管理我的网站(使用内置的 apache httpd)。但由于 Apple 决定大幅削减 Apple Server 的功能,让它对我来说毫无用处,因此我不得不寻找其他解决方案。 我在网上搜索如何摆脱 httpd 中的构建。所有指南都只是说停止 apache 并为 launchd 卸载它。这很好用,直到重新启动,apache 中的构建又回来了。有些东西正在将其重新加载到 launchd 中。尽管我已禁用它,“co...

Admin

OS X:代理/守护进程出现在 launchctl 列表中,但找不到其 .plist
launchctl

OS X:代理/守护进程出现在 launchctl 列表中,但找不到其 .plist

我已经遇到这个问题有一段时间了。它并没有真正影响我的工作流程,但每次我想在控制台中查找某些内容时,它都会妨碍我,因为每 10 秒就会出现以下消息: (timestamp) xpcproxy[1247]: CFPreferences could not connect to its daemon. Preferences using the connection 0x0 will be volatile and will not be persisted to disk. (timestamp) com.apple.xpc.launchd...

Admin

增加 Mac High Sierra 中打开文件的数量
launchctl

增加 Mac High Sierra 中打开文件的数量

在 Mac High Sierra 10.13.3 上,我打开了 256 个文件。 我想提高它,因此我打开终端并输入 sudo launchctl limit maxfiles 1000000 1000000 当我输入时这不会改变任何东西 ulimit -a 我仍然得到 256 但它确实改变了一些东西,因为当我进入 sudo launchctl limit maxfiles 1000 1000 系统停止工作,直至重新启动。 增加 mac high sierra 中打开文件数量的正确方法是什么 顺便说一句: 以下命令仅更改特定终端...

Admin

launchctl 打印系统打印的“bootcache hack”和“exec hack”的结果
launchctl

launchctl 打印系统打印的“bootcache hack”和“exec hack”的结果

我使用以下命令列出 launchctl 设施,打印输出的最后出现了一些有趣的结果: 使用的命令: launchctl print system 结果结束: properties = { shutting down = 0 slain = 0 uncorked = 0 origin resolved = 0 deactivated = 0 inactive = 0 initial on-demand = 1 audi...

Admin

是否可以使用 com.apple.CalendarAgent.plist 打开第三方日历应用程序?
launchctl

是否可以使用 com.apple.CalendarAgent.plist 打开第三方日历应用程序?

据我所知,MacHD/System/Library/LaunchAgents/com.apple.CalendarAgent.plist 处理日历请求并在默认 MacOS 日历 (calendar.app) 中打开它们。我想知道是否可以编辑此文件以使其打开第三方日历,即 (Fantastical 2)。 背景:我正在使用 Things 3(待办事项列表应用),并将其与我的日历活动关联。但是,当我点击关联的活动时,它会在 calendar.app 中打开,而我希望在 Fantastical 2 中打开它。 感谢您的阅读! ...

Admin

我如何停止已启动的服务?
launchctl

我如何停止已启动的服务?

我有一个带有标签的启动服务homebrew.mxcl.postgresql: $ launchctl list homebrew.mxcl.postgresql { "LimitLoadToSessionType" = "Aqua"; "StandardErrorPath" = "/usr/local/var/log/postgres.log"; "Label" = "homebrew.mxcl.postgresql"; "TimeOut" = 30; "OnDemand" = false; "LastExi...

Admin

使用 Launchd 运行 Applescript 应用程序
launchctl

使用 Launchd 运行 Applescript 应用程序

我创建了一个 Applescript 应用程序(称为 Print Release),运行时没有问题(代码如下): do shell script "rm -R /Users/<account>/release.zip; rm -R /Users/<account>/release; curl -L https://URL/to/webserver/release.zip -o /Users/<account>/release.zip; unzip -o /Users/<account>/release.zip...

Admin