I have a little program that I want to make open automatically when my mac is started up.
Because this program accepts command line arguments, its not as simple as just going to System Prefs/Accounts/Login items and adding it there...
From google, I read that I can create a .profile file in my user's home folder, and that will execute ...
I have the following shell script registered in my "Login Items" preferences but it does not seem to have any effect. It is meant to launch the moinmoin wiki but only works when it is run by hand from a terminal window, after which it runs until the machine is next shut down.
#!/bin/bash
cd /Users/stuartcw/Documents/Wiki/moin-1.7.2
/usr...
On OS X privileged operations are done through AuthorizationExecuteWithPrivileges() around which Apple published two recommendations:
The old MoreAuth using setuid helper tools.
The current BetterAuthorizationSample littering the system with launchd files.
I don't know any applications using the latter...
...
Hi Everyone:
I'm wondering if there is some way I can stop a launchd task when a application is open, and then start it again when the application is closed. My launchd task is set to be notified when a file is changed and then do some UNIX code with the file. However, my application makes a lot of changes to this file so I can't have...
Scenario:
I have a Distributed-objects-based IPC between a mac application and a launchd daemon (written with Foundation classes). Since I had issues before regarding asynchronous messaging (e.g. I have a registerClient: on the server's root object and whenever there's an event the server's root object notifies / calls a method in the c...
I've got an application (A daemon inside /Library/StartupItems to be precise) running as root that occasionally launches another process using system("open /Applications/MyAppName.app"). This works fine except that on certain computers MyAppName gets launched running as root, instead of under the current user.
I'm trying to figure out w...
I have a pair of launchd daemons, one of which is a true daemon (runs as root) and one of which is a GUI agent that runs as a per GUI session basis (session type Aqua).
I need to prevent non admin level users from disabling the user level agent using launchctl, or at the very least figure out how to reload the agent from the root level ...
I need to be able to start/stop a per-session GUI agent from a root level daemon.
Similar issues are discussed here, here and here.
What I want to be able to do is basically
for num in `ps ax | grep [s]bin/launchd | cut -c 1-5`;
do
if [ $num -ne 1 ];
then
sudo launchctl bsexec $num launchctl (un)load -S Aqua /Libra...
I have an application which needs to be able to write to Any User/Current host preference files (which requires admin privileges per Preferences Utilities Reference) and also to enable/disable a launchd agent via its plist (writable only by root).
I'm using SFAuthorizationView to require users to authenticate as an admin before alterin...
Hi Everyone:
I am wondering how to set Launchd to relaunch my app if the user has not chosen to choose "Quit" from the top bar. There are cases where something may happen to the app, and it may force quit, and if a preference is selected I want it to relaunch automatically. I have looked into it before posting here, and I have heard t...
Hi Everyone:
I am attempting to run an Applescript inside a launchd plist, but for some reason it just isn't working. It could be that it is my computer, but I am thinking that there may be something else wrong with it. If someone could take a look and comment on this post, I would really appreciate it!
<?xml version="1.0" encoding="...
Hello everyone, I'm trying to figure out why my launchd script is not working. It is extremely simple, but I am new to the mac environment and trying to get accustomed. Here's my plist. I know ProgramArguments is required, so I just put the script path in there...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//...
Hi,
I am looking for a way to execute my app (it's a background task) at times, where the machine is "idle". A good incident would be when the screensaver launches. I already read the manual auf launchd and already use a LaunchAgent to lauch my app at certain intervals, but I found nothing that might help me launching my app when the sc...
I am trying to write a small Cocoa application that helps me manage my time, I want it check on startup if already has a launchd entry and if not, add itself an entry.
What is the correct folder to write the launchd file, and/or is there a special cocoa method to retrieve what the correct folder is (ie in the same way you retrieve the u...
Hi,
I am running release version of the app on the iPhone, it works fine. There is no error messages in the XCode debugger:
Running…
Switching to thread 11779
Switching to thread 11779
sharedlibrary apply-load-rules all
(gdb) continue
Switching to thread 12291
Switching to thread 11779
Switching to thread 13059
Debugger stopped.
Progr...
I've got a simple app deployed to a Mac mini running 10.5.8
How would I go about restarting the Delayed Job worker anytime the computer is restarted?
...
I have a launchd job that I've configured to run my unit tests. Every now and then, the unit tests will hang (usually because of some bad code). I know that my test usually only take a couple minutes to run. When they do hang, I usually don't notice it for about an hour, at which point I have to pop open Activity Monitor and forcibly ...
Hello good people
This is my first real development with the mac os(OS X 10.5.8).I got a macbookpro from work and i'm still setting up the right development environment.I've opted for the creation of /etc/launchd.conf and it's working fine for most of my librairies (JAVA_HOME, JRE_HOME)
i now need to add CATALINA_OPTS=-Duser.timezone=Asi...
I am attempting to write a launchd script that runs once a day, on weekdays only. But once I load the script, it runs every minute instead of just on-schedule. This happens whether I load the script as myself or as superuser:
launchctl load ~/Library/LaunchAgents/org.myname.foojob
or
sudo launchctl load /Library/LaunchDaemons/org.myna...
I'm trying to load my daemon-app with this command launchctl load /Library/LaunchDaemons/myPlistFileName It works fine, but only while my user is logged in on system.
How can i load my deamon-app, which will stay loaded without any user logged into the system (like the windows-services)??
The command sudo launchctl load /Library/Launch...