Mac (Mac OS X) How to...
Rafael Palacios. Instituto de Investigación Tecnológica,
Universidad Pontificia Comillas, Madrid, SPAIN
Last updated 20191115
Useful programs to install
- Microsoft Remote Desktop. This a remote desktop client
developed by Microsoft to allow mac computers to work on windows
computers remotely. Download free from App Store
- Use Ctrl+Fn+Function Key in the mac to generate Windows
Function Key codes.
- Use Command+2 for Full Screen
- Go to Setting/drives to set up a mac folder that will appear as
a remote disk on the PC
- Sublime Text. Very nice Text editor, good for
programming. Personal licence: $80 for 3 years. Unlimited trial version (popup reminder to by a license). Available at https://www.sublimetext.com
- Fetch. Program to transfer files in SSH mode. Now
available at App Store. Free licenses for Academic use
How to create simple C programs using xcode

How to create an ISO image of a data CD or DVD
- Insert CD/DVD source
- Open Terminal.
- Check the device name executing mount
- Unmount the device (ex /dev/disk4s0) executing:
diskutil unmountDisk /dev/disk4s0
- Create the ISO file with the dd utility (may take 5 min per CD):
dd if=/dev/disk4s0 of=file.iso bs=2048
- Your ISO images is file.iso
How to capture screen or windows
To save captures to png files on the Desktop:
- Command+Shift+3 --> Full Screen
- Command+Shift+4 select_region --> Selected region of the screen
- Command+Shift+4 space select_window --> Selected window
To save captures to the clipboard:
- Command+Ctrl+Shift+3 --> Full Screen
- Command+Ctrl+Shift+4 select_region --> Selected region of the
screen
- Command+Ctrl+Shift+4 space select_window --> Selected window
How to mount remote file systems
In general remote file systems are mounted from Finder using: Go ->
Connect to server
You need to write the servers specification (protocol name and server
address), then your login/password
Windows server
Write the resorce name in the format smb://server_address/resource.
In the PC the resource must be shared, the Firewall must be configured
to allow file sharing, and the antivirus software may need some tuning.
Unix server
Option 1, NFS. Example nfs://foo.com/user/
This is not secure
Option 2, WebDAV server. Use http://idisk.me.com/username/
Validation process is always encrypted. Traffic and file data is only
transferred encrypted if the protocol is https instead of http
Option 3, only SSH. Try ftps://
If your server doesn't support ftps, then use the program Fetch or
install Macfusion.
How to create HTML signatures in Mail app (short description)
Mail can create HTML signatures, but unfortunately the user interface
doesn't help to do it, neither in Lion!
The procedure is the following:
- Create a simple text signature using
Mail>Preferences>Signatures and click on the '+' sign.
(This will create a file in ~/Library/Mail/V2/MailData/Signatures)
- Quit Mail
- Create an HTML file with your signature. Here is an example for Comillas University email signature
(the file should not have Document type or head or body tags).
- Open your HTML file in Safari and go File->Save As to create a
.webarchive file
- In Finder use Go->Go to folder->
~/Library/Mail/V2/MailData/Signatures find your plain text signature
file and replace it with the .webarchive file, using the original
cryptic name.
(You may use Quick Look to identify the signature file if you use
several signatures)
- Select the file, then get file information with Command+I and lock the file by checking "Locked". This prevents Mail to overwrite the file in OS X 10.9 (Mavericks).
- Open Mail, then create a new message. Your new signature should
be at the bottom.
How to transfer your iTunes library to another computer (Not tested for a long time)
If you connect your iPod/iPhone/iPad to a new computer, iTunes will not
copy the contents of that iDevice into its libraries. Instead it will
threat you with deleting your iDevice contents and replace it with the
current (empty) library of the new computer. The work around is to copy
iTunes library to the new computer and then sync as usual.
- On the old computer, make sure all your files inside
iTunes folder
- Open iTunes
- Preferences -> Advanced
- Make sure the option "copy files to iTunes folder" is checked
- File -> Library -> Organize Library
- Check "consolidate files" to actually copy all files into
iTunes folders
- Also check "reorganize files" to organize all media files
into
appropriate subfolders.
- Quit iTunes
- Copy iTunes folder to external Hard Drive
- Connect your externa USB drive and copy the iTunes folder (it
is
also possible to copy the folder directly from one computer to the
other across the local network if you know who to share folder).
- On windows the folder is: c:\Documents and settings\[user]\My
Documents\My Music\iTunes
- On mac the folder is: /Users/[user]/Music/iTunes
- (both libraries Windows or Mac are compatible).
- On the new computer install iTunes folder
- Quit iTunes if it is open
- Rename iTunes folder something like iTunes_original (just in case
you need to undo).
- Copy the iTunes folder from the externa hard drive to "My Music"
(windows) or "Music" (mac) folder.
- Start iTunes. You will see all your media files.
- If your media files don't appear in iTunes go to preferences
-> advanced and check the name of the iTunes Media Folder Location.
How to install a new Hard Disk Drive and restore all your data from Time Machine
(Ex. your hard drive broke down)
1 To install a new HDD go to iFix.com to find instructions about the hardware part.
2 After the new HDD has been physically installed, if you try to start
your computer you will get a question mark, since there is no operating
system in that disk.
- You need to start up using MacOS DVD (or USB). It will ask if you
want to install MacOS from scratch or recover from Time Machine.
following on-screen instructions you will need to open Utilities menu,
then select "Restore System from Backup...".
- NOTE: Even if your DVD is an older version of MacOS, it will work because it is only used to start the restore utility.
3 The restore utility will find your Time Machine on the network or in
USB external drives. It will prompt for the time machine password.
4 Then it will ask for the destination HDD.
- In case of a new HDD that is not partitioned (formated), it will not appear in the list.
- If your HDD is not in the list, go to Utilities/Disk Utilities
- Select the Hard drive, the Partition.
- Select "1 Partition" and give it a name. The type must be "Mac OS Extended (journaled)" or "APFS" in more recent systems, which is the default.
- After hitting "Apply", the partition process tales less than a minute.
- Quit Disk Utilities, you will be taken back to the Time Machine restoring application.
- Back in the restoring application, select your HDD as destination, and Continue.
5 The restore process may take hours. When done, you will be asked to restart your computer.
Note:
- If you are upgrading to a larger/faster HDD, you may want to launch the back up process manually before removing the old disk.
- However if you are installing a new HDD because the old one failed, make sure that you restore the system for a date before starting getting disk errors.
How to upgrade your Hard Disk Drive
(Ex. you upgrade to SSD drive)
1 Time Machine preparation (if you use time machine)
- Open time machine Preferences, and use the option "Backup now". (just in case...)
- After the backup process is finished, turn off automatic time machine by using the On/Off slider.
2 Make an image copy of your current hard drive to your new disk. Lets say your current is called HDD and the new one is called SSD.
- Connect your new SSD to any USB port using a USB-SATA adapter
- Use Disk Utility (Applications>Utilities>Disk Utility) to erase you new SSD. The recommended format is or "APFS" in more recent systems or "Mac OS extended (Journaled)" in older systems
- Shut down your computer, restart while pressing Command+R to enter recovery mode. This is needed to be able to make a copy of your startup disk
- Start Disk Utility. Select SSD drive, then Edit>Restore. The pop up window allows you to select HDD in the
"Restore from" field (as long as you new SSD is large enough). It will take about 3 hours.
Before El Capitan: Select Restor, then Drag you old HDD into Source and the new SSD into Destination, then hit Restore.
- Shut down your computer
3 Check that the new disk is working (optional)
- Leave SSD connect to USB
- Startup the computer while holding Option key. It will show the option to startup from internal HDD or USB-connect SSD.
- Select SSD and check all your files and applications have been copied.
- Shut down your computer
4 Replace disks
- Open your computer and replace HDD by SSD. Find step-by-step guides at www.ifixit.com
- Restart your computer without pressing any key. It will boot from the new hard drive
5 Time Machine adjustment
Without any changes, your time machine will identify the new hard drive as a different drive, even after making an full copy of all files. This is because each disk is identified by a unique ID called UUID.
Therefore if you activate Time Machine, your mac will make a full backup of the full hard drive (as if it were a new computer) and you will loose you backup history.
However it is possible to "link" the new hard drive to your previous history of incremental backups by means of tmutil command (available since OS X 10.7).
If you don't mind to loose you backup history, just Turn ON your automatic backups in Preferences > Time Machine.
If you want to keep your backup history, follow these steps:
- Open a terminal window at Applications>Utilities>Terminal, then become root by executing "su" and typing root password
su -
- Check the name of you new hard drive
ls -l /Volumes
total 8
lrwxr-xr-x 1 root admin 1 Jun 8 17:20 SSD -> /
- Automatically mount Time Machine (specially if you use Time Capsule) and get Latest backup date:
tmutil latestbackup
/Volumes/Time Machine Backups/Backups.backupdb/ComputerName/2013-06-06-230607
- Check the name of your old hard drive within the backup (I use double quotes because the path contains spaces):
ls -l "/Volumes/Time Machine Backups/Backups.backupdb/ComputerName/2013-06-06-230607"
total 0
drwxr-xr-x@ 19 root wheel 952 Jun 6 23:06 HDD
- Now associate the new hard drive to the existing backup
tmutil associatedisk -a /Volumes/SSD "/Volumes/Time Machine Backups/Backups.backupdb/ComputerName/2013-06-06-230607/HDD"
- Activate automatic backup in Time Machine Preferences (it was deactivated in step 1).
Your first backup may be slow because it will probably check that everything is ok, but only a small amount of data will be copied (not the full hard drive).
After this first backup is finished, you may go to any folder and select "Enter Time Machine" to check that you have all your backup history in the "Star Wars"-like interface.
- FOR MORE INFORMATION ON HOW TO RECOVER A PREVIOUS BACKUP HISTORY SEE: http://pondini.org/TM/B6.html
How to configure Time Machine at home to backup your laptop while traveling
This is VERY slow unless you have really fast Internet connection at both ends
(This hasn't been tested for a while)
1 Activate "Back to my mac" in Preferences/iCloud. (I think this is not necessary, but just in case).
2 Obtain you password. Go to Applications/Utilities/Keychain Access/System and find the password kind "Back to my mac". The password will appear in plain text by checking "Show password" checkbox.
3 Run Applications/Utilities/Airport utility to configure your time capsule. Edit the time capsule name to open the dialog to define the hostname.
- The local hostname should be something like "TC.local"
- Check "Use dynamic global hostname"
- Specify the hostname and User according to your iCloud username. Hostname like TC.username.members.me.com, and User like username.members.me.com
- Paste your "Back to my mac" password of the keychain to the Password field.
NOTE: Since remote backups are very slow, they get interrupted very often. If your backup gets interrupted too much, eventually Mac OS X will decide to restart a full clean backup. What I do is set Time Machine OFF in preferences, and then manually select "Back up now" if I know that I can leave the laptop ON and connected to the Internet for a long time.
For more details see: http://www.macgurulounge.com/make-time-machine-remotely-back-up-to-your-time-capsule/ (website no longer available)