一个名为 GitHub Conduit 的程序(GitHub 适用于 Mac) 在我的电脑后台运行。如果我将其关闭,则launchd
重新启动它。
手册页launchd
列出了启动时寻找作业的每个位置:
$ man launchd
[snip]
FILES
~/Library/LaunchAgents Per-user agents provided by the user.
/Library/LaunchAgents Per-user agents provided by the adminis-
trator.
/Library/LaunchDaemons System-wide daemons provided by the admin-
istrator.
/System/Library/LaunchAgents Per-user agents provided by Mac OS X.
/System/Library/LaunchDaemons System-wide daemons provided by Mac OS X.
我检查了每一个文件夹,GitHub 管道中没有任何文件。我还检查了“用户和群组”偏好设置,但它没有列在我的登录项中。
FWIW,launchctl list com.github.GitHub.Conduit
输出如下:
{
"Label" = "com.github.GitHub.Conduit";
"LimitLoadToSessionType" = "Aqua";
"OnDemand" = true;
"LastExitStatus" = 15;
"PID" = 596;
"TimeOut" = 30;
"ProgramArguments" = (
"/usr/libexec/launchproxyls";
"com.github.GitHub.Conduit";
);
"EnableTransactions" = true;
"MachServices" = {
"com.github.GitHub.Conduit" = mach-port-object;
};
"PerJobMachServices" = {
"com.apple.CFPasteboardClient" = mach-port-object;
"com.apple.tsm.portname" = mach-port-object;
"com.apple.axserver" = mach-port-object;
};
};
问题
是什么使得launchd
GitHub Conduit 在启动时启动,如果我想停止它,我该如何停止它?
答案1
答案2
破解了!在 OS X 10.11 中,首选项存储在此处:
/var/db/com.apple.xpc.launchd/loginitems.{uid}.plist
对我来说,该文件如下所示:
<?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">
<plist version="1.0">
<dict>
<key>com.github.GitHub.Conduit</key>
<string>com.github.GitHub</string>
<key>version.com.github.GitHub.Conduit</key>
<string>161</string>
</dict>
</plist>