Questions tagged [launchctl]

91 questions
0
votes
1 answer

How to source a file from launchctl

I'm trying to source a file from a launch agent, but it's unclear how to accomplish that (or if it's even possible). I know it's easy to setenv for single variables, but I need to bring in a bunch of them, so source is what I need.
ctfd
  • 338
  • 3
  • 14
0
votes
1 answer

Getting a status 78 launchctl when trying to run a python script with launchd

I am trying to run a python script with launchd on MAC OS X; however, the script is not running. When I check the status code with launchctl, it is status code 78.
cmbramwell
  • 77
  • 1
  • 9
0
votes
0 answers

Pynput not working if I start the daemon by launchctl on macOS

I use launchctl to start a daemon of my py code: launchctl load -w com.bruce2.PicUploaderHelper.plist Then I ps aux | grep testpynput, the daemon was launched: root 65334 0.1 0.2 4350320 37596 ?? Ss 2:52 0:00.44…
Willis
  • 599
  • 3
  • 25
0
votes
1 answer

launchctl process showing non-zero exit code

I'm trying to run a launchctl process that runs a simple python script (that opens a browser window) on my mac but it's not running. Here's are the steps I'm taking: save plist file to ~/Library/LaunchAgents launchctl unload…
Johnny Metz
  • 5,977
  • 18
  • 82
  • 146
0
votes
0 answers

How to launch a daemon using launchtl?

I am trying to launch a daemon using below and running into Path had bad ownership/permissions,how to fix this and launch and make sure it is running? teambot47:wifi_bas_server username$ sudo launchctl load -w…
Jeremyapple
  • 253
  • 2
  • 6
  • 20
0
votes
0 answers

LaunchDemon is not loading from shell script

I have a small shell script which loads a launchctl com.skull.tst.plist. But when i run script its not loading launchctl. I am getting echo match and running script with sudo. When i copy sudo /bin/launchctl load -wF…
Skull
  • 157
  • 16
0
votes
2 answers

Is it possible to start a Jupyter notebook on a boot?

I would like to open a Jupyter notebook page on the boot of my Mac. Specifically, I use the launchctl to start the Jupyter notebook. However, after the reboot, the web page showed the password or token to verify: Here is the launchctl script I use…
Blaszard
  • 30,954
  • 51
  • 153
  • 233
0
votes
1 answer

Troubleshooting LaunchAgent (LaunchAgent not starting loading)

I had I had a problem in starting the LaunchAgent and googled a lot and found multiple methods to troubleshoot, Noting them all down here in one place for the benefits of others
Arif Ali Saiyed
  • 657
  • 7
  • 11
0
votes
0 answers

failed to import module in python script when run using launchagents

I wrote a python script which works if I run it normally (python path/to/file.py). I need it to run automatically every few hours. So I created a plist file in /Users/User/Library/LaunchAgents which triggers a .sh file which eventually triggers the…
Lassadar
  • 1
  • 1
0
votes
1 answer

Launch Mac app on OS load won't work

I am trying to create a plist file, to put within the LaunchAgents of the users Mac. This plist I will use to make sure it opens a specific application every time the Mac turns on or the user logs in. To my knowledge I am pretty sure the plist…
user7184133
0
votes
2 answers

Start Python scripts with launchctl (OSX)

I have a very simple test scrip that I want my computer to run every 60 seconds - time_test_script.py. The script simply saves a .txt file with current time as name and writes some text onto the file. The file is in /Users/me/Documents/Python…
Zlo
  • 1,150
  • 2
  • 18
  • 38
0
votes
1 answer

Keeping Program alive after manual close and start from /Applications

I have written a plist file. The intention is to keep the program alive which is working fine. The problem that I discover is the following. If I close the app and start it from the /Applications folder, the helper.plist which I created is not…
Silve2611
  • 2,198
  • 2
  • 34
  • 55
0
votes
1 answer

Using launched and plist starts late

I recently tried to switch to launched on my Mac Mini (10.7.5) from cron on a PC. I searched and think I have things set up right, but it seems that the scheduled script starts significantly after the requested time. Details below. Plist:
gkd720
  • 491
  • 1
  • 5
  • 13
0
votes
1 answer

Too many open files even after setting kern.maxfiles

I have set the kern.maxfiles=65536 kern.maxfilesperproc=65536 After this, I put the following command in my .zshrc file ulimit -n 30000 However, if I try to run a netty based application from eclipse, only 10k sockets open and then java IO…
Sachin Malhotra
  • 1,211
  • 2
  • 11
  • 24
0
votes
1 answer

How to ensure that my job is launched through launchd and not directly?

I have a program and I want to ensure that it has been launched only by launchd (as a daemon) & it should terminate if the user launches it directly (double-click on Finder, terminal). Is there a nifty way of accomplishing this?
Raunak
  • 3,314
  • 1
  • 22
  • 28