Skip to content
Discussion options

You must be logged in to vote

经过进一步探索,目前我已经解决使用 macOS 原生 launchd.plist 实现登录启动的问题了。方法:

  1. 使用文本编辑器创建local.alist.launch.plist(以此名称为例),并拷贝至主文件夹/资源库/LaunchAgents下。文件内容如下:

    <?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>KeepAlive</key>
        <dict>
    	    <key>NetworkState</key>
    	    <true/>
        </dict>
        <key>Label</key>
        <string>local.alist.launch</string>
        <key>ProgramArguments</key>
        <array>
    	    <string>/path/to/alist</string>
    	    <string>server</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StandardErrorPath</key>
        <string>/path/to/alist.output.log</string>
    …

Replies: 5 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Gasiro
Comment options

@lyc59621
Comment options

@Gasiro
Comment options

Comment options

You must be logged in to vote
3 replies
@y2-Whyto
Comment options

@f63531119
Comment options

@f63531119
Comment options

Comment options

You must be logged in to vote
5 replies
@Mrered
Comment options

@y2-Whyto
Comment options

@shaopak
Comment options

@y2-Whyto
Comment options

@CrazyJasonwell
Comment options

Answer selected by y2-Whyto
Comment options

You must be logged in to vote
2 replies
@y2-Whyto
Comment options

@Gasiro
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants