Important: Please read the Qt Code of Conduct -

QProcess doesn't start application when using LaunchDaemon on macOS

  • Hello, I'm have trouble understanding why a QProcess doesn't start an executable when the application in which the qprocess runs is a LaunchDaemon on macOS. So I have a LaunchDaemon process which launches at boot and in that daemon a QProcess is called to start an application executable at something like /Applications/application_name/Contents/MacOS/application_name using setProgram() and start(), but that doesn't work on boot. If I just manually stop the daemon it relaunches itself because of "<key>KeepAlive</key><true/>" in its .plist file and then all of a sudden the qprocess does launch the application correctly. Any ideas why that happens and how I can fix it?

  • Hi,

    are you sure that you or better the user that runs your application can at all start something at that specific point of time during boot? Did you e.g. check it with simple non-gui- or gui-system routines as replacement?


Log in to reply