2012-05-26
I love the new Ubuntu 12.04 Precise Pangolin. Unity - and the graphics drivers - have finally reached a stability that satisfies me and let me keep GNU/Linux as solo operating systems on my Macbook Pro 6,2.
How to install Ubuntu 12.04 on a MacBook Pro? I just bought one and I want to install Ubuntu alongside Mac OS X. I have tried the same way as with Windows, but it seems the Mac cannot recognize the Ubuntu. Once the installation is finished, you will be asked to restart your Mac Now, login with your name and password to start using Ubuntu. Note: During the installation process, we used the entire hard disk for Ubuntu in step 20, which means your MacOS will be permanently deleted. If you want to keep the MacOS, you will have to make disk partitions.
What drives me crazy is the default keyboard mapping, surely not thought for who owns an Apple computer.
First, the Unity Launcher (a.k.a. Dash) default shortcut is the
key (or Win key). This key corresponds to the
key on Apple keyboards. Under Mac OS X, the combination
opens Spotlight, while
,
are for Copy&Paste.; That is, the
key is a supercharged
key.
I spent some time to search the best combinations to reproduce this behavior under Ubuntu. Here is what I managed to create:
- I swapped the leftctrl
and the left/right
keys. That is,
becomes
and
becomes
- After the first modification, it becomes unconvenient to open Dash with thectrl
key. Therefore, I changed Unity Launcher key to
. This (sort of) emulates OS X behavior.
To implement the first tweak, create the file
with the following content:
Logout and login again. Congratulations, you have the swapped keys. Ubuntu should already take care to load the file automatically.
It is important to not manually load the .Xmodmap file. It may result in a double application of the mappings, resulting in a re-swap of the keys.
To achieve the second tweak, install the package
. Open it using the
command, or search for it in Dash.Find
and change it to
, using the Grab key combination button. It may be also shown as
.
You can now have a behavior similar to Mac OS X in Ubuntu 12.04. You can change the virtual desktop using
. You can cut, copy, and paste using
,
, and
. You can open the Unity launcher with
.
I hope that this little how-to can help frustrated Apple users who want to embrace GNU/Linux freedom.
I do not use a commenting system anymore, but I would be glad to read your comments and feedback. Feel free to contact me.
1 Determine your hardware revision1
- OS Xclick in OS X on the Apple on the top left, then “About this Mac” – “More Info…”, see the generation in the “Model Identifier” row; or …
- ubuntu
2 Install rEFIt and Partition Your Mac’s Hard Drive(Dual-Boot: Mac OSX and Ubuntu)
- First, install the rEFIt boot managerhttp://refit.sourceforge.net/doc/c1s1_install.htmlTo confirm that the app is working, reboot your system: if you see astartup menu like the one below, you’re good. It may take a couple ofreboots to appear, but it worked on the first try for me.
- Partition Your Mac’s Hard Drive
- Open Disk Utility (Applications > Utilities > Disk Utility.)
- Select your hard drive from the list on the left, and click the Partition tab on the right.
- You’ll see the current partition layout. Click the right corner of the current partition and shrink it to the size you want. The display will show you the minimum size, so don’t worry about going too far. Alternatively, just select the current partition and type in the final size
- Click apply. Disk Utility will shrink the current partition for you and free up space for your Ubuntu install.
- Open Disk Utility (Applications > Utilities > Disk Utility.)
3 Install Ubuntu
Now that your Mac’s hard drive has room for Ubuntu, pop in yourfreshly burned Ubuntu CD and reboot. rEFIt will appear and ask you ifyou’d like to boot to the CD. Select the CD and let Ubuntu start up.It may take a while, but be patient. Once it’s up and running, it’llask you if you want to try Ubuntu (as a Live CD) or install it.
start the Ubuntu Installer from the desktop icon. When prompted,choose to manually partition. Select the EXT4 partition and clickchange. Select to use the space as the EXT4 filesystem and root (/) asthe mount point. You will also want to check the box to format thepartition.
Note: if there is a warning for booting, I just ignore it and ithas no problem.
4 Let rEFIt Fix Your Partition Tables
According to Ubuntu’s Mactel installation guide, there’s a bug in theUbuntu installer that can cause boot problems after installing andcause problems booting into OS X or Ubuntu. Thankfully, it’s an easyfix for rEFIt, you just have to boot into rEFIt’s partition tool andcheck. Here’s how:
- Reboot your Mac. When rEFIt appears, select the “Partition Tool” from the startup menu.
- The tool will load automatically. In most cases, rEFIt will noticethe problem, and ask you for permission to sync your partitiontables. Type “Y.”
- The process takes a couple of seconds, but when it’s finished, shutdown your Mac. rEFIt hasn’t read the new partition tables yet, so ifyou try to boot into anything at this stage, your Mac will hang.
- Start your Mac again, and pick your preferred OS. If you enter thePartition Tool again, you’ll see a notification that your partitiontables are in sync.
Now here’s the catch: If the rEFIt partition tool tells you that thetables are out of sync but doesn’t offer to fix them, or if you seeanother strange error message, head over to this section of the Ubuntuinstall guide and scroll down to “Fix Your Partition Tables” for abreakdown of what you should do for each type of error.
5 configuration
- Screen(Not)The resolution is right recognised, the LED-backlit works properly.NOTE: In order to be able to adjust the brightness you will have toinstall the apple-gmux package and boot with acpibacklight=vendorkernel parameter which you can set e.g. in the /etc/default/grub filein GRUBCMDLINELINUX line. Details:https://wiki.ubuntu.com/Kernel/AppleGmuxBacklight
- Colorsimport these profiles as .icc files in System Settings - Color by selecting the appropriate screen icon, clicking “add profile” and navigating to the .icc files (located in OS X under
/Users/username/Library/ColorSync/Profiles
or/Library/ColorSync/Profiles/Displays
if the settings were saved for all users). After this, choosing the radio button under the new OS X profile should yield a nice color profile. - HFS+HFS is mounted as Read-Only. By turning journaling off in OS X, theHFS+ file system will be read/write under Linux.This is the recommended solution if you need read/write access to your OS X partition.It’s also possible to mount HFS+ journaling-enabled volumes using the“-o force,rw” option though this is extremely risky.Leaving the HFS’s journaling turned on you’re able to access it as root.
- TouchpadWorks fine out-of-the-box. You can disable the mouse-click with thetrackpad tap and the horizontal scrolling in Preferences.Unity supports multitouch with this funcs:To get multitouch with just two finger scrolling and drag-and-dropfollow these instructions:
- Palm RecognitionBy default palm recognition is not turned off, so you might have trouble moving the cursor or clicking something by brushing the trackpad with your palm while typing. To turn palm recognition on, open up a terminal and copy your default conf file:Now edit the new conf file:and add the following line just before the EndSection marker of your input class:
- Fine-tuning the touchpadYou can play with other options offered by Synaptic input drivers that are explained here and in this blog post.
- Palm Recognition
- TODO External MonitorExternal monitors connected via HDMI work out of the box.If your external display’s native resolution is not recognised when connected via a VGA port (only a lower resolution, such as 800x600 is offered, for example), then you need to issue a couple of xrandr commands in a terminal to force add the desired resolution. The source of information for this fix comes from here.To check that xrandr is installed issue:You have to create a modeline using the gtf or cvt utility. Forexample, if you want to add a mode with resolution 1920x1080, you canenter the following command (The output is shown following):Then copy the information after the word “Modeline” into the xrandr command (which would in my example state):Now get the code of your external monitor by issuing xrandr. For me the external screen is branded DP1.Now add this mode to the available ones for your external screen:And select it:If everything goes well, the resolution should be ok now and you’ll have the desired option in the normal display preferences. This will have to be repeated every time. The easiest way to automate the task, add the 3 xrandr commands to the ~/.xprofile file.The file should look something like:Afterwards, you have to add executable access to the file:Note: if you make a mistake in the .xprofile file, you might have trouble reverting back to normal settings - in this case you can always use ctrl+alt+F1 to open the shell interface and issue mv ~/.xprofile ~/.xprofile-old; sudo reboot to get the previous settings back.
- SoundWorks out-of the box, but some volume corrections are necessary.You can install gnome-alsamixer for a nice GUI to set up your sound:
- Wireless(more 2)There is no official support yet in Ubuntu 11.10, but you can getit working with the following repository:Then install the
linux-backports-modules-cw-3.2-oneiric-generic
or, ifyou have the pae kernel installed, thelinux-backports-modules-cw-3.2-oneiric-generic-pae
package. While thistutorial deals with Oneiric, the same instructions for the wirelesswork for Precise, with the above installation of”linux-backports-modules-cw-3.2-oneiric-generic
” replaced with”linux-backports-modules-cw-3.3-precise-generic
” .Edit the /etc/modprobe.d/blacklist.conf and add the line:Create or edit the file/etc/pm/config.d/modules
and make sure thewireless modules (b43 and bcma) are blacklisted:Reboot and the wireless should work. - GraphicsSystem info saysit means that it cannot acquire the information because glxinfo is not installed on the system.Install it by clicking here:https://apps.ubuntu.com/cat/applications/mesa-utils/Install via the software centerOr by typing:
Ubuntu 12 For Mac Os
6 Install Software
- lightum3Lightum is a daemon to control the keyboard brightness and screen backlight on MacBook based laptops.If you are running Ubuntu, you can install it by adding lightum-mba ppa to your system:Otherwise, you can build it from source.
- lightum-indicator4
- ubuntu-tweak
- gnomeubuntu 12.04 中安装 gnome 桌面的命令为:安装好 gnome 桌面后注销重新登录,在用户名右边有一个图标,可以选择使用进入的桌面,我选择了 gnome classic,然后就可以重返经典的 gnome 桌面了。在删除 unity 桌面之前,要把 ubuntu 默认的登录界面也改为 gnome,命令如下:这是设置登录界面为 gnome classic 的,如果你喜欢 gnome3,则用:接下来就可以卸载 unity 了。
- other
Footnotes:
Ubuntu 12 For Mac Iso
2
3