leaves615 / KeyboardHolder

https://keyboardholder.leavesc.com/
1.15k stars 33 forks source link

无法自动启动 #125

Closed ZiGmaX809 closed 1 year ago

ZiGmaX809 commented 1 year ago
  1. 问题描述: 无论从App还是系统设置登录项均不能开机自启。

  2. 系统版本 13.5 (22G74)

  3. 软件版本 1.12.1 (69)

  4. 错误日志

    2023-08-18 10:44:25.339  uiElementDestroyed on Optional("<UnknownUIElement \"<AXUIElement 0x600002ee4660> {pid=1453}\" (pid=1453)>"); pid:[1453] info: [:] at com.apple.systempreferences.GeneralSettings
    2023-08-18 10:44:25.339  未能完成操作。(ApplicationServices.AXError错误-25204。)
    2023-08-18 10:44:25.340  try get focusElement failed. AXError.CannotComplete
    2023-08-18 10:44:25.340  --- end for app[1453] switch flag[0x000060000201cbe0] is 100
    2023-08-18 10:44:25.340  flag string: focusedWindowDestoried 
    2023-08-18 10:44:25.345  runningApplications change: NSKeyValueObservedChange<Array<NSRunningApplication>>(kind: __C.NSKeyValueChange, newValue: nil, oldValue: Optional([<NSRunningApplication: 0x600000e0ff80 (com.apple.systempreferences.GeneralSettings - -1) LSASN:{hi=0x0;lo=0xa50a5}>]), indexes: Optional(1 indexes), isPrior: false)
    2023-08-18 10:44:25.345  app nil terminated.
    2023-08-18 10:44:25.360  uiElementDestroyed on Optional("<UnknownUIElement \"<AXUIElement 0x600002e1b240> {pid=1455}\" (pid=1455)>"); pid:[1455] info: [:] at com.apple.LoginItems-Settings.extension
    2023-08-18 10:44:25.360  未能完成操作。(ApplicationServices.AXError错误-25204。)
    2023-08-18 10:44:25.360  try get focusElement failed. AXError.CannotComplete
    2023-08-18 10:44:25.360  --- end for app[1455] switch flag[0x000060000200b320] is 100
    2023-08-18 10:44:25.360  flag string: focusedWindowDestoried 
    2023-08-18 10:44:25.369  runningApplications change: NSKeyValueObservedChange<Array<NSRunningApplication>>(kind: __C.NSKeyValueChange, newValue: nil, oldValue: Optional([<NSRunningApplication: 0x600000e0f780 (com.apple.systempreferences - -1) LSASN:{hi=0x0;lo=0x95095}>]), indexes: Optional(1 indexes), isPrior: false)
    2023-08-18 10:44:25.369  app nil terminated.
    2023-08-18 10:44:25.369  app terminate notifi. NSConcreteNotification 0x6000020ab260 {name = NSWorkspaceDidTerminateApplicationNotification; object = <NSWorkspace: 0x600002228220>; userInfo = {
    NSApplicationBundleIdentifier = "com.apple.systempreferences";
    NSApplicationName = "\U7cfb\U7edf\U8bbe\U7f6e";
    NSApplicationPath = "/System/Applications/System Settings.app";
    NSApplicationProcessIdentifier = 1429;
    NSApplicationProcessSerialNumberHigh = 0;
    NSApplicationProcessSerialNumberLow = 610453;
    NSWorkspaceApplicationKey = "<NSRunningApplication: 0x600000e6c980 (com.apple.systempreferences - 1429) LSASN:{hi=0x0;lo=0x95095}>";
    NSWorkspaceExitStatusKey = 0;
    }}
    2023-08-18 10:44:25.369  app Optional("系统设置") terminated.
    2023-08-18 10:44:25.369  runningApplications change: NSKeyValueObservedChange<Array<NSRunningApplication>>(kind: __C.NSKeyValueChange, newValue: nil, oldValue: Optional([<NSRunningApplication: 0x600000e1c180 (com.apple.LoginItems-Settings.extension - -1) LSASN:{hi=0x0;lo=0xa60a6}>]), indexes: Optional(1 indexes), isPrior: false)
    2023-08-18 10:44:25.369  app nil terminated.
    2023-08-18 10:44:25.382  runningApplications change: NSKeyValueObservedChange<Array<NSRunningApplication>>(kind: __C.NSKeyValueChange, newValue: nil, oldValue: Optional([<NSRunningApplication: 0x600000e1de00 (com.apple.appkit.xpc.openAndSavePanelService - 1456) LSASN:{hi=0x0;lo=0xa70a7}>]), indexes: Optional(1 indexes), isPrior: false)
    2023-08-18 10:44:25.382  app Optional("Open and Save Panel Service (登录项 (通用 (系统设置)))") terminated.
  5. 已启用辅助控制,除了无法自动启动外,App主要功能——切换输入法正常。

leaves615 commented 1 year ago

程序应放在在/Applications 目录下,自动启动才会生效。如果在改目录下,请检查是否被其他清理类软件禁止了自启动。

ZiGmaX809 commented 1 year ago

程序应放在在/Applications 目录下,自动启动才会生效。如果在改目录下,请检查是否被其他清理类软件禁止了自启动。

程序已经放在/Applications目录,而且从其他清理软件中开启自动启动,提示该软件正在运行,但是不会再系统启动时自动启动。此外,在设置-登录项中直接添加app也失败。


pic1

pic2

pic3

leaves615 commented 1 year ago

执行命令:launchctl list cn.leaves.KeyboardHolderLaunchHelper

以下是正常的

{ "EnableTransactions" = true; "LimitLoadToSessionType" = "Aqua"; "MachServices" = { "cn.leaves.KeyboardHolderLaunchHelper" = mach-port-object; }; "Label" = "cn.leaves.KeyboardHolderLaunchHelper"; "OnDemand" = true; "LastExitStatus" = 0; "Program" = "cn.leaves.KeyboardHolderLaunchHelper"; };

zengtianli commented 1 year ago

一样的情况,无法自动启动。以下是结果 launchctl list cn.leaves.KeyboardHolderLaunchHelper { "EnableTransactions" = true; "LimitLoadToSessionType" = "Aqua"; "MachServices" = { "cn.leaves.KeyboardHolderLaunchHelper" = mach-port-object; }; "Label" = "cn.leaves.KeyboardHolderLaunchHelper"; "OnDemand" = true; "LastExitStatus" = 19968; "Program" = "cn.leaves.KeyboardHolderLaunchHelper"; };

leaves615 commented 1 year ago

请更新到新版本