Difference between revisions of "Macintosh Notes"

From Simson Garfinkel
Jump to navigationJump to search
m
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
Notes on the Macintosh
==Fixing a corrupt cache==
 
If your mac prints this:
I do most of my work on Macs because I like having a full Unix operating system, I like having well-integrated graphical tools, I like having hardware that's highly integrated with the software, and I like having other people worry about the system administration. The Mac is a great system, but I've also found that there are some programs that make it a lot easier to use:
<pre>
 
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache
* [http://www.macports.org/ MacPorts], a nice port management system for Open Source ports on the Mac.
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache
* EMACS on MacOS: [http://aquamacs.org/ Aquamacs] [http://members.shaw.ca/akochoi-emacs/ Emacs 21 for MacOS] [http://emacs-app.sf.net/ Emacs.app]
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache
* [http://iterm.sourceforge.net/ iterm] (better Terminal)
</pre>
* [http://www2.ing.unipi.it/~d9615/homepage/texniscope.html TeXniscope]
Try this:
* [http://www.inf.unibz.it/~franconi/mac-emacs/ Enhanced Carbon Emacs] (ECE) plugin
   sudo update_dyld_shared_cache -force
* [http://itexmac.sourceforge.net/pdfsync.html pdfsync]
* [http://www.linkbackproject.org/ LinkBack Framework]; you want the Keynote plug-in
* [http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html SuperDuper!], an easy-to-use backup system for the Mac which makes bootable drives.
 
Other places to look for cool Mac stuff:
* [http://www.hawkwings.net/plugins.htm Hawk Wings]' list of MacOS Plug-ins
* [http://php5.darwinports.com/ PHP5 for Mac]
 
Once I have MacPorts installed, I recommend:
   sudo port install teTeX


==Backing up a Mac==
==Backing up a Mac==
Line 25: Line 15:
   asr --source /dev/disk0s2 --target /dev/disk1s2 --erase --noprompt  
   asr --source /dev/disk0s2 --target /dev/disk1s2 --erase --noprompt  
   disktool -n disk1s2 backup
   disktool -n disk1s2 backup
==Changing the UID of a user==
  dscl . -change /Users/bob UniqueID 501 1000
  chown -R 1000 /Users/bob
==Create and mount an image on the mac==
  hdiutil create -size 1m foo.dmg -fs HFS+ -volname NIST1 -attach -plist
  hdiutil detach /Volumes/NIST1/
==Disable a MacOS Service==
Briefly, to turn a service off (in this case com.apple.wikid)
# sudo launchctl (you will get a prompt - launchd%)
# list (gets a list of all the services)
# stop com.apple.wikid (stops the wikid service)
# unload com.apple.wikid (removes the wikid service from launchd)
==Don't write that annoying .DS_Store file==
  defaults write com.apple.desktopservices DSDontWriteNetworkStores true
==Stop annoying restarting of windows==
  defaults write -g ApplePersistence -bool no
  defaults write com.apple.Safari ApplePersistenceIgnoreState YES
  defaults write com.apple.Preview ApplePersistenceIgnoreState YES
==Make Chrome use standard OSX Print Window==
  defaults write com.google.Chrome DisablePrintPreview -bool true
==Fix mailman SSL URL problem==
See http://support.apple.com/kb/HT4660
===See Also===
* [[Notes on Setting up a Macintosh]]
* http://www.macgeekery.com/tips/all_about_launchd_items_and_how_to_make_one_yourself
* http://www.hawkwings.net/plugins.htm - Mac mail plugins list.
* [http://www.hawkwings.net/plugins.htm Hawk Wings]' list of MacOS Plug-ins
* [http://php5.darwinports.com/ PHP5 for Mac]
[[Category:Notes]]

Latest revision as of 18:26, 16 October 2016

Fixing a corrupt cache

If your mac prints this:

dyld: shared cached file was build against a different libSystem.dylib, ignoring cache
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache

Try this:

 sudo update_dyld_shared_cache -force

Backing up a Mac

Although there are some nice programs like Carbon Copy Cloner and SuperDuper! for backing up Macs, here is an easy way to clone /dev/disk0s2 to /dev/disk1s2:

 #!/bin/sh
 asr --source /dev/disk0s2 --target /dev/disk1s2 --erase --noprompt 
 disktool -n disk1s2 backup

Changing the UID of a user

 dscl . -change /Users/bob UniqueID 501 1000
 chown -R 1000 /Users/bob

Create and mount an image on the mac

 hdiutil create -size 1m foo.dmg -fs HFS+ -volname NIST1 -attach -plist
 hdiutil detach /Volumes/NIST1/

Disable a MacOS Service

Briefly, to turn a service off (in this case com.apple.wikid)

  1. sudo launchctl (you will get a prompt - launchd%)
  2. list (gets a list of all the services)
  3. stop com.apple.wikid (stops the wikid service)
  4. unload com.apple.wikid (removes the wikid service from launchd)

Don't write that annoying .DS_Store file

 defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Stop annoying restarting of windows

 defaults write -g ApplePersistence -bool no
 defaults write com.apple.Safari ApplePersistenceIgnoreState YES
 defaults write com.apple.Preview ApplePersistenceIgnoreState YES

Make Chrome use standard OSX Print Window

 defaults write com.google.Chrome DisablePrintPreview -bool true


Fix mailman SSL URL problem

See http://support.apple.com/kb/HT4660


See Also