Notes on configuring MacOS
(These notes have been rescued from TCM's now-defunct wiki.)
Whilst TCM does not offer much direct support for Apples, the wireless network service and TCM's printing service should work fine with them. They are probably the most popular form of laptop in TCM, the main competition being Linux.
MacOS is mostly UNIX, but with a few idiosynchrasies, just to give it that Apple flavour.
One is that since MacOS X 10.11 (El Capitan) the root account is less powerful than is traditional for a UNIX root account. For example, it cannot write to many of the key system directories. More detail can be found in this Stackexchange article. However, this is still no excuse for not setting up any Mac with at least two accounts, one with admin rights for software installation etc., and one without for everyday use.
Keeping it Current
As with any computer connected to the Big Bad Internet, Macs need to be kept up to date. Is it possible to upgrade the OS between versions without an Apple account with valid credit card attached for what is a zero-cost purchase? Unclear -- I failed (MJR).
Software suggestions
Web browsers
There is quite a lot to be said for using Safari, the web browser which is part of MacOS. Alternatives include:
Firefox (but note that if using a laptop with both integrated Intel graphics and a discrete graphics card, Firefox will cause the Mac to switch to the discrete card whenever it is running, at a cost to battery life)
LaTeX
TeXShop is simply a nice frontend. It recommends installing MacTeX, which includes TeXShop with TeXLive, is a massive 2.8GB download, and will take several minutes to install after downloading. It will use around 5.5GB of disk space.
Office Applications
LibreOffice is a standard office suite of word processor, spreadsheet, presentation package and drawing package. There was a time when LibreOffice was not fully ported to MacOS (it required XQuartz), and NeoOffice was a much better choice for Mac users. That time has passed.
Scribus is a DTP package available for MacOS, Linux and Windows.
Keynote (available for free from the App Store) is Apple's own presentation software, and is highly regarded.
Text Editors
Aquamacs is emacs but fully ported to the Apple GUI environment, for those who like emacs...
X server
Apple no longer provides one automatically, but sshing into a computer and being restricted to using text-mode applications only is rather old-fashioned. So one might want XQuartz if you like running applications on remote Unix computers. After installation you will have to log out and log in, but then "ssh -Y" to a TCM machine should leave one able to run graphical applications. The standard X applications will also be installed locally, so one can type "xclock" in a terminal as a useful test that the X server is working.
Graphics
For bitmaps, GIMP, which is fully ported to Apple's GUI, but Apple regards that source as an "unidentified developer", so one has to open the Applications folder in Finder, control-click, choose open, and type an adminstrator's password the first time it is opened. The first start-up of GIMP is slow anyway: fortunately subsequent startups are faster and simpler.
For vector graphics, Inkscape. This it not fully ported to Apple's GUI, so it requires XQuartz to be installed (see above under X server).
gcc/Xcode
Simply type "gcc" in a terminal window, and choose "install" from the dialog box which will appear.
For the Xcode IDE, one needs to download from Apple, linked from the Xcode website.
Note that for some while MacOS has really used clang/LLVM, not gcc. One important difference is that there is no Fortran component, so if you want Fortran then you will have to install gcc (or a commercial compiler such as Intel's which is available for MacOS). There is also currently no support for OpenMP.
Skype
Dropbox
Java
Apple used to supply Java with MacOS X. It stopped this with 10.7. You might still want Java in order to run
Jmol, ImageJ, JabRef
or one of many other Java programs. If so, you will need to install a
non-Apple Java,
probably Oracle's
Java. The JRE is sufficient for running Java applets in web
browsers, but for a java command line, one needs to install a JDK, or
so say Apple/Oracle. In practice the JRE seems to contain a
functioning Java launcher as
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
jpegtran/djpeg/cjpeg
Assuming that gcc is installed, download the source from the IJG site, and it can be compiled with
./configure --prefix=$HOME make install
alpine
Well, you can...
Miscellaneous settings
Seeing links in Safari
By default Firefox shows a link's destination when you hover over it, and Safari does not, leading to jumps into the unknown. To fix, simply turn on the Status Bar in the View menu.
Page source in Safari
Preferences, advanced, show Develop menu. Then you will have a menu with lots of useful items, including show page source.
A whole directory in the Dock
It can be useful to have a whole directory, such as Applications or Utilities, in the Dock. For the former, open a Finder window, press cmd-shift-G and go to the folder /. This will then show the Applications folder as a folder. This can be dragged onto the Dock below (vertical docks) or to the right (horizontal) of the dividing line (formerly known as the zebra bar). Once done, a single click on the folder on the Dock expands the folder into a window from which you can start any application installed in Applications. The same techniques works for the Utilities folder, and other folders.
Terminal Prompt
The default terminal prompt is "hostname:directory name username$" This is set in /etc/bashrc. I prefer simply the full path of the current directory, which is obtained with "PS1='\w\$ '. One can, of course, add text too: "PS1='My Mac:\w\$ ' or similar.
Those used to vi will find this file easy to edit -- open a terminal, type "login [admin user]", "sudo bash", "vi /etc/bashrc" and exit vi with ":w!". Goodness knows what other people do - perhaps they simply set it in their ~/.bash_profile.
Eduroam
The UIS provides instructions, but make sure that your wireless is turned on throughout -- attempts to set things up and then turn it on seem to fail.
Not typing .tcm.phy.cam.ac.uk
Settlings|Network|Unlock|Advanced|DNS and add tcm.phy.cam.ac.uk as a search domain. This has to be done separately for wired and wireless connections.
Having a ~/bin directory
Typing "mkdir ~/bin
" is easy, but, unlike most UNIX
systems, it will not end up on your PATH. Depending on how concerned
you are about shells being called recursively, adding the line
PATH=${HOME}/bin:${PATH}
to your ~/.bash_profile may be the answer. (This file might not exist.) If this directory is on your PATH, it is then a convenient place for programs such as Castep, bmp2eps, etc.
Here you could also add
PS1='Mac:\w\$ '
for a more TCM-like prompt.
Trackpad Settings
I like a single tap to be equivalent to a click: Settings, Trackpad, Tap to click.
I also like a tap on a window's title-bar followed by movement to drag the window: Settings, Accessibility, Mouse and Trackpad, Trackpad options, enable dragging.
Miscellaneous Advice
What is it?
sysctl machdep.cpu.brand_string
typed in the Terminal may report more of the CPU version string than About This Mac does.
Power Hogs
There is plenty of evidence that Firefox consumes more power than Safari in many cases. One source of data is iStat Menus.
However, in a completely different league for drawing power is Apple's bundled chess game. This thinks whilst its opponent is thinking, keeping the CPU permanently in the turbo region, and its graphics will switch on any discrete GPU too.
External monitors tend to require the use of the discrete GPU.
How is the battery?
The command-line equivalent to the information under "About this Mac" is
system_profiler SPPowerDataType
Failures
Various Apple models have suffered from manufacturing issues which have resulting in premature sudden failure. Most of these have centred around thermal issues with the GPU, so avoiding stressing one's Mac could be good for its health. Affected models include:
- Mid 2007. late 2007 and early 2008 15" and 17" MacBook Pros with Nvidia graphics (see Mac World).
- Early and late 2011 MacBook Pros, and 15" MacBook Pro Retina mid 2012 and early 2013 (see Mac World).
MJR owns one of each of the above categories, with no issues so far...