Mac OS X: Difference between revisions

From The Incoherency.Net Wiki
Jump to navigation Jump to search
No edit summary
Denis (talk | contribs)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://yxiwisewava.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
----
=[http://yxiwisewava.co.cc CLICK HERE]=
----
</div>
http://www.denis.lemire.name/images/posts/leopard.png
http://www.denis.lemire.name/images/posts/leopard.png


== Convert icns to PNG ==
== Convert icns to PNG ==


&lt;pre>sips -s format png Dictionary.icns --out ~/Desktop/Dictionary_icon&lt;/pre>
<pre>sips -s format png Dictionary.icns --out ~/Desktop/Dictionary_icon</pre>
 
There are some cool, highres system icons in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources


== Ripping a DVD ==
== Ripping a DVD ==
Line 56: Line 50:
Setup .bashrc as follows:
Setup .bashrc as follows:


&lt;pre>
<pre>
if [ -e /etc/bashrc ]; then
if [ -e /etc/bashrc ]; then
. /etc/bashrc
. /etc/bashrc
Line 64: Line 58:
. /etc/profile
. /etc/profile
fi
fi
&lt;/pre>
</pre>


== Write Bootable Image to Thumb Drive ==
== Write Bootable Image to Thumb Drive ==

Latest revision as of 01:37, 23 July 2012

http://www.denis.lemire.name/images/posts/leopard.png

Convert icns to PNG[edit]

sips -s format png Dictionary.icns --out ~/Desktop/Dictionary_icon

There are some cool, highres system icons in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources

Ripping a DVD[edit]

hdiutil makehybrid -udf -udf-volume-name DISTRUBIA_WS -o distrubia.iso ~/Desktop/DISTURBIA_WS

Ripping a Data CD/DVD[edit]

  • drutil status
  • diskutil unmountDisk /dev/disk1
  • dd if=/dev/disk1 of=file.iso bs=2048

Enabling Time Machine to use Unsupported Devices[edit]

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Removing DS_Store Files[edit]

find . -type f -name ".DS_Store" -print0 | xargs -0 rm -f
find . -type f -name "._.DS_Store" -print0 | xargs -0 rm -f

Remotely Enable or Disable Screen Sharing[edit]

To enable screen sharing:

$ cd /Library/Preferences
$ echo -n enabled > com.apple.ScreenSharing.launchd

To disable screen sharing:

$ cd /Library/Preferences
$ rm com.apple.ScreenSharing.launchd

Keyboard Shortcuts[edit]

  • Shift-Control-Eject - Sleep display

Force Safari to Always Open New Window Links in a Tab[edit]

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

Fix screen Environment[edit]

Setup .bashrc as follows:

if [ -e /etc/bashrc ]; then
	. /etc/bashrc
fi

if [ -e /etc/profile ]; then
	. /etc/profile
fi

Write Bootable Image to Thumb Drive[edit]

  1. Run diskutil list to get the current list of devices
  2. Insert your flash media
  3. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  4. Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command)
  5. Execute sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m
  6. Run diskutil eject /dev/diskN and remove your flash media when the command completes

Find system serial number from shell[edit]

ioreg -l | awk '/IOPlatformSerialNumber/ { split($0, line, "\""); printf("%s\n", line[4]); }'

or

system_profiler SPHardwareDataType | awk '/Serial Number/ { print $4; }'

Find build number of OS X Media[edit]

System/Library/CoreServices/SystemVersion.plist

Reset User password from Single User Mode[edit]

  1. Boot into single user mode (press Command-S at power on)
  2. fsck -fy
  3. mount -uw /
  4. launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist
  5. dscl . -passwd /Users/username password, replacing username with the targeted user and password with the desired password.
  6. Reboot