Launchctl

Loaded Samsung Reis Software to move pictures to MacBook Pro OSX 10.6.8.  After install said to reboot.  Got blue screen. Booted in safe mode and removed the software but still the blue screen.  Crash report shows Exception Type:  EXC_BAD_ACCESS (SIGSEGV).
In Console errors show: fontd[107] failed to compile sql statement.  Noticed another error on failed to count number of files in /System/Library/StartupItems.  Directory not there.  Recreated it after found a hit on search.
Failed to compile hitting a number of tables:  select * from version_table;  select * from master_font;  select * from master_dir; 
select on different columns on font_table...
Need help on how to recover from blue screen.  Safe mode is OK getting on the MacBook Pro.
Mike

Do you mean Samsung Keis? Did you delete it using the install dmg? This is what is recommended. You may not have deleted all the files.In safe boot you can repair permissions and use safari. You can ,if you know what to look for check your library to se if you can delete any files left from the Samsung Keis install.https://support.apple.com/kb/PH14061?locale=en_US You could try a pram reset/Command/Option/P/R keys at startup for three chimes. If you have snow leopard and the install disk,you can use if to check and repair the boot volume also permissions.

Similar Messages

  • Launchctl processes legit?  Sign in bug on this board?

    1st question:
    Problem:  Numerous problems including Kernel Panics often, graphic and network issues, and ultimately inoperable os within 2 weeks to a month of every clean install on 2010 Macbook Pro.  Troubleshooting errors via google always brings up malware, hacked or bot claims, but they are usually
    Proven false, but I never find any actual answers to my errors.  Trouble shooting with ISP had many interesting moments. 
    Right now: I have, in an attempt to rule out hardware failure, despite passing hardware tests, taken out samsung ssd installed after these problems began, but only like a week after.  Popped original hard drive back in, original ram, booted to snow leopard disk
    That came with computer and formatted disk.  Nothing else is attached and no router or modem is connected (after new os trying a new modem and router to replace cisco Gateway to rule out hardware failure on the network side causing kernel panics and connectivity problems. )
    Question:  out of curiosity , I have entered a couple terminal commands before install.  Diskutil list brings up expected,
    Hard drive clean, guid parition, efi, on /dev/disk1 and install disk on 2 and then the various recovery mounts.  Launchctl though brings up some questions marks though and I need help with authenticity, for  paranoia sake.  
    (Installing now so writing on Iphone can't copy and paste. 
    Multiple anonymous items (excluded numbers prior)including:
    Anonymous.launchd
    Anonymous.Windowserver
    Anonymous.launchctl
    Anonymous.Mac OS X Install
    .com.apple.launchdperuser.212
    Anonymous.instlogd
    Anonymous.logger
    Edu.mit.kerebos.krb5kdc
    And then the usual apple.com. Etc
    Etc.  I assume anon is because the system has no idea who I am, and that the instlogd is the install log?  What is logger?  Kerebos is a mac authentication tool right, but is krb5kdc legit?  I often get errors including this. 
    Question 2:
    When signing into this forum on iPhone, I copied and pasted my password from 1 password app, and it failed and then immediately redirected me to iforgot.com.  I did not enter anything went back, did not change my email and simply repasted and it signed in.  Is this a bug?  And while typing this on iPhone the page keeps moving down making it almost impossible to type and the curser moves but words don't show up till like 10 seconds later, something I haven't seen before.  Battery had also been dying in half the time the 2 days. 

    If you have the mid-2010 15" MacBook Pro, note that there is a known issue with the graphics card on many of those machines. You should have it checked out by Apple. See:
    MacBook Pro (15-inch, Mid 2010): Intermittent black screen or loss of video
    If it is not that model, post one of your kernel panic logs here. See:
    http://support.apple.com/kb/HT2546
    As for the launchctl results, it is normal to see entries like that, depending on exactly what command you entered. When I run "launchctl list", I end up with many entries containing the word "anonymous". Here's an excerpt from the very beginning of the list on my machine:
    47723          -          0x7ff040c0f270.anonymous.launchctl
    47711          -          0x7ff040d01f70.anonymous.bash
    47708          -          0x7ff040c0efd0.anonymous.login
    47706          -          com.apple.Terminal.7776
    47705          -          0x7ff040c2a230.anonymous.com.apple.WebKi
    Regarding the iPhone issue (which really ought to be asked separately, in the iPhone forum), that sounds like it could be a hardware issue. But ask again over in the right forum to get iOS experts to give you some advice. Note that there is currently no known malware capable of infecting an iOS device, unless it has been jailbroken, so if you haven't jailbroken it, that problem is not going to be caused by malware.

  • Ulimit and launchctl both fail to restrict maximum file size

    I've submitted a bug report, but I figured I'd open this up to the community.  I can't seem to find any way to set restrictions on the maximum file size that can be created on OS X.   I've tested both Snow Leopard and Lion.
    *** Ulimit method:
    $ ulimit -f 100000
    $ ulimit -f
    100000
    $ dd if=/dev/zero of=/tmp/zero
    Filesize limit exceeded: 25
    $ ls -al /tmp/zero
    -rw-r--r--  1 admin  wheel  102400000 Jul  5 08:23 /tmp/zero
    $ ulimit -f
    unlimited
    *** launchctl method:
    $ launchctl limit filesize 100000
    $ launchctl limit filesize
    filesize    100000         100000        
    $ dd if=/dev/zero of=/tmp/zero
    dd: /tmp/zero: No space left on device
    54883985+0 records in
    54883984+0 records out
    28100599808 bytes transferred in 683.205935 secs (41130497 bytes/sec)
    $ ls -al /tmp/zero
    -rw-r--r--  1 admin  wheel  28100599808 Jul  5 08:36 /tmp/zero
    $ launchctl limit filesize
    filesize    unlimited      100000        
    In the first case, a limit does get set.  But when the first launched application returns control back to the terminal, the limit gets reset back to "unlimited".    In the second case, launchctl does appear to list a soft and hard limit for "filesize", however it does not stop dd from filling up the disk.  Running launchctl again shows an "unlimited" soft limit, but the hard limit remains.
    I've even tried setting a persistent, global limit via /etc/launchd.conf.   launchctl reports this limit, however there is nothing stopping huge files from being created.
    I do think that this is a bug on OS X, but perhaps there's something I'm overlooking?  If it is a bug, is there some workaround that I can use?
    Thanks
    -WD

    There are no file size limits to the software beyond what would be imposed by the operating system itself and the file format of the drive.
    So...assuming you have enough drive space, something else is going on.

  • Launchctl ignores parameters in given launchd.plist, doesn't pass arguments

    *Here's my plist:*
    <?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>Debug</key>
    <true/>
    <key>ExitTimeOut</key>
    <integer>0</integer>
    <key>GroupName</key>
    <string>wheel</string>
    <key>KeepAlive</key>
    <false/>
    <key>Label</key>
    <string>org.earlywine.backup.toDMG</string>
    <key>LowPriorityIO</key>
    <false/>
    <key>Program</key>
    <string>/usr/share/org.earlywine.backup/toDMG/Backup.bash</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Volumes/Home</string>
    <string>/Volums/Backup/Backups</string>
    </array>
    <key>RunAtLoad</key>
    <false/>
    <key>StandardErrorPath</key>
    <string>/Library/Logs/org.earlywine.backup.toDMG/stderr.txt</string>
    <key>StandardOutPath</key>
    <string>/Library/Logs/org.earlywine.backup.toDMG/stdout.txt</string>
    <key>TimeOut</key>
    <integer>0</integer>
    <key>UserName</key>
    <string>root</string>
    <key>WorkingDirectory</key>
    <string>/usr/share/org.earlywine.backup/toDMG</string>
    </dict>
    </plist>
    *Launchctl fails to honor parameters given to it in the plist.* Specifically, as an administrator, when running sudo launchctl, then giving it the load command and following it up with a list for the job label, here's what I'm shown:
    launchd% list org.earlywine.backup.toDMG
    "Label" = "org.earlywine.backup.toDMG";
    "LimitLoadToSessionType" = "System";
    "OnDemand" = true;
    "LastExitStatus" = 0;
    "TimeOut" = 0;
    "Program" = "/usr/share/org.earlywine.backup/toDMG/Backup.bash";
    "StandardOutPath" = "/Library/Logs/org.earlywine.backup.toDMG/stdout.txt";
    "StandardErrorPath" = "/Library/Logs/org.earlywine.backup.toDMG/stderr.txt";
    "ProgramArguments" = (
    "/Volumes/Home";
    "/Volums/Backup/Backups";
    It's not clear at all based upon the man pages why the following arguments in the plist are not shown: Debug, GroupName, UserName, ExitTimeOut, LowPriorityIO, and WorkingDirectory.
    I can confirm, that as a regular user, after loading and starting the jog, Console logs that the GroupName and UserName properties are ignored (documented in the man page). This is expected, and results in errors when the stdout and stderr files are attempted to be opened.
    *When started from any user's launchctl session, the script exits as though it wasn't given arguments.* This is evidenced by the usage() I have it print to stderr. The script checks to see if it was given 2 or more parameters, and if not, prints the usage and exits.
    I'm sure the script works properly - I've given myself sudoers rights to the Bash script, and can run it by hand without issue, as in:
    % sudo /usr/share/org.earlywine.backup/toDMG/Backup.bash /Volumes/Home /Volumes/Backup/Backups
    The plist is symlinked at /Library/LaunchDaemons/org.earlywine.backup.toDMG.plist and is in the launchctl list when an administrator sudo's into a launchctl session.
    *Behavior via the rc.shutdown.local script doesn't even equal that of a sudo'd launchctl session.*
    Here's my rc.shutdown.local script:
    #!/bin/bash
    launchctl start org.earlywine.backup.toDMG
    *Console logs the following as a result of the shutdown:*
    Nov 17 21:06:19 Tiznit com.apple.SystemStarter[39]: org.earlywine.backup.toDMG: Invalid argument
    Nov 17 21:06:19 Tiznit com.apple.SystemStarter[39]: launchctl start error: No such process
    Nov 17 21:06:19 Tiznit SystemStarter[39]: /bin/sh exit status: 1
    Based upon that message, I'd say that launchctl doesn't have the job loaded start. Despite that hunch, inserting into the shutdown script "launchctl load ..." in the line above the start makes no difference.
    The manual pages for SystemStarter and launchd do not discuss the operating environment of SystemStarter and the resulting bash script that it runs.
    It would be great if I could get some assistance with this, even though I'm running Leopard on an "unsupported" Mac.

    I suggest posting to the Unix forum under OS X Technologies.

  • Launchctl ignores parameters in given launchd.plist, doesn't pass argument

    *Here's my plist:*
    <?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>Debug</key>
    <true/>
    <key>ExitTimeOut</key>
    <integer>0</integer>
    <key>GroupName</key>
    <string>wheel</string>
    <key>KeepAlive</key>
    <false/>
    <key>Label</key>
    <string>org.earlywine.backup.toDMG</string>
    <key>LowPriorityIO</key>
    <false/>
    <key>Program</key>
    <string>/usr/share/org.earlywine.backup/toDMG/Backup.bash</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Volumes/Home</string>
    <string>/Volums/Backup/Backups</string>
    </array>
    <key>RunAtLoad</key>
    <false/>
    <key>StandardErrorPath</key>
    <string>/Library/Logs/org.earlywine.backup.toDMG/stderr.txt</string>
    <key>StandardOutPath</key>
    <string>/Library/Logs/org.earlywine.backup.toDMG/stdout.txt</string>
    <key>TimeOut</key>
    <integer>0</integer>
    <key>UserName</key>
    <string>root</string>
    <key>WorkingDirectory</key>
    <string>/usr/share/org.earlywine.backup/toDMG</string>
    </dict>
    </plist>
    *Launchctl fails to honor parameters given to it in the plist.* Specifically, as an administrator, when running sudo launchctl, then giving it the load command and following it up with a list for the job label, here's what I'm shown:
    launchd% list org.earlywine.backup.toDMG
    "Label" = "org.earlywine.backup.toDMG";
    "LimitLoadToSessionType" = "System";
    "OnDemand" = true;
    "LastExitStatus" = 0;
    "TimeOut" = 0;
    "Program" = "/usr/share/org.earlywine.backup/toDMG/Backup.bash";
    "StandardOutPath" = "/Library/Logs/org.earlywine.backup.toDMG/stdout.txt";
    "StandardErrorPath" = "/Library/Logs/org.earlywine.backup.toDMG/stderr.txt";
    "ProgramArguments" = (
    "/Volumes/Home";
    "/Volums/Backup/Backups";
    *It's not clear at all based upon the man pages why the following arguments in the plist are not shown*: Debug, GroupName, UserName, ExitTimeOut, LowPriorityIO, and WorkingDirectory.
    I can confirm, that as a regular user, after loading and starting the jog, Console logs that the GroupName and UserName properties are ignored (documented in the man page). This is expected, and results in errors when the stdout and stderr files are attempted to be opened.
    *When started from any user's launchctl session, the script exits as though it wasn't given arguments.* This is evidenced by the usage() I have it print to stderr. The script checks to see if it was given 2 or more parameters, and if not, prints the usage and exits.
    I'm sure the script works properly - I've given myself sudoers rights to the Bash script, and can run it by hand without issue, as in:
    % sudo /usr/share/org.earlywine.backup/toDMG/Backup.bash /Volumes/Home /Volumes/Backup/Backups
    The plist is symlinked at /Library/LaunchDaemons/org.earlywine.backup.toDMG.plist and is in the launchctl list when an administrator sudo's into a launchctl session.
    *Behavior via the rc.shutdown.local script doesn't even equal that of a sudo'd launchctl session.*
    Here's my rc.shutdown.local script:
    #!/bin/bash
    launchctl start org.earlywine.backup.toDMG
    Console logs the following as a result of the shutdown:
    Nov 17 21:06:19 Tiznit com.apple.SystemStarter39: org.earlywine.backup.toDMG: Invalid argument
    Nov 17 21:06:19 Tiznit com.apple.SystemStarter39: launchctl start error: No such process
    Nov 17 21:06:19 Tiznit SystemStarter39: /bin/sh exit status: 1
    Based upon that message, I'd say that launchctl doesn't have the job loaded start. Despite that hunch, inserting into the shutdown script "launchctl load ..." in the line above the start makes no difference.
    The manual pages for SystemStarter and launchd do not discuss the operating environment of SystemStarter and the resulting bash script that it runs.
    It would be great if I could get some assistance with this, even though I'm running Leopard on an "unsupported" Mac.

    etresoft wrote:
    The manual pages for SystemStarter and launchd do not discuss the operating environment of SystemStarter and the resulting bash script that it runs.
    What do you mean "bash script?" Are you talking about your own bash script? It would run with the user's environment. You usually don't want to rely on environment settings in system scripts like this. If you need something, you specify it on the command line. If you run another program, you provide the full path to it.
    By "the resulting bash script that it runs", I mean the fact that SystemStarter looks for the file /etc/rc.shutdown.local and executes it during shutdown (see SystemStarter's Plist and this source lines 166-170).
    The rc.shutdown.local file, as I created it, is a bash script.
    A regular user can't make launchd run as root. If you want to run as root, remove the GroupName and UserName and run launchd as root.
    My initial reason for having UserName and GroupName in the plist was so that I could ensure the job ran as root. I know now that in order to do this the job must be started by a root-owned launchd.
    My own user is not an administrator, and the script needs root privileges in order to do its job properly. I may be able to start the job as such from my own launchd via launchctl if I prefixed the script name with "sudo" in the plist.
    I now know the UserName and GroupName plist options are not necessary to run the job as root during shutdown.
    I'm sure the script works properly - I've given myself sudoers rights to the Bash script, and can run it by hand without issue, as in:
    What does that mean? When you run a program with sudo, it just runs the program as root. There are lots more way to configure sudo in sudo's config file, but I don't think you are talking about that.
    I mean that the Bash script runs properly if run it by hand in the terminal, feeding it the arguments in bash. I was trying to imply that if it's given the arguments it will do its job.
    I was also trying to point out that the plist I gave launchctl didn't effect the same as running the script via Terminal. This even when running "sudo launchctl" and loading and starting the job, which would've been done as root.
    Given Jun T.'s response to ProgramArguments (thanks), the script will probably run on shutdown if I remove Program from the plist and move it to ProgramArguments as the first entry in the String array.

  • Why Won't Launchctl Load Script After Reboot?

    Hello,
    iMac with OS X 10.7.3
    root# ls -lah /Library/LaunchAgents/dbase_backup.plist
    -rw-r--r--  1 root  wheel   479B Feb 24 10:24 /Library/LaunchAgents/dbase_backup.plist
    I load it with:  root# launchctl load /Library/LaunchAgents/dbase_backup.plist
    Runs fine until reboot.
    Any idea how to make this to load automatically after a reboot?
    NOTE:  I originally posted at https://discussions.apple.com/thread/3820415?start=0&tstart=0.  But, we couldn't resolve the issue.  Any new ideas here?
    Thanks!

    Hi,
    i was on same trouble.
    i has found this in console:
    16.09.13 17:31:38,960 com.apple.launchd.peruser.501[183]: (com.myscript.track[39511]) Exited with code: 1
    so i have added error logging to my plist and found the problem in /tmp/matrack.err:
      <key>RunAtLoad</key>
      <true/>
      <key>StandardErrorPath</key>
      <string>/tmp/matrack.err</string>
      <key>StandardOutPath</key>
      <string>/tmp/matrack.out</string>
    </dict>
    hope this helps.

  • Using launchctl command within a shell script

    I have successfully installed two daemons, and I would like to be able to disable and enable them via shell scripts, called by the daemons themselves. Here is my first shell script:
    #!/bin/sh
    # Testing for presence of a CODEBOY file
    if [ -e "/Volumes/CODEBOY/Change.txt" ]
    then
    osascript '/Users/praxisii/Library/Scripts/MacScript.scpt'
    launchctl unload -w '/Users/praxisii/Library/LaunchDaemons/WaitDaemon.plist'
    launchctl load -w '/Users/praxisii/Library/LaunchDaemons/RunDaemon.plist'
    fi
    The daemon works just fine, running the background, calling this script, which is waiting for me to plug in my flash drive (entitled CODEBOY). When the flash is plugged in, the applescript is called, and the first launchctl command is executed, which disables the WaitDaemon. As advertised, the .plist file is re-written with the Disabled key set to true. The next line (which is supposed to enable the RunDaemon) is never executed.
    Similarly, if the launchctl line is placed before the osascript line, the applescript is never called. It is as if the shell ignores everything after a single launchctl command, which it will execute.
    Any ideas or comments?

    Gary:
    Thank you for the link to the TN2083. Long, but very informative.
    I appreciate all the other comments on this thread. I am an amateur AppleScript/UNIX scripter, and any opportunity to learn more is much appreciated.
    I have completely re-worked my original launchd agent system for automatic processing of a file on a flash drive. Here is the .plist file that I now use:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>RunOSAscript</string>
    <key>LowPriorityIO</key>
    <true/>
    <key>Program</key>
    <string>/usr/bin/osascript</string>
    <key>ProgramArguments</key>
    <array>
    <string>osascript</string>
    <string>/Users/casdvm/Desktop/AutoFlash.scpt</string>
    </array>
    <key>RunAtLoad</key>
    <false/>
    <key>ServiceDescription</key>
    <string>Runs Applescript directly</string>
    <key>StandardOutPath</key>
    <string>/Users/casdvm/Desktop/AutoFlashLog.txt</string>
    <key>StartInterval</key>
    <integer>25</integer>
    </dict>
    </plist>
    The AutoFlash.scpt is an Applescript that simply uses the Finder to check for the presence of a specific file on the flash drive. If it is there, and a certain script property has a value of 2, then it runs the AppleScript that processes the desired file on the flash drive. Once that is done, the script property is set to 0 (to prevent the processing from happening over and over again.). Once the flash drive is removed, the script property is set back to 2 in anticipation of the next time the flash drive is plugged in.
    It is much simpler than the two agents I was messing with beforehand. I did indeed discover that this .plist needs to be saved in the LaunchAgents folder of my user Library (thanks again for pointing that out, Gary).
    The only problem that I have involves the continuous calling of the Applescript from the launchd agent. As you can see from my .plist file, that AppleScript is called every 25 seconds. I tried setting it up using the OnDemand key, but I kept receiving a re-spooling error of some sort (I don't recall exactly; my notes are sketchy on that phase of testing), so I just decided to have it go every 25 seconds. It really doesn't matter, since I can leave the flash drive plugged in all day anyway, and it only processes the desired file once.
    Thanks again for all the commentary and discussion; I am grateful for the assistance.
    Craig Smith

  • Sudo launchctl com.apple.autofsd stop not working

    If I issue the following command under Mac OS X 10.6:
    launchctl com.apple.autofsd stop
    The autofsd daemon remains running:
    bfb21@MacBook:~> sudo launchctl list|grep auto
    -          0          com.apple.preferences.timezone.auto
    -          0          com.apple.automountd
    865          -          com.apple.autofsd
    So how do I stop com.apple.autofsd?
    -Thanks

    I was actually using the correct syntax, but entered it wrong in my posting.  The daemon till does not stop using the correct syntax:
    bfb21@MacBook:~> sudo launchctl stop com.apple.autofsd
    bfb21@MacBook:~> sudo launchctl list|grep -i auto
    -          0          com.apple.preferences.timezone.auto
    -          0          com.apple.KerberosAutoConfig
    -          0          com.apple.automountd
    275          -          com.apple.autofsd
    I believe this excerpt from the launchctl man page may indicate why the command does not stop:
    "launchd may immediately restart the job if launchd finds any criteria that is satisfied."

  • While in the root directory trying to reset my admin user i tried the input of commands that included launchctl list and was informed it was invalid and could'nt be loaded

    my admin acct was changed to standard i tried the actions to update in root but rthe launchctl was unaccepted also the nicl - raw didnt work any ideas

    That situation went from inconvenient to complicated quickly.  Wait for any pending orders to drop off, wait for things to clear up, wait till your upgrade comes up and then upgrade when your contract is fulfilled.  I would have suggested a replacement phone, I know, with only a month left why couldn't you just upgrade early, but these situations where people try to upgrade early always end horribly and once a phone order starts, it almost cannot finish until something winds up shipped received and returned.  Sorry this happened the way it did.  Definitely not efficient.

  • Using launchctl with python script

    I have been trying to get launchctl to run a python script for me every 3 minutes. I have read many threads and such to no avail. Following describes files and such.
    PLIST file location = /Users/mike/Library/LaunchAgents
    File name = scraper.plist
    File owner:group = mike:staff
    File contents =
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/Prope
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>scraper</string>
    <key>OnDemand</key>
    <true/>
    <key>Program</key>
    <string>/Users/mike/scripts/python/backgroundscript/runscraper.sh</string>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/Users/mike/scripts/python/backgroundscript</string>
    <key>StartInterval</key>
    <integer>3</integer>
    </dict>
    </plist>
    SCRIPT INFO:
    Location = /Users/mike/scripts/python/backgroundscript/
    File name = runscraper.sh
    File Contents =
    #!/bin/sh
    say "hey mike"
    /usr/bin/python /Users/micahrye/scripts/python/backgroundscript/scraper.py
    File owner:group = mike:staff (fro scraper.py and runscraper.sh)
    File permissions = 755 (fro scraper.py and runscraper.sh)
    NOW about the script, I have the shell script runscraper.sh call the python script. All works from the cmd line, but does not work when launchctl calls it. I put the following in the runscraper script to make sure it was getting called:
    say "hey mike"
    So every time launchctl calls runscraper.sh I hear the "hey mike," so I know that launchctl is calling it, BUT it does not seem to call or launch the python!!!! AGAIN, if I run runscraper.sh from the cmd line I hear "hey mike" and the python script run with no problems.
    I have checked log files and found nothing.
    I have tried many things and nothing has worked, would enjoy someones wisdom
    thanks

    Post to the Unix forum under OS X Technologies.

  • I can't get launchctl to run a simple script

    I've written the following bash script (saved to /usr/local/bin/adwidget.fiveminutes.sh):
    #!/bin/sh
    /usr/bin/curl -o /tmp/fiveminutes.php http://adwidget.local/every/fiveminutes.php
    (adwidget.local is a vhost pointed to my local Apache/PHP server on Mac OS X 10.6.5) When I run it manually from terminal, I get /tmp/fiveminutes.php created with all the contents as expected. Here's what I have for /Library/LaunchAgents/com.adwidget.
    <?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>label</key>
    <string>com.adwidget.fiveminutes</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/local/bin/adwidget.fiveminutes.sh</string>
    </array>
    <key>OnDemand</key>
    <false/>
    <key>Nice</key>
    <integer>1</integer>
    <key>StartCalendarInterval</key>
    <dict>
    <key>Minute</key>
    <integer>5</integer>
    </dict>
    <key>StandardErrorPath</key>
    <string>/tmp/adwidget.fiveminutes.err</string>
    <key>StandardOutPath</key>
    <string>/tmp/adwidget.fiveminutes.out</string>
    </dict>
    </plist>
    When I do
    launchctl load /Library/LaunchAgents/com.adwidget.fiveminutes.plist
    no error is thrown. When I check
    ps aux | grep adwidget
    It appears to be installed...
    $ launchctl list | grep adwidget
    - 1 com.adwidget.fiveminutes
    ...The output file (/tmp/adwidget.fiveminutes.out) and error file (/tmp/adwidget.fiveminutes.err) get created but are 0 bytes.
    Yet, nothing seems to be happening. Can someone give me some tips? I've run out of ideas.

    The one outstanding element I see is:
    launchctl load /Library/LaunchAgents/com.adwidget.fiveminutes.plist
    You have this as a LaunchAgent? is that intentional?
    LaunchAgents only run when a user is logged in. So if no user is logged in the script won't fire. Additionally, the script will be launched under the current logged-in user's ID, so you should check that the user has permission to execute the script.
    Moving the .plist to /Library/LaunchDaemons will allow it to run continuously, without a user logged in.

  • Launchctl slow on ssh to server

    Hi,
    I'm running an OS X 10.5.8 server. When my users ssh into it, it can take up to about 10 seconds before they see a prompt.
    I've turned on debug for ssh and see it's pausing at the "Entering interactive session", looking at the server at this point, the "launchctl" process in running for the user that just logged in.
    So, can I track this down further as to why launchctl is taking about 10 seconds to start up before the ssh prompt comes back? I'm assuming it's trying to start up per-user launch daemons and agents?
    Is it a known problem that launchctl is so slow? (This is especially irritating because we use the "git" scm tool over ssh!)
    Thanks for any help or advice.
    Cheers,
    Steve

    Hi,
    I use ssh and git daily. I don't see a delay on ssh unless I have a DHCP connection and haven't reloaded the host key in the .ssh/known_hosts file on the client. Locating the receiver of the ssh connection can be delayed if there is a DNS issue to be resolved.
    You could try assigning a manual fixed IP address to the client, update the known_hosts file on the server and then perform an ssh login.
    HTH,
    Harry

  • Launchctl - have never got it to work

    I'm looking for some help in getting the lauchctl service to work. I have some python products that work fine when I run them from a command line, but never using the launchctl service. I can load then and I see they are loaded. I can unload them. But I can never get them to 'run'. PS simply shows a status of Ss for the launchctl, then it disappears. There is nothing in the system.log.
    Not sure where to start.

    I guess I was asking a 'general' question, like has anyone found the service frustrating to debug when it does not work. For example:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>org.jabber.pymsnt</string>
    <key>OnDemand</key>
    <false/>
    <key>Program</key>
    <string>/usr/bin/python</string>
    <key>ProgramArguments</key>
    <array>
    <string>/var/jabber/modules/pymsnt/PyMSNt.py</string>
    </array>
    <key>StandardErrorPath</key>
    <string>/var/jabber/modules/pyMSNt/error.log</string>
    <key>UserName</key>
    <string>root</string>
    </dict>
    </plist>
    The above fails, trying to find out why seems 'hit and miss'. I do know from experience that if I write it below this, it works. In many cases there is either no messages in the log file or you get the spawning error messages.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>org.jabber.pymsnt</string>
    <key>OnDemand</key>
    <false/>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/bin/python</string>
    <string>/var/jabber/modules/pymsnt/PyMSNt.py</string>
    </array>
    <key>StandardErrorPath</key>
    <string>/var/jabber/modules/pyMSNt/error.log</string>
    <key>UserName</key>
    <string>root</string>
    </dict>
    </plist>

  • Using launchctl with Authorization

    Hi there,
    I am trying to unload one of the preinstalled launchd configurations (/System/Library/LaunchDaemons/com.apple.portmap.plist) in order to load my own configuration from within an application. I use AuthorizationExecuteWithPrivileges() for this. For some reason, the unloading does not work - launchctl returns with "no such process", but if I copy the arguments to the Terminal and execute it, it works. Loading my own config works, too (though it fails because i couldn't unload the original one). Any ideas what might be the problem?
    Thanks
    Daniel

    Post to the Unix forum under OS X Technologies.

  • Launchctl: Please convert the following to launchd

    Hi,
    I'm running 10.5.1, and it's taking a long time for my Mac to start up. I looked in console and found
    11/28/07 10:18:32 AM com.apple.launchctl.Aqua[91] launchctl: Please convert the following to launchd: /etc/machinit_peruser.d/PCIESlotCheck.plist
    11/28/07 10:18:42 AM com.apple.launchctl.Aqua[91] launchctl: Please convert the following to launchd: /etc/machinit_peruser.d/RemoteUI.plist
    11/28/07 10:18:44 AM com.apple.launchd[88] (0x101060.PCIESlotCheck) Failed to check-in!
    I tried using PListEdit Pro to see what might be offending launchd, but I'm at a loss. Does anyone know how I can get those plists to stop choking launchd? Can I just delete them?
    Also, copying messages from Console is a pain now. Is there a way in Leopard to click and drag to select in Console like we used to?
    Thank you!
    Libby

    Sorry, I don't understand these things well enough to explain it, but the gist of it is that in the past, many mechanisms (including 'mach_init') were used to start processes for services, etc. during startup, but since Tiger, Apple has been working toward consolidating them so that eventually 'launchd' will presumably take over everything. If you are really interested, there is some documentation on the startup process here:
    http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/index .html
    Regarding the files though, if you did a clean install, it seems odd that they are there - I did an upgrade install, and the files you mentioned weren't present on my system (the "LaunchAgents" versions were). It seems odd to me that there would be that redundancy in a fresh install, especially if it is generating errors. As long as the launchd counterparts are present, it will probably be safe to remove the 'mach_init' ones, but as before, back them up just in case.
    Specifically, you can try to match a given file to service by searching the web to help you decide if it is something you want mess with it. For starters, I found this page by searching for the file names you mentioned in the earlier post:
    http://www.macgeekery.com/gspot/2006-12/turningoff_unneededservices

  • Clarifications about launchctl mistake

    Hi, I was messing around with launchctl and accidentally unloaded and disabled all system launch deamons (copy-paste mistake I definitely won't do again...). I did a lame attempt to start them up but as I suspected that didn't work too well as my comp started to act out pretty soon.
    Anyway this the "clever" thing I did:
       /bin/launchctl unload -w /System/Library/LaunchDaemons/
    But isn't the "w" flag is supposed to disable stuff permanently? I was afraid I'd have to go into single user mode to fix things, however all I did was restart my computer, in safe mode as I thought it wouldn't hurt, everything appeared to work so I restarted normally and all seemed well and working.
    So, what did I actually do and is there anything I should do/check to make sure everything is fine? Just got a a little worried for a while... "With great power there must also come, great responsibility!"
    And while I'm at it; what has "/var/db/launchd.db/com.apple.launchd/overrides.plist" got to do with this? Is this the file that the "elsewhere" meant in the man page for launchctl: "Now the state of the Disabled key is stored elsewhere on-disk." However inspecting this file doesn't really show any effect of what I did, or at least there is no obvious pattern between disabled/enabled daemons. What should be enabled/disabled anyway?
    Lots of little questions for this time and thanks in advance

    Yes I sudo:ed, just forgot to write it out. But I could've been using the root account and not having to sudo hehe.
    And by "act out" I mean things stopped working or behaved weird, which is not surprising when you think about it. Dock froze completely and instantly for example, I could switch application but keyboard input always stayed in Terminal app, computer froze for a couple of seconds every time I did something, disk access failed/timed out or something more than once etc. etc. etc.
    Oh ok thanks, but yes seems fine so far

Maybe you are looking for

  • 15 inch early 2011 Macbook Pro to Mid 2010 27 inch Imac Target Display Mode

    Hi Guys I have a early 2011 15" Macbook Pro with thunderpolt port aswell as a Mid 2010 27" iMac with MiniDisplay port. I am trying to use the iMac as a second screen for my Macbook. Both has Mountain Lion on them. I have both Thunderbolt to Thunderbo

  • How to programmatically close/minimize my app

    Hi, How to programmatically close/minimize my app. Regards Symadept

  • Is this a s:List bug?

    Flash Builder 4 If you have a <s:List layout as TileLayout, with a itemRenderer. click on a button it filters the AC. adds scroll bar because there are more objects then displayable. click on button it filters the AC. removes scroll bar because there

  • The Draft Word is behind the text in Purchase Order

    Hi All expert, Do you all have any idea about the watermark draft in SAP Business One 2007 Purchase Order. The Purchases Order with draft will display in the center of Purchases Order if the document is in draft. However, i found that the work 'draft

  • J2EE pattern for complex database searches

    I am havin trouble finding a method for doing complex searches that I am happy with. I have a table of "log entrys" - each "log entry" is composed of an "admin user", "action" and one or two "target" value objects, as well as a Timestamp. The problem