OS X for Linux people

From DiLab
Revision as of 22:33, 7 March 2012 by Leo (talk | contribs) (...the bad, and sometimes ugly)
Jump to: navigation, search

So you just run into OS X Lion or some other animal. I just did, too. If feels like roaming through jungle while looking for gems. And finding them.

Some might call this

"10 or so things to do with MAC OS X/Macbook Air/Pro/Mini after you got it".

Let me share some simple things that took time. This is mostly about OS X 10.7+ Lion, which is the current version at the time.


Impressions and differences

...the good

  • Safe-mag power connector is the best. just sticks to the place, from front and behind, shows the status with a LED, and pulls off without effort.
  • I like how the keyboard responds. Soft and quiet.
  • The backlight under the keys is nice, and should probably be used in most such input devices.
  • Multi-touch is nice and easy to get used to. Especially the scrolling, and moving windows (enable the 3-finger move in system prefs)
  • Most installations for new software is easy. Download and click on *.dmg file. Maybe drag the new software icon to Applications. Enjoy (or hate) the new spoils.

...the bad, and sometimes ugly

  • Now, the backspace key is called delete and does backspace (like in the old days). But where is the delete key...? Oh, well, it turns out you can press Fn+delete for the delete functionality.
  • I am too used to linux/win control and alt key functionality. This throws me off. For example, I just accidentally switched panes again when wanted to jump a word back (pressed Ctrl+Left instead of Option/alt+Left).
  • Integrated AppStore is ok, but rather limited, understandably so, to approved software. Oh, well, one can find many alternative software choices on the Internet, as already precompiled .dmg files.

Simple things

Right click?

Easy. Click two fingers.

Tired of pressing that click on the Macbook?

Switch to "tap to click". System Preferences -> Trackpad -> Point & Click -> check Tap with one finger. It is quieter, too.

Keyboard shortcuts

Delete key confusion

The usual backspace key is named delete on Macbook, but it does backspace, which is fine. But where is the Delete key that does forward-delete? No such key.

But you can use Fn+delete to do forward delete. I guess the old typewriter keys dod not have a notion of deleting what has not been typed yet, and therefore did not include such key on the keyboard. Sometimes Apple is conservative...

A few other useful shortcuts

  • Fn+up/down is page up/down
  • Fn+left/right is home/end
  • Alt+delete will delete a whole word. Command+delete will delete the whole line to the left
  • Fn+alt+delete will delete the next word forward.

Terminal

You could search most things by clicking on the search icon at top right corner. Then type "Terminal" and see the options below.

Or you can go and explore the Launcher. Slide two fingers right to get the left pane, and you see the system (preinstalled) apps. The right pane show the downloaded or purchased apps that are installed. Go to the left pane Utilities -> Terminal to get the terminal.

I still want to create a systemwide shortcut for new terminal... TODO

Terminal auto-close on shell exit

OK, I press Ctrl+D to exit the terminal and it nicely tells me:

...$ logout
[Process Completed]

Thats not enough. I want the window to close when I am done. And this is what we need to do:

  • Start the terminal
  • Go menu -> Terminal -> Preferences -> Settings -> Shell -> "When the shell exits:" set to "Close if the shell exited cleanly"
  • Close the Settings window

Now the Terminal window will close on Ctrl+D. It will also close when other programs invoke the shell and exit with no errors. If they have errors, the terminal will stay open so you can read about what went wrong.

There is no place like home

Well, there is. It (the directory) is called Users, not home. For example, JOHN will have his home at /Users/JOHN, instead of /home/JOHN. Be prepared to love $HOME in your shell scripts instead of the explicit pathnames with "home" in them.

Where's my apt-get install?

Not there. But there is MacPorts, that you may want to install to ease the path to other open source software. Goto http://macports.org and install their package by following their instructions.

Where is my .bashrc ?

You want it - create it. You might also want to create and add the following in your .bash_profile

if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi


Wine, please

for my windows stuff, such as old Visual Basic programs. This will be easier with MacPorts.

Here is one how-to: http://www.davidbaumgold.com/tutorials/wine-mac/

What this tells you to do is:

  • Set up Xcode from apple (free from AppStore)
  • Install "Command line tools" from Xcode - registration required as an apple developer
  • Download and set up MacPorts, so you could run "port install wine".
  • Install wine using MacPorts from the terminal. Then have a rather long coffee or tee or just nap while everything downloads and compiles.
sudo port install wine
  • I'd add that you will probably need and like to add winetricks. This will ease the installation of various dlls and components needed for your windows programs, such as mfc42.dll.
sudo port install winetricks

Starting apps form the command line

OK, I got the terminal. I even got nano. But I want, say, TextWrangler to edit my text file. How?

Use "open". For example, if you want to edit your .bashrc then do this:

open -a TextWrangler .bashrc

Haha! Now I can create alias(es) for my favorite apps to be invoked from CLI. You could, too. Here is more info

Useful applications

There is a list of some applications or packages that I set up on my Mac.

...from the AppStore

  • Keynote - for presentations. Beats Powerpoint at $20.
  • Xcode - useful and free from apple for development or installing some other packages.
  • The Unarchiver - to get them archives unfold

...from the Internet

  • MacPorts - enables other good open source software
  • PSPP - a statistical software like SPSS, but under GNU licence.
  • Ukelele - a keyboard layout editor
  • VLC - plays almost any type of video