MacBook Pro
From GHER
Contents |
General
- How to know the operating system?
http://www.apple.com/support/mobileme/en/os_version.html
- Create a Mac App Store account without credit card
http://support.apple.com/kb/ht2534
- Make a screen capture
cmd + shift + 3
http://graphicssoft.about.com/od/screencapturemac/ht/macscreenshot.htm
Notes: all the shortcuts are available in Préférences Système in Keyboard (Clavier)
- Go directly to the desktop (expose)
fn + F11
(you can change in System Preferences --> Mission Control)
Configuration
The configuration is done through the Préférences Système menu.
Installations
How to efficiently use command-line tools?
Xcode
Mac OS X comes in with already a huge amount of developer tools, and you may want to check them out before installing other open source compilers or libraries. The "problem" is that those developer tools are not installed by default. So before you begin doing any programming of funny things essentially using the shell, you will have to download what is called Xcode, which is the developer package of Apple.
You need to create an Apple Developer ID, which is free, and to use the application "App Store" (free and normally installed by default on the system) which is a very convenient way to download (and buy) applications, including Xcode (which is free).
Usually Xcode came out with a bunch a other applications, but since a couple of months Apple now distributes it via a stand-alone application, which is much easier for managing the updates etc. You can find more info about this change here: News in Xcode 4.3. A folder /Developer was initially created where to install all Xcode Tools, but now, since the 4.3 version, it will be a simple application placed in your /Applications folder.
Besides, Apple also distributes a "Command-Line Tools for Xcode", which you can download here: Command-Line tools for Xcode, and is a ~170Mb package with other... command-line tools, no surprise. You can also install those tools by starting Xcode and using the Downloads preference panes.
Package managers
As on Linux, you have what we can call package managers and which are a very convenient way to download, configure, making, installing, and keeping up-to-date packages automatically. The most common ones are MacPorts, Fink or HomeBrew. By the way, you will need Xcode to install those ones.
But pay attention when using them: although very convenient, they will install their packages in distinct folders by default (ex: /opt for Macports, or /sw for Fink), and if you are to compile programs in which you have to specify the compiler and library paths, be sure not to mix up all paths between your apple tools (typically installed in /usr/bin or /usr/lib...) and the packages installed via the package manager, and even your maybe self-installed packages (typically installed /usr/local)! This in order to avoid compatibility issues between the compiler and the libraries versions.
For example in order to use MacPorts tools, you'll have to set up correctly your PATH variable (see for MacPorts for example: Important steps when installing MacPorts). Look also below for more information about setting up your PATH variable.
Remember you can also use the which command in order to see where your system will fetch the command require.
Examples:
MacBook-Pro-de-GHER:~ gherulg$ which gcc /usr/bin/gcc MacBook-Pro-de-GHER:~ gherulg$ which gfortran /usr/local/bin/gfortran
Setting up the PATH variable
On Mac OS X there is a simple way to add permanently custom paths to your PATH environment variable. Either you edit the file /etc/paths, either you add any text file (with any name) containing your paths line-by-line in the /etc/paths.d folder. And remember that in a file, the first paths to be cited will be the first ones to be searched.
You can also use the $HOME/.bash_profile (or .bash_rc) with an export PATH command, which will be executed every time you open a shell session.
For instance, for MacPorts:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH export DISPLAY=:0.0
Beware! GNU vs BSD
As you might know, Apple's Mac OS X is based on the Darwin operating system. This one was released by Apple in 2000 and, to cite Wikipédia, "it is composed of code developed by Apple, as well as code derived from NeXTSTEP, BSD, and other free software projects". The license is APSL, the Apple Public Source License, that meet ther equirement of the Free Software foundation (FSF) since 2003. However, the tools you will use are not likely to be exactly the same as the ones used on the Linux System, with a GNU License. In most of cases, you won't be concerned by this. But some options of the core tools won't be available. Quick examples : tail -v, which is the verbose mode in which tail also prints a header with filename. Or the "execute" command with sed. There are many more examples.
What you can do to overcome this issue is... to install GNU tools. Either manually (via websites [1] and [2] or using a package manager. For example with macports you will need to install coreutils and findutils using
$ sudo port install coreutils findutils
Once installed, those tools are prefixed with the letter "g" to distinguish tem from the BSD tools. For xample : cp <-> gcp, ls <-> gls... If you wan't to use them by default, you can add this path to your PATH variable: /opt/local/libexec/gnubin/.
Configuration of SSH
Need to create the command ssh-copy-id in /usr/bin for instance. The script can be found on the internet, e.g., http://phildawson.tumblr.com/post/484798267/ssh-copy-id-in-mac-os-x
Then you can follow the instructions from http://modb.oce.ulg.ac.be/mediawiki/index.php/Using_SVN
Useful software to install
gimp
http://gimp.lisanet.de/Website/Download.html
ncview
LaTeX
- Mactex:
- TexMaker (editor)
http://www.macupdate.com/app/mac/14641/texmaker
- Missing packages: download the packages you need from CTAN, and place them in ~/Library/texmf/tex/latex/. You may have to create this directory.
http://forums.macrumors.com/showthread.php?t=668314
- I also had to type
\usepackage{etex}
in the preambule to avoid error
No room for a new ‘thing’
ImageMagick
http://www.imagemagick.org/script/binary-releases.php
$ sudo port install ImageMagick
If you're using macports.
