Tag Archives: Macintosh

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

Image Build – Mac – AFP location files for each graduating class

Students have network file space on our Achilles server based on their graduating year.  I presently provide links to these locations in a common area on the Mac image.

in /Library/Application Support/Williams/Network File Space/Achilles are a series of .afloc files based on student graduating year.  Each year when the image is created I have to add a file for the next class of students.

One way to do that is:

  • sudo -s
  • cd /Library/Application\ Support/Williams/Netowk\ File\ Space/Achilles
  • cp “2015 Students.afploc” “2016 Students.afploc”
  • vi  (or some other way edit) “2016 Students.afploc” to replace “15Students” with “16Students”

It is tempting to remove the older files but sometimes students start as in one class but then have to extend their stay so remove these with care.

Mac – What makes a volume bootable

 

To quote from the link below:

Bootability comes down to a few simple rules:

  1. The hard drive enclosure must support booting a Macintosh (applies to external hard drives only)
  2. The computer must support booting from the interface used to attach the hard drive (e.g. USB, Firewire, eSATA)
  3. The computer must support booting from the hard drive’s partition format (e.g. APM vs GPT vs MBR)
  4. The cloned filesystem must have all the required components of Mac OS X
  5. The cloned operating system must be properly “blessed”

 

See the complete info at:

http://www.bombich.com/software/docs/CCC/en.lproj/troubleshooting/what-makes-a-volume-bootable.html

Mac – Command to remove Users “Large” and “Old” files

This command finds all files larger than 10 MB AND which haven’t been accessed in over 4 weeks:
sudo find /Users -size +10M -atime +4w

This finds the same and removes them (there is no undo!):
sudo find /Users -size +10M -atime +4w -exec rm {} \;

There appear to be large cache files being created in the Fall of 2014 …. this command removes them:
sudo find /Users -size +100M -name lsm_map -atime +2w -exec rm {} \;

When booting to external drive, this finds files 100 MBs large and 4 weeks old and lists them with “ls -lah”:
sudo find "/Volumes/Macintosh HD/Users" -size +100M -atime +4w -exec ls -lah {} \;

Lists the total size of a directory structure:
sudo du -sh /Users/xxx