Tag Archives: Startup

Mac – Startup – GUI to create and edit plist startup files for launchdeamons

Using Lingo version 2.1.1 I am able to use a GUI to create a plist file to allow something to run at a specified time on a Mac.  I tested this on Mac OS 10.8.4 to great a plist file to run at startup to set the screen resolution with cscreen.  It worked great.  You do have to lower the security preferences to allow applications from anywhere to allow Lingo to run.  There is a newer version of this available from the app store which my be worth the money …

With FileEventer I can watch where the plist file gets saved.  In my case test, setting screen resolution with the application cscreen at boot time, the plist file was saved to:

/Library/LaunchDeamons

I was then able to copy the saved plist file to other macs.

See the longish blog posting on this at:

http://blog.aitrus.com/2012/12/20/a-gui-utility-to-view-edit-agents-daemons-for-os-x-peter-borgs-lingon/

Mac – Add Login items – Startup programs for all user

On the mac to have an application start automatically for all users add the application to the file “loginwindow.plist” in /Library/Preferences.

An example:

<?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>AutoLaunchedApplicationDictionary</key>
<array>
<dict>
<key>Hide</key>
<false/>
<key>Path</key>
<string>/Applications/PCClient.app</string>
</dict>
</array>
</dict>
</plist>

For details see:

https://sites.google.com/site/selkirkitknowledgebase/home/mac-os-x/startup-item-for-all-users

Mac – Unmounting Windows (or any other) volume at startup

To umount a Macintosh volume at start-up (for example the windows bootcamp volume) you can create a startup item …

In:

/Library/StartupItems

Create a directory “Unmount”  in that directory you want to put 2 files:

Unmount

and

StartupParameters.plist

 

Unmount file is a shell script with the following contents:

#!/bin/sh
. /etc/rc.common
if [ “$1” == “start” ]
then
/usr/sbin/diskutil unmount /dev/diskXXX
fi

The /dev/diskXXX in this file you need to change.  My unmount command is actually …

/usr/sbin/diskutil unmount /dev/disk0s3

To find the correct information for your system run the command:

“diskutil  info /Volumes/Windows/”     —- or whatever the volume name is …

in the output you need to look for the “Device Node” .  Whatever it says for that Device Node is what you should put in the Unmount command in the shell script above.

 

StartupParameters.plist is a plist file that contains:

<?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>Description</key>
<string>Try to unmount the old disk</string>
<key>Provides</key>
<array>
<string>Unmount</string>
</array>
</dict>
</plist>

 

 

After creating the files, chmod them so that they are:

-rw-r–r–     StartupParameters.plist
-rwxr-xr-x   Unmount

Also, I set the owner and group to “root” and “wheel” respectively to match the other items in the /Library/StartupItems directory … (“chown -R root /Library/StartupItems/Unmount/” and “chgrp -R wheel /Library/StartupItems/Unmount/”)

 

For additional details see:

http://hints.macworld.com/article.php?story=2005052804075538

 

Windows – Launch program each time you login

To start a program each time you log into a windows computer …

  1. Create a shortcut to the program on the desktop (find the program in the program files folders and “right-click” on it …)
  2. Click on the Windows Start icon then “right-click ” on Programs and select Open
  3. Double click on the “Programs” folder and then on the “Startup” folder
  4. Copy or move the shortcut you created in the first step to this “Startup” folder