Results 1 to 3 of 3

Thread: How to Install Ubuntu 9.04 on an Intel-based Mac laptop

  1. #1
    Join Date
    May 2009
    Location
    Lytham St Anne's, England
    Beans
    119
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Post How to Install Ubuntu 9.04 on an Intel-based Mac laptop

    How to install Ubuntu 9.04 on an Intel-based Mac laptop, by Richard Cavell v1.1. (June 2009)

    Part 1 of 3

    Hi,

    In the spirit of free-as-in-beer, please propagate these instructions wherever you like. They are for installing Ubuntu 9.04 on a MacBook, MacBook Air, or MacBook Pro. These instructions may need to be slightly modified for different setups. If you wish to suggest any modifications, please do so.

    I've written these instructions so that an absolute beginner ought to be able to follow them. Part 1 describes how to install Ubuntu on a Mac laptop. Part 2 describes how to configure Ubuntu for a Mac laptop. Part 3 is for novices. Part 3 is a reference that describes how to perform some basic tasks. You can refer to Part 3 if you don't understand something in Parts 1 or 2
    . I strongly suggest printing these instructions out so you will have them handy in spite of having to restart your computer multiple times.

    Follow each step in order. Make sure you complete each step before proceeding.
    Unless you know what you are doing, you must follow these instructions in order, and each step must succeed before moving on. If something doesn't work, stop and use the Ubuntu Forums to ask for help before proceeding.

    Step 1: Find out what sort of computer you have.
    These instructions are only for Intel-based Apple Mac laptop computers. If your computer is a desktop, or a laptop manufactured by a company other than Apple, or a PowerPC-based Apple laptop, these instructions are not for you.
    If you're not already in OS X, boot into OS X [see Part 3 below if you don't know what this means]. Notice at the top right of the desktop is a grey image of a hard disk and below it, the name of your OS X installation. The default name is "Macintosh HD". You may have changed the name.

    Now use your mouse or trackpad to go to the top-left of the OS X screen. Select the Apple logo by moving your pointer until it points to the logo, and then pressing and releasing the left mouse button (or pressing the trackpad button or the trackpad itself). Go down the menu - select "About this Mac", which might be the first item on the list, by moving your pointer to it and then pressing and releasing your left mouse button/trackpad button/trackpad. You should now get a window with the Apple logo or a tall thin blue 'X' logo, and "Mac OS X" in it.

    Below the logo and the phrase "Mac OS X", there will be a version number. It may have one decimal point (period) and look something like "Version 10.4" or "Version 10.5". If so, then remember that as your version number. If it has two decimal points (periods) and looks something like "Version 10.4.11" or "Version 10.5.7", then ignore the second decimal point (period) and the number to the right of it. So "Version 10.4.11" means that you have version 10.4 of OS X. "Version 10.5.7" means that you have version 10.5 of OS X.
    If you have version 10.0, 10.1, 10.2, or 10.3 of OS X, then you have a PowerPC machine and these instructions are not for you.
    Down the bottom it will say "More info...". Click on this with your left mouse button (or trackpad button or trackpad) and then release. You should now see a window with the name of your computer at the top. In my case, it says "Richard Cavell's Computer". It might alternatively be in a form such as "richard-cavells-laptop".
    If you see a window called "Apple System Profiler", and tabs called "System Profile", "Devices and Volumes", "Frameworks", "Extensions", "Applications" and "Logs", then you are on a PowerPC machine and these instructions are not for you.
    On the left side, there should be a list of items. The first one is called "Hardware". It is probably already selected. If not, then click on it and release. To the right you should see the heading "Hardware Overview:". Now, within that right-hand window, look for the text: "Machine Model:" or "Model Name:". It should give you the model of your machine, which will be "MacBook", "MacBook Air" or "MacBook Pro". If it says "Mac", then you have a pre-release machine, and may run into incompatibilities, but you can use these instructions.
    If your laptop model is something other than MacBook, MacBook Air, or MacBook Pro, then these instructions are not for you.
    Now, look for the text: "Model Identifier:" There will probably be the name of your computer model, without a space if the name of your model is two words, and two numbers separated by a comma, like this: "MacBook1,1" or "MacBookAir2,1" or "MacBookPro3,1". The number to the left of the comma is the generation of model that you have. The number to the right of the comma does not matter for present purposes.

    Underneath that should be a line that begins with "Processor Name:" or "CPU Type:". The name of your processor should be there. It will say either "Intel Core Duo", in which case you can only run 32-bit software, or "Intel Core 2 Duo", which runs 64-bit and 32-bit software. Note the '2' in the name of the latter chip - it makes a big difference!
    If you see "CPU Type: PowerPC" or "Processor Name: Intel Xeon" (with or without extra letters and/or numbers), then these instructions are not for you.
    A MacBook that was released earlier than November 8, 2006 ought to have an Intel Core Duo processor. A MacBook Pro that was released earlier than late 2006 ought to have an Intel Core Duo processor. At the time of writing (mid 2009), all MacBooks and MacBook Pros manufactured since late 2006 have Intel Core 2 Duo processors, and all MacBook Airs ever manufactured have Intel Core 2 Duo processors.
    Before you proceed, make sure you know your model name (MacBook, MacBook Pro or MacBook Air), your generation number (1 to 5 at the time of writing), your OS X version (10.4, 10.5 or 10.6 at the time of writing), the name of your OS X disk or partition and whether your CPU can run 64-bit software.
    Step 2: Update your computer.
    Note that this step and step 12 are the only two steps of Part 1 that cause any type of permanent change to your computer. You should be especially careful during this step and step 12.

    If you're not already connected to the Internet,
    connect your computer to the Internet.
    Move your mouse pointer to the top-left of the screen, and click and release on the Apple logo. Move the pointer down to "Software Update...", and click and release again. A window should appear, entitled "Software Update". It may say "Checking for new software..." and spend some time downloading from the Internet. Wait until this completes. If there is an error, fix your Internet connection and restart this step.

    There are two possibilities now. If you get a box saying "Your software is up to date. Software Update doesn't have any new software for your computer at this time.", then skip the next paragraph.

    If it says "New software is available for your computer.", there will be a window below with a list of updates that may be installed. You should install each of these. There will be a box to the left of each item to be installed, with or without a check mark. If your Internet connection is reliable, move your pointer to each of the boxes and click and release on the boxes to ensure that all of them are checked. Then move your pointer to the bottom-right of the window and press and release the "Install" button. If your Internet connection is unreliable, you may wish to install the updates one at a time. To do this, you make sure that only one box is checked, and then click and release on "Install", and let that one finish, and then check just one more box, and click and release on "Install", and then let that one finish, and so on. You may have to restart your computer from time to time while installing these updates. If so, after restarting, come back to the Software Update program by starting this step again, and keep on installing updates until there are none left.

    Eventually you will get a box with a message saying "Your software is up to date. Software Update doesn't have any new software for your computer at this time." When you see this box,click on "OK". If you don't see the box, then go back to the paragraph above and keep on installing updates.
    Before proceeding, make sure there are no more software updates for your computer.
    Now you need to update your EFI and SMC firmware. Use a web browser to go to the following website. If you're viewing this document electronically, you can click on the URL. [If you're not sure how to visit a website using a web browser, see Part 3.] Follow the instructions there. Look for your computer model and generation on the list. You should note the latest EFI and SMC versions for your machine, and ensure that they are installed.
    Before proceeding, make sure you have the latest EFI and SMC versions installed.
    Now you should install the latest Battery Update. Use your web browser to visit: Where it says "Search Support", there will be a rounded text entry box to the right. Move your pointer to that box, and click and release on it to get a cursor. Type in the phrase:
    Battery update
    and then press and release the "enter" key. You will need to do some detective work to figure out which battery update is the latest one that is suitable for your computer. You cannot harm your computer by trying to install a battery update that is not the correct one for your computer.
    Before proceeding, make sure that you have the latest battery firmware.
    Now you should install the latest Bluetooth firmware. Use your web browser to visit: Where it says "Search Support", there will be a rounded text entry box to the right. Move your pointer to that box, and click and release on it to get a cursor. Type in the phrase:
    Bluetooth firmware
    and then press and release the "enter" key. You will need to do some detective work to figure out which Bluetooth firmware is the latest one that is suitable for your computer. Check the requirements of the firmware update before downloading it and installing it. You need to have the correct version of OS X to be able to install the firmware. The latest update requires at least version 10.5, so if you're still on version 10.4, you can't install it. You'll just have to live without it. You cannot harm your computer by trying to install a Bluetooth firmware that is not the correct one for your computer, or your version of OS X.
    Before proceeding, make sure that you have the latest Bluetooth firmware, if possible.
    Now you should search for any other updates that you can apply to your computer. Use the web browser to go to: You should find any updates there that apply to your computer, and install them. Check the hardware and software requirements before downloading and installing any update.

    If you are in the habit of using any of the following components, there are firmware updates for them and you should search for them on the Apple Support website and install them: Mini Display to VGA Adaptor, Aluminum Keyboard, Airport Base station, Airport Express, and Time Capsule. Again, Apple usually requires that you have version 10.5 of OS X to be able to install any of these updates, so if you're using 10.4, you'll have to miss out.
    Before proceeding, make sure that you have updated your computer as much as possible.
    Now, there is a lot to get through in the following instructions, but nothing will cause a permanent change to your computer until you get to step 12. You are not risking harm to your computer until then. If, at any time, you wish to bail out of installing Ubuntu, you may do so. If you are in Ubuntu at any time and you want to abandon it, you always have the option of rebooting your computer into OS X. If you do so before step 12, you will not have caused any change in your computer.
    Step 3: Download the appropriate Ubuntu distribution.
    If you already have it, skip straight to step 4. To download the distribution, you're going to need a really good Internet connection. If your work or school has a faster connection, you should download it there instead of at home. Firstly, boot into OS X [see Part 3 if you're not sure how to do this] and launch a web browser. [again, see Part 3 if you're not sure]. Go to the website: The file that you are about to download has the suffix ".iso". This means that it contains a digital representation of what an Ubuntu installation CD is supposed to look like after that CD has been burned (created).

    Firstly, you should only pay attention to the top section, entitled "Desktop CD". There are other types of CD that you can download, but they aren't for an average user. In Step 1, you should have figured out if you have a 32-bit or 64-bit processor. If you have a 32-bit processor, you must download the one called "PC (Intel x86) desktop CD". If you have a 64-bit processor, you have the option of downloading the 32-bit one or the one below it, called "64-bit PC (AMD64) desktop CD".
    If you have an Intel Core Duo processor (without the 2 in the name), you must use the 32-bit (Intel x86) version. The 64-bit (AMD64) version won't work for you.
    I recommend downloading the 64-bit one if your processor can handle it. I have the 64-bit distribution installed on my MacBook and it works just fine. Note that MacBooks cannot handle some 64-bit types of Windows, but they can handle 64-bit Linux (Ubuntu is based on Linux). To download the distribution, click on the name of it (which is probably in blue), and then save the file to your desktop. If your Internet connection is slow, this could take ages.

    If it takes too long, the process could abort before it completes. The final downloaded file shoul
    d be almost 700 megabytes. If it appears to have downloaded and the file size is less than this, your connection may have failed prematurely. Some web browsers will not give you a clear warning if the file download is prematurely cancelled. If you have persistent trouble, you may wish to use a bittorrent client or a download manager, but they are beyond the scope of this guide. You may also try to get a USB or CD containing the .iso file from someone who already has it. Note that you must install Ubuntu from a CD. You cannot install it from a USB key unless you use advanced techniques that are beyond the scope of this guide.
    Before you proceed, make sure you have correctly downloaded the file and that it did not cancel prematurely.
    Step 4: Back up your internal hard disk.
    This is an essential step.
    A complete explanation of how to do this is beyond the scope of these instructions. Make sure you have a way to fully restore your computer's hard disk in the event of disaster. The most experienced computer users can make a mistake and ruin their hard disk layout. Also, the partitioning software used by Ubuntu unfortunately has a couple of known bugs. I use Carbon Copy Cloner to back up OS X. To find out how to use this program, use a web browser to view:
    Before proceeding, make sure that your OS X installation is fully backed up.
    A boot device is any piece of hardware that your computer can use to load an operating system. An internal hard disk is perfect for use as a boot device. An external hard disk is useful, but often slower. Unless you are using advanced techniques, the only operating system Macs can boot from an external hard disk or USB key is OS X. A Mac can boot any operating system from a CD, but a CD is very slow at randomly accessing data and it cannot be written to.

    You need to make a decision about whether to replace your internal hard disk's OS X installation with Ubuntu, or to keep OS X and install Ubuntu alongside it. If you decide to completely replace your internal hard disk OS X installation, you can still boot OS X from an external hard disk, USB key, or from a CD. You should retain some way of booting OS X. Firstly, you will need it to install firmware updates. Secondly, you will need it as a rescue disk in case Ubuntu fails to install correctly.
    Before proceeding, if you are intending to replace your internal hard disk's OS X installation with Ubuntu, make sure that you have a way of booting into OS X in an emergency.
    For advanced users: It is possible to clone your internal hard disk's OS X installation onto an external hard disk or USB key. If you choose this option, then that device can be used as your OS X rescue boot medium. Ensure that you can boot from the device before proceeding. On the other hand, you may use your OS X installation CD (that you got with your computer) as a rescue disk and create the backup as an image file such as a .iso file.
    Step 5: Burn the Ubuntu distribution to a recordable CD or DVD.
    [See Part 3 if you don't know how to do this] Burn the CD and verify the write. It will take twice as long, but it will ensure that it recorded correctly. Ensure that the CD is flagged as bootable.
    You should consider burning the CD at a slower speed than the maximum. Although it will take longer, it greatly increases the chance of a successful burn. While your computer is burning the CD, don't run any other software. Resist the temptation to surf the Web or do anything else while it is working. It can ruin the CD if you do.
    The distribution will fit onto a CD, but you can record it onto a recordable DVD if you like. Recordable DVDs are a little more expensive. I'll refer to it as a CD from now on, but if you recorded it on a DVD, treat it as though it were a CD.
    Don't delete the .iso file from your computer until you have successfully completed part 1 of these instructions, even though it is large and takes up a lot of space. Sometimes CDs don't burn correctly, and if you are unlucky you may need to get another blank CD and burn it again, so keep the .iso file for now.
    If your recording software gives you an error while burning your CD, you will have to throw that CD in the bin and use a new recordable CD. If you get an error, close down all non-essential software, set your burn speed lower and burn it again. If you're planning to delete your OS X installation entirely, then you will overwrite your copy of the .iso file as well. In this case, burn a second copy of the Ubuntu CD just in case the first one fails.
    I suggest that once you have burned the CD, you take a felt tip pen and write "Ubuntu 9.04" onto it. Write it on the side that is not recordable... the one that doesn't have the reflected shiny circular patterns. Don't attach a sticky label to your CD because it could unbalance it and make it wobble in the drive. If you ignore me and do put a sticky label on, you should at least put another one on to balance it up. Put the second sticky label on the same side of the CD, but on a part of the CD symmetrically opposite the first sticky label (on the other side of the hole). Do write a name onto the CD so that you know what it is.
    Step 6: Test your disc for defects.
    You should test your disc for defects even if you're an experienced operator, because anyone can get a bad burn (a CD that did not record properly through no fault of your own). If you have only just burned the CD, it was probably automatically ejected at the end, so shove it back in the drive. Boot to the Ubuntu CD. (Shut down your computer, then hold down the "alt option" key, and press the power button for two seconds to turn your computer back on, and keep the "alt option" key pressed until you get a picture of a hard disk and a picture of a CD, then move your mouse pointer to the CD and click and release on it.) [See Part 3 for a longer explanation.]

    The CD should start working, and your computer should look as though it's doing something. If you wait for a good five minutes and don't get the language selection menu, then something's wrong. Firstly, go back to step 5 to try burning the distribution again. Sometimes it doesn't work the first time. If it still doesn't work, go back to step 3 and redo the instructions starting from downloading the distribution again. If it still doesn't work, post a message to the forums explaining what's wrong. If the CD works, you should get a menu with a number of languages that you can select from. If you have a language selection menu, you're in business. Select "English" to continue with this tutorial. "English" is probably already highlighted, so just press and release the "enter" key. Note that you are only selecting the language with which to continue these instructions. You are not committing to permanently using Ubuntu with the English language.

    Your computer should engage in more activity. You should soon get a menu: Try Ubuntu without any change to your computer, Install Ubuntu, Check disc for defects, Test memory, Boot from first hard disk. If you don't get this menu, try going back to step 5 to try burning the distribution again. If that doesn't work, go back to step 3 and try downloading your distribution again. If you have the menu, use the arrow keys on your keyboard (at the bottom right of your keyboard) to go down the list, and highlight "Check disc for defects". Press and release the "enter" key. Your computer should give you a logo and say "Checking integrity, this may take some time". Wait a while. It took about 10 minutes on my machine. There is a progress bar that should move slowly but surely to the right.
    If your CD does not pass the examination, throw it in the bin, go back to step 5 and burn a new one. If the new CD still doesn't work, go back to step 3 and download the file all over again.
    At the end of the check, it should say "Check finished: No errors found" and "Press any key to reboot your system." Hold down the "alt option" key and press and release the space bar. Wait for your computer to give you a boot menu, and then release the "alt option" key. Boot into the CD again by moving your mouse pointer to the CD image, and clicking and releasing. If you accidentally boot into OS X, it's probably because you forgot to hold down "alt option". Shut down OS X and boot into the Ubuntu CD again. Select "English" again. You can probably do this just by pressing and releasing the "enter" key, since "English" will probably already be highlighted.
    Step 7: Check your computer's memory.
    If you're already sure that your computer's memory is working okay, you can skip this step. You should be at a menu that gives you the options: Try Ubuntu without any change to your computer, Install Ubuntu, Check disc for defects, Test memory, Boot from first hard disk. Use the arrow keys on your keyboard to highlight "Test memory", and press and release the "enter" key.

    The full test will take hours. It's not necessary to put your computer through all of this, though. There will be a progress meter at the top of the screen. By the time it reaches 2 or 3 percent, we can say that the test has passed. You should be able to press and release the "esc" key, at the top left of your keyboard, to end the test. However, on my computer, it was necessary to perform a hard reset. [See Part 3 for more info on what this means]. If you need to do a hard reset to get out of the memory testing program, don't worry about it. Your hard disk has not been affected.
    If you see any error messages while performing this test, then you need to fix your computer's memory before proceeding.
    In fact, in my experience, if your memory is bad, the test won't even start. If you can't get the memory test program to run, and your computer gives you repeated errors while performing other tasks, then you have hardware problems.

    Boot from the CD again. Select "English" again.
    Step 8: Test Ubuntu with your hardware.
    Any Intel-based MacBook or MacBook Air or MacBook Pro meets the minimum specifications for installing Ubuntu 9.04. The minimum specifications for Ubuntu are generally less than those for OS X. However, Ubuntu does have some hardware incompatibilities. These instructions will help you to fix some, but not all, of the incompatibilities. There are persistent issues with iSight, sound, the new MacBook Air, and Bluetooth and wireless connectivity. You may also have some additional hardware that you have bought and added to your machine. It is appropriate to test Ubuntu with your hardware configuration before committing to it.

    You should be at the menu: Try Ubuntu without any change to your computer, Install Ubuntu, Check disc for defects, Test memory, Boot from first hard disk. Use the arrow keys on your keyboard to highlight "Try Ubuntu without any change to your computer", and press and release the "enter" key. It will then load Ubuntu. You should get a desktop eventually. You can experiment with the desktop to see whether it works well on your computer. It will be rather slow, since it is operating from the optical drive (the CD or DVD drive) rather than your hard disk, but it is good enough to see whether Ubuntu will do what you want it to.

    If you get incompatibility problems, then you have a number of options. You may decide to use Ubuntu anyway, accepting the reduced functionality. Alternatively, if you were planning to completely replace OS X with Ubuntu, you may decide instead to install Ubuntu alongside OS X. You may choose to use Ubuntu in a virtual machine. You may choose a different distribution of Linux. You may choose to abandon Linux altogether.

    When you are satisfied that Ubuntu appears to work with your machine, shut down Ubuntu [look at Part 3 if you don't know how to do this]. Reboot into the CD again, then select "English" again.
    Step 9: Ubuntu installation steps 1 to 3: Basic options.
    Ubuntu has not touched your hard disk yet. It is only when you get to step 12 that you are committing yourself. If any part of this doesn't go as you want it to, you can bail out at any time without harming your computer. If needed, you could perform a hard reset. Use the arrow keys to go to the "Install Ubuntu" option, and press and release the "enter" key. Your computer may pause for about ten seconds here. You should then see a graphic of the Ubuntu logo, with the word "ubuntu" in lowercase, with a small dash moving back and forth underneath. If that dash stops moving for an extended period of time, then something's wrong. This process will take a minute. Be patient. Your moving dash should turn into a progress bar.

    You should eventually end up with a new language selection screen. At the top left of screen, you should see "Step 1 of 7". Select "English", or some other language if you would prefer to use that. If you do select another language, you will need to translate these instructions into your preferred language. If you wish, you may install Ubuntu in English and then change it later. Use the mouse or trackpad to move forward (press and release the "Forward" button at the bottom right). At the top left you should see "Step 2 of 7". You should now select which timezone you are in, by clicking on the map or selecting from the drop-down box below. Press and release the "Forward" button. Now at the top left you should see "Step 3 of 7", and "Which layout is most similar to your keyboard?". Select "Choose your own". In the box on the left hand side, select "USA". In the box on the right hand side, select "USA_Macintosh". There is a blank box down the bottom where you can click and start typing just to see if your keyboard works okay. Press and release the "Forward" button.
    Step 10: Ubuntu installation step 4: Decide on a partitioning scheme.
    Deciding on a partitioning scheme is critically important. A full explanation of partitioning is beyond the scope of this article. If you don't know much about it, you could select the default option, which allows you to boot both OS X and Ubuntu. You need to decide whether to keep OS X, so that you can use either OS X or Ubuntu, or you may decide to completely replace OS X with Ubuntu.

    For advanced users, I offer the following advice:
    A typical partition map will have sda1 as the EFI partition, sda2 as the OS X partition, sda3 as the Ubuntu partition, and sda4 as the Linux swap partition.

    Some users have reported instability with ext4, so it might be just as well to leave the Ubuntu partition as ext3. OS X puts the swapfile on its root partition, so leave a couple of gigabytes for that. A base installation of 64-bit Ubuntu on my system takes 2.7 Gigabytes, and an installation with plenty of options selected takes 3.5 Gigs. I have a 60 Gigabyte hard disk with OS X and Ubuntu, and I can fit them both on adequately. I don't have enough room to run Windows as well. If you have a hard disk with hundreds of gigabytes of space, then you don't need to worry about rationing storage space. Simply carve off a hundred gigabytes for Ubuntu.

    You should strongly consider adding an additional partition for use as swap space. The basic rule is to make the swap partition twice as large as the amount of RAM you have installed. It needs to be at least as large as your RAM in order to allow for hibernation. If you are short on storage space and need to choose which operating system gets your precious gigabytes, you should err on the side of giving
    OS X more disk space, since it uses storage space much more liberally than Linux.

    You will probably have a partition on your hard disk at the start known as the EFI partition. It has no function on an Intel-based Mac, although it is customary to have one and it may cause more harm than good for you to delete yours. If you're very low on space, you can delete this partition, but doing so may confuse any installation that relies on a particular numbering scheme. (Don't delete the partition AFTER installing
    Ubuntu, because plenty of configuration files within Ubuntu rely on a particular numbering scheme). The Ubuntu partitioner cannot resize the EFI partition. If you're planning to have a triple boot system with Windows and a Linux swap partition, it may be necessary to delete this partition so that Windows can be the fourth partition.

    Don't bother altering any of the partition flags. The boot flag is ignored by Intel-based Macs, so don't bother setting it. The msftres flag should not be set for any of your partitions. If you insist on installing Ubuntu on an external device, it is possible to install just the /boot component to your internal hard disk, and mount / (ie root) to your external device. The internal /boot partition can be as small as a hundred megabytes if you use this option.


    Unfortunately the
    Ubuntu partitioning software has a bug that causes it to sometimes leave the GPT and the MBR records of partitions out of sync. If you use the rEFIt program, you can resync the partitions easily from the boot menu. If you have version 10.5 or later of OS X, you can use Boot Camp from within OS X to create the partition and then select that partition at Ubuntu installation Step 4. If you intend to completely replace your internal hard disk contents with Ubuntu, then you might as well set up an ms-dos partition table instead of a GPT one. If you're going to erase your internal hard disk OS X installation, keep one on an external drive just in case.
    Before proceeding, double-check that Ubuntu is going to be installed to the correct partition.

    If you intend to keep your OS X installation on your internal hard disk, double-check that Ubuntu is NOT going to be installed to your OS X partition.
    Step 11: Ubuntu installation steps 5 to 7: More options.
    Step 5 of 7 has a number of self-explanatory fields to fill in. Make sure you don't forget your password! I suggest selecting "Log in automatically". It is a little less secure than requiring a password, since if someone steals your laptop they can log in without knowing your password, but it's inconvenient to have to type your password each time you log in. An experienced user can bypass the need for a password to get into your computer anyway. At step 7, make sure you click the "Advanced" button. "Install boot loader" should be checked. The idea is to install the boot loader on the partition that your Ubuntu installation is on. On my machine, it's /dev/sda3 (sda1 is the EFI partition, sda2 is the OS X partition, sda3 is the Ubuntu partition, and sda4 is the Linux swap partition).
    Before proceeding, double-check that the boot loader is going to be installed to the correct partition.

    If you intend to keep your OS X installation on your internal hard disk, double-check that the boot loader is NOT going to be installed to your OS X partition.
    Step 12: Install Ubuntu.
    Now is the moment of truth. If you proceed here, you will make permanent changes to your internal hard disk.
    Before proceeding, triple-check that you have a way of rebooting into OS X if something goes wrong. Triple-check that your internal OS X installation is properly backed up. Triple check that the boot loader is going to be installed to the correct partition.

    If
    you intend to keep your OS X installation on your internal hard disk, triple-check that Ubuntu is NOT going to be installed to your OS X partition.
    If you need to change anything about your partitioning after you proceed here, or if your installation aborts for any reason, it could be a royal pain in the butt, so make sure everything is perfect. I also suggest that if you have an Ethernet cable connected, you disconnect from the Internet. If you have it connected, your machine will pause to download updates from the Internet during the installation. Your machine may need hundreds of megabytes of updates, and if your Internet connection could fail during this process, you'll be left high and dry. Install the basic operating system before worrying about updates. Also, if your power fails during this, then this could create a headache, so make sure your battery is charged and your power cable is plugged in.
    Once you are certain that you're ready to go, cross your fingers and click and release on "Install".

    Now Ubuntu is being installed properly. This could take ages, particularly if you're partitioning your hard disk. Be patient. If you're partitioning your hard disk, it could take well over an hour. As long as the progress bar keeps moving, you're in business.
    If you get an error or if your computer freezes at any point during this installation, stop and ask for help on the forums, because your computer is in a vulnerable state during this installation process.
    Step 13: Reboot into Ubuntu.
    Presently you should get a light bulb picture with the message "Installation is complete. You need to restart the computer in order to use the new installation." Press "Restart Now". The CD should be ejected automatically. The computer will tell you "Please remove the disc, close the tray (if any) and press ENTER to continue". Remove the CD and hold down the "alt option" key, getting ready to choose Ubuntu at the next boot menu. Press and release the "enter" key. Keep the "alt option" key held down, and go on to Part 2.

    Note that if you kept OS X on your machine, then from now on, any time you reboot or turn on your computer it will automatically boot into OS X. If you want it to boot into Ubuntu, you need to hold down the "alt option" key while rebooting or powering on, then release it when you get a selection screen, and use your mouse or trackpad to click and release on the Ubuntu partition. You can get a boot selection screen without using the "alt option" key by installing a program such as rEFIt, but that is beyond the scope of these instructions.

    If you erased
    OS X from your internal hard disk, then your computer will automatically boot into Ubuntu. In future, you can attach an external hard disk or USB key that has OS X on it, and use the "alt option" key to get a boot menu that will allow you to boot into OS X.
    Now you should have a working copy of Ubuntu on your system! In the next post, I will describe how to configure it to work properly on a Mac laptop.
    Last edited by Richardcavell; September 8th, 2009 at 01:08 AM. Reason: Update for Snow Leopard

  2. #2
    Join Date
    May 2009
    Location
    Lytham St Anne's, England
    Beans
    119
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Thumbs up Re: How to Install Ubuntu 9.04 on an Intel-based Mac laptop

    How to install Ubuntu 9.04 on an Intel-based Mac laptop, by Richard Cavell v1.1. (June 2009)

    Part 2 of 3

    Okay, now you have Ubuntu installed. You're now going to configure it to work with your Mac.

    Every time you power on or restart your computer, if you want to use Ubuntu, you need to hold down the "alt option" key while you do so. If you did not come here from Part 1, then power on or restart your computer while holding down the "alt option" key now. Keep the "alt option" key held down until you get the boot menu. It might take a minute to appear. Now release the "alt option" key.

    After you have blessed the Ubuntu partition in the next step, your boot menu will appear much quicker. However, if you try to get the boot menu while you have an external hard disk or USB key attached, or a CD or DVD in the drive, it will slow the process down. This is because your computer will habitually search each of those items for a bootable operating system before giving you the boot menu.

    The boot menu gives you all of the devices and partitions that you can boot from. Typically, this will include any internal hard disk partitions that have operating systems installed. If you chose to keep OS X on your internal hard disk, you should see it now. It will appear as a grey image of a hard disk, and have a label. You should have noted the name of your OS X installation in step 1 of Part 1. The default label is "Macintosh HD". You may have changed the label. You should still be able to recognize this as your OS X installation.

    You should have an Ubuntu installation, either beside or instead of the OS X installation. This partition may be labelled "Windows". If it is, don't worry about it. The Apple firmware is unable to tell the difference between Windows and Linux, that's all. You can improve on this by installing rEFIt, which can tell the difference and label the operating systems properly, or you can just learn to live with it. If you happen to have an external hard drive or USB key connected, or a CD or DVD in the drive, you may also see icons that give you the option of booting to one of them instead.
    Before proceeding, confirm that your internal hard disk partitions are laid out the way you intended.
    Step 1: Bless the Ubuntu partition
    If you have chosen to erase OS X from your setup altogether and have no way of booting into OS X, you can skip this step.

    If you have kept OS X on your internal hard disk, use your mouse or trackpad to move your pointer to the OS X partition and select it by clicking and releasing, and then skip the next paragraph.

    If you have erased OS X from your internal hard disk but kept it on a USB key, external hard disk, then plug in the USB key or external hard disk now (if it's not already plugged in). If you kept OS X on a CD (including your primary OS X installation CD that came with your computer), shove the CD in the drive now if it's not already in. If you only just attached the OS X USB key or external disk, or put the OS X CD in the drive, your computer may take up to a minute to examine it before adding it to the menu. You may also need to reboot once more for your computer to recognize the OS X installation (hold down "alt option" and use your power button at the top right of the keyboard - see Part 3 for more info). When your boot menu sees your OS X installation, use your mouse or trackpad to move your pointer to the OS X installation and select it by clicking and releasing.

    Your computer should boot into OS X. It should work the same way that it did before. If you kept it on your internal hard disk and resized the partition, it may have less space available on the internal hard disk than it did before, but it should still work fine.
    Before proceeding, ensure that OS X is still working.
    OS X cannot ordinarily read and write to a Linux partition, since they use different file systems. Resist the temptation to try to examine your Linux partition within OS X, or else you might break something. If you run into trouble while trying to set up Ubuntu, remember that you always have the option of rebooting into OS X.

    You need to open up a terminal now. To do this, move your pointer down to the middle of the bottom edge of the screen. The Dock should appear. On the left hand side will be a kind of Cubist face. If you move your pointer over the face, the word "Finder" should appear above it. Click and release on the face. A window should appear. On the left side of that window, you should find an item called "Applications". Click and release on that. Now you should have a list on the right hand side of all the applications on your OS X installation. You need to find the item called "Utilities". Your applications will probably be in alphabetical order, so you may need to use the scrollwheel on your mouse or use the scrollbar to the right of the Finder window. When you find the Utilities folder, double-click on that folder. A new list of utility applications should appear. Find the item called "Terminal", and double click on that.

    You should now get a window called "Terminal - bash - 80 x 24". It will contain some text. Type the following command:
    Code:
    diskutil list
    and then press the "enter" key. You should get a list of your partitions. It will look something like this:

    /dev/disk0
    #: type name size identifier
    0: GUID_partition_scheme *55.9 GB disk0
    1: EFI 200.0 MB disk0s1
    2: Apple_HFS OS X 35.9 GB disk0s2
    3: Microsoft Basic Data 16.9 GB disk0s3
    4: Linux Swap 2.9 GB disk0s4
    This is my partition map. The Ubuntu partition is labelled incorrectly as "Microsoft Basic Data". That's just because OS X cannot properly interpret the Linux partition type. On my system, Ubuntu is on the "disk0s3" partition. Find out what the identifier is for your Ubuntu partition. Now type the following command, but replace the "disk0s3" part with the name of your Ubuntu partition's identifier:
    Code:
    sudo bless --device /dev/disk0s3 --setBoot --legacy
    and then press the "enter" key. It will probably ask you for your OS X password, so type your OS X password and press the "enter" key.

    Now you need to consider whether you wish to be able to access your files in your home directory on the OS X partition while you are logged into Ubuntu. By default, Ubuntu will not allow you to access anything that is owned by your OS X username.

    My OS X username is "richard", and my home directory is "/Users/Richard". Your username and home directory are probably named differently. In general, your OS X files live in your OS X home directory and can only be accessed by a person logged into OS X under your username. However, if you follow these instructions you'll be able to access those same files when you are logged into Ubuntu as well.

    If you don't care about accessing your OS X home directory's files from within Ubuntu, then skip to the last paragraph of this step where it says "Now restart your computer...".

    While you're in the OS X Terminal, type the following command:
    Code:
    id -u
    and press and release the "enter" key. Note the number that the Terminal gives you. It is probably just over 500. This is your OS X user ID. Now type:
    Code:
     id -g
    and press and release the "enter" key. Note the number. This is your OS X group ID. If you are using 10.4 (Tiger), it is probably the same as your user ID. If you are using 10.5 (Leopard) or 10.6 (Snow Leopard), it may be equal to 20.

    Now restart your computer, while holding down the "alt option" key. [See Part 3 if you're not sure how to restart.] You should now have that boot menu again. Release the "alt option" key.
    Step 2: Resync your partition tables (if necessary).
    You should have a boot menu. Use your mouse or trackpad to move your pointer to the Ubuntu partition. It may be incorrectly called "Windows". Select it by clicking and releasing. You are now attempting to load Ubuntu.

    The rest of these instructions must be done from within Ubuntu. While following these instructions, if you boot into OS X accidentally, just restart the computer and boot into Ubuntu. If you run into a roadblock while trying to follow the instructions below, you always have the option of rebooting into OS X to save your bacon. You can access the Ubuntu Forums from OS X. If you chose to keep OS X on your hard disk, it should still work the same as it did before.

    Your computer should engage in some activity. Presently one of two things will happen. If your computer gives you a text screen with a box, and a list of items, and the top one looks something like "Ubuntu 9.04, kernel 2.6.28-11-generic", then your partition tables are synchronised, so skip the next paragraph.

    Alternatively, your computer may give you the message: "No bootable device -- insert boot disk and press any key", or simply give you a black screen with a blinking cursor at the top left. If it does, the problem is that the partitioning software in the Ubuntu installer has left your MBR and GPT tables out of sync. It is a known bug in the software, and it seems to be common with Intel-based Mac laptops. It does not mean that there is anything wrong with your Ubuntu installation. Don't panic, and don't mess with the Ubuntu partition. What you need to do is to resync the tables. One way to do this is to reboot into OS X, install rEFIt, and use its gptsync.efi utility. How to do this is beyond the scope of this guide.
    If you do not get a kernel selection menu, resync your partition tables before proceeding.
    If you needed to resync your partition tables, reboot your computer holding down "alt option", and then select the Ubuntu partition by clicking and releasing on it with the pointer.

    You should get a text screen with a box, and a list of items. The top one will look something like "Ubuntu 9.04, kernel 2.6.28-11-generic". Notice that below it is the same thing with the phrase "(recovery mode)" added. You should remember that the recovery mode is there for future reference. Sometimes if your Ubuntu installation won't boot properly the normal way, the recovery mode will allow you to boot. There is a timer in the lower right corner of the screen.

    The top item will be the default option. You can press and release the "enter" key or let the timer run down.

    If you selected "Log in automatically" when you were installing Ubuntu, you won't get a login window. If you didn't, then you will see a login window. It is mostly black and has a 3D Ubuntu logo in the lower right corner. It will have a white text box in the middle of the screen. It will first ask you for your username, so type that in and press and release the "enter" key. Then it will ask you for your password, so type that in and press the "enter" key.

    Your computer should boot to a desktop. As this is the first time, it may be a little slow. As long as it looks like it's doing something, let it proceed. If you never end up getting a desktop, ask the Forums for help. There is a startup sound that normally plays when (if) you get a login screen, and also when the Ubuntu desktop is booted. These sounds may be quite soft or entirely absent for you right now, since your sound setup still needs to be configured.

    Your trackpad is likely to be a little awkward to use at this point, since it has not been configured yet. We will fix it up later. For now, it would help if you plug in a USB mouse and use that instead, temporarily.

    The rest of these instructions are performed in the Ubuntu desktop. If you want to take a break while following them, you may do so. To do this, go to the top right of the screen where you will find your name and a power symbol. Click and release on this and then click on the "Shut Down..." option. You will get a window called "Shut Down". Click and release on the "Shut Down" button. Then when you come back to your computer the next day, hold down the "alt option" key while you press the Power key at the top right of your keyboard. Keep the "alt option" key held down until you get the boot menu, and then release it. Select the Ubuntu partition (which may be called Windows). Select the topmost kernel and log in if necessary, get to a desktop, then continue where you left off.
    Step 3: Modify your Ubuntu user ID and group ID to match your OS X user ID and group ID.
    You only need to do this step if you have kept OS X on your setup and you intend to access your OS X files from within Ubuntu. If you have no desire to access your OS X files (particularly your home directory) from within Ubuntu, then skip this step.

    You should have obtained your OS X user ID and group ID from step 1 above. If you didn't, then reboot into OS X and get them now. If you need to perform this step, refrain from doing any other activities (such as surfing the Internet) until it is complete, and don't skip ahead to subsequent steps until it is done.
    If you need to do this step, wait until you have completed this step before proceeding with these instructions. Don't skip ahead!
    You need to do this step from within a Terminal window. To use the Terminal, go to the top-left of your screen and select the "Applications" menu by clicking and releasing on it. Hover over the "Accessories >" menu item, and select "Terminal" from the drop-down list by clicking and releasing on it. A window should appear with a prompt. My prompt is "richard@richard-laptop:~$". Your prompt will be something different, depending on what you called yourself and your computer when you installed Ubuntu. The window will also be named after the prompt. Notice that it's similar in some ways to the Terminal that you get in OS X. However, you need to follow these instructions in the Ubuntu one, not the OS X one. Notice also the dollar sign that is to the left of the blinking cursor. This means that the Terminal is prompting you for a command. Whatever appears to the left of that dollar sign is for your information only. Whenever you have that dollar sign, you can type a command. Make sure you don't type a command when you don't have the dollar sign, because it won't do what you want.

    (Advanced users may note that Linux user ids should be over 1000, so it is arguably more elegant to alter the OS X user and group ids. However, novices could lose access to their OS X data and not know how to get it back if they try this. The method given here does not carry that risk.)
    Read the following instructions carefully and make sure you substitute the appropriate elements in the commands.

    Resist the temptation to engage in non-essential activities, such as surfing the Internet, while doing the rest of this step.
    Type the following command. However, replace the number "501" with your OS X group ID. It is likely to be either 20, or a number just over 500. Also, of course, replace the name "richard" with whatever your Ubuntu login name is. Your login name is to the left of the @ symbol in your prompt.

    Code:
    sudo groupmod -g 501 richard
    and then press and release the "enter" key. You will probably be asked for your password, with the following text, though of course your username will probably be different to mine:
    [sudo] password for richard:
    So type your password and the press and release the "enter" key. You should get a prompt back almost straight away. Now type the following command, but replace the first number "501" with your OS X user ID, and replace the second number "501" with your OS X group ID, and replace the name "richard" with your Ubuntu login name...

    Code:
    sudo usermod -u 501 -g 501 richard
    ...and press and release the "enter" key. Your computer will pause for a second before giving you another prompt. Now type the following command:
    Code:
    exit
    and press and release the "enter" key. The Terminal window should disappear. If you have any other programs open, close them down now. Now go to the top-right of your screen, and click and release on your name at the top-right corner. A drop-down menu will appear. Select "Log Out..." by moving your mouse pointer to it and clicking and releasing. You will get a window called "Log Out" with a timer in it. Click and release on the "Log Out" button in the lower-right corner. At some point you may get a message in the top left of your screen that says "A program is still running:" If you do, just click on "Logout Anyway" at the lower right corner. Your computer should give you a login screen. It will prompt you for your username. If you have selected automatic login, you won't usually see this screen when you boot up, and all you need to do now is let the timer run down. If you have not selected automatic login, type your username and press the "enter" key. It will then ask for your password, so type that and press the "enter" key.

    When you are logged back in, open up another Terminal window by going to the top-left of your screen, and selecting "Applications", then "Accessories >", then "Terminal". Within the Terminal, type the following command. However, replace the name "richard" with your login name. The login name probably does not start with a capital letter. Note the rightmost character here is a tilde. It is typed on a Mac keyboard by holding down the shift key and pressing the button that is above "tab" and below "esc" at the top-left of the keyboard. Note also that the "-R" part of this command contains a capital R, not a lowercase r.

    Code:
    sudo chgrp -R richard ~
    Now press and release the "enter" key. You will have to type your password and press and release the "enter" key. You should get a prompt back.

    You should now be able to look through your home directory on your OS X partition without running into "Permission denied" errors. You can look through your OS X partition by going to the "Places" menu at the top of your screen, to the right of "Applications", and clicking and releasing on it, then going down to its name on the list and clicking and releasing on its name. It is probably under the "Computer" icon. You will have to type your password to bring it up (to "mount" it in Linux jargon), as a precaution against accidents.

    Within the Terminal window, type the following command and press and release the "enter" key:
    Code:
    exit
    The Terminal window should disappear.
    Step 4: Add the Mactel repository to your Software Sources.
    Now connect to the Internet. If you unplugged your Ethernet cable in Part 1, put it back in. It may take your computer a few seconds to realise that it's plugged in. You should see a dark translucent box come up at the top right of the screen that says something like "Auto eth0 connection established". If you don't, then fix your Internet connection. You should see an icon appear at the top-right of the screen that looks like two dark computer screens. If your Internet connection drops out, this may change to a symbol that looks like two circles with a blue comet swirling around them.

    You should be within the Ubuntu desktop. At the top-left of the screen, you will see three menus: Applications, Places, System. Use your mouse or trackpad to go to the "System" menu at the top of the screen. Click and release on it, and then move your pointer down to "Administration >", which will be the second option. A list of further menu subitems will appear. Move your pointer into this list, and go down the list to "Software Sources", and click and release on it. You may be asked for your password at this stage. If so, type in your password and press the "enter" key.

    A window will appear, with the title "Software Sources". It will have five tabs, called Ubuntu Software, Third-Party Software, Updates, Authentication, Statistics. Click and release on the tab near the top of the window marked "Third-Party Software". Now the window will change. Click and release the "+Add..." button at the lower left. A new window will appear, called "Enter the complete APT line of the repository that you want to add as source". Now type the following: and press and release the "enter" key. The new window will disappear, and you'll be back at the Software Sources window. You should notice that you now have a new item in your Third-Party Software list. Now click and release on the "Authentication" tab near the top right of the "Software Sources" window. The contents of the Software Sources window will change again. Leave that open, and click and release on the Firefox logo at the top of the screen. It is to the right of the System menu, and to the left of the envelope icon. Go to this website: [see Part 3 to see how to visit a website] When it has loaded, a few lines down you will see the text:
    Signing Key: 1024R/2B97B7B8 (What is this?)
    Click and release on the "1024R/2B97B7B8". You should see a new webpage appear. The first two words will be "Search results", and the page should contain the phrase:
    pub 1024R/2B97B7B8 2009-01-19 Launchpad PPA for Mactel Support
    Click and release on the "2B97B7B8". A new page should appear, called "Public Key Server -- Get ``0x8db7f87a2b97b7b8 "", with what looks like random letters and numbers. This is normal. Click and release your mouse or trackpad somewhere among the letters and numbers. Hold down the Ctrl button that is three to the left of your spacebar. Press "A". The text should now turn orange. Keep holding down Ctrl, and now press "C". Now release the "Ctrl" key.

    Point your mouse up to the top left most menu on your screen, which is "Applications". Click and release on this. Move your pointer down to "Accessories >", which will be the first menu item. Hover your mouse pointer over this. A drop down submenu will appear. Go to "Text Editor" in the drop down menu, and click and release on it. You should see a basic word processor appear. It will be called "Unsaved Document 1 - gedit". Hold down the Ctrl key, and press "V", then release the Ctrl key. The text that you saw before should appear in the word processor. Use your mouse to select the "File" menu at the top left of the word processor, and then select "Save As..." from the menu items by clicking and releasing on it. A dialog should appear. To the right of "Save in folder:", there will be a box that allows you to choose from a number of options. If it's not already selected, choose "Desktop" by clicking and releasing on the box, moving your pointer to "Desktop", and then clicking and releasing on it. Go up to "Name:", and click and release in the box to the right of it. Type:
    Mactel key.txt
    Now click "Save" in the lower right corner of that box. Exit the text editor by clicking and releasing on the "X" in the top-right corner. Exit Firefox by clicking and releasing on the "X" in its top-right corner. Go back to the "Authentication" tab in the "Software Sources" window. Click and release on "+Import Key File..." in the lower-left corner. Find your desktop. It is likely to be highlighted in orange at the top, so double-click on it. Then double-click on the "Mactel key.txt" file, which is likely to be the only file on the list. Back in your "Software Sources" window, you should now see that your list of "Trusted software providers" includes an additional item, called "Launchpad PPA for Mactel Support". If it appears, then this step has succeeded. If it does not appear, then something went wrong. Don't close the window yet. If the "Launchpad PPA for Mactel Support" message appeared, then take note that the file called "Mactel key.txt" is no longer needed. You can delete it later.
    Before you proceed, ensure that you have added the Mactel repository successfully.
    Step 5: Update your packages list.
    If your Software Sources window is still open, move your pointer to the "Close" button at the lower-right of that window, and click and release. Your computer will probably give you a dialog box telling you "The information about available software is out-of-date." If it does, then click and release "Reload" at the bottom of the dialog box.

    If you don't get this message, or you didn't come from the Software Sources window, then go to the "System" menu at the top of your desktop and click on release on it, then hover your pointer on the "Administration >" menu item, then select "Update Manager" in the drop-down list by clicking and releasing on it. You should now get the dialog box telling you "The information about available software is out-of-date." If it does, then click and release "Reload" at the bottom of the dialog box. If you still don't get this message, then within the Update Manager window, click and release on the button marked "Check", with a blue curling arrow to the left of the word "Check".

    You may be asked for your password. If so, type it in and press the "enter" key.

    It should say "Downloading package information". Make sure the progress bar moves every so often. If it doesn't, then your Internet connection may be unreliable. This step may take ages - on a high-speed ADSL connection, this took half an hour for me. As long as it's progressing, just let it do its thing. It will become much faster in future. If your connection drops out, just begin this step again, and keep on doing so until there is nothing left to download.

    When you have fully downloaded all of the package information, your Update Manager window will contain the text "The package information was last updated less than one hour ago."


    Note that if you become curious and look at "Show for individual files", and see that some of the files come up as "Failed", that's not a bad thing as long as some of them come up as "Hit" or "Done". In my case, because I am in Australia, Ubuntu looks for Australian English translations of several text files, and no one has bothered to provide translations into Australian English. That is no great loss.
    Step 6: Update your Ubuntu installation.
    At one point during this update process, your screen may turn off completely. If it does, press the brightness up button (which is F2 on my keyboard) to get it back.

    You should have the "Update Manager" window open, and you should have updated your package list within the last 5 minutes. If not, then go back to the previous step and do it again.

    Now press and release "Install Updates" to the right of the "Check" button in the middle of the "Update Manager" window. Your computer will proceed to download updates now. This could take ages if your Internet connection is slow or unreliable. Please note that if your connection fails, you should just go back to the previous step and start again. It will resume where it left off, so you won't lose anything that has succeeded so far. If at any time you wish to shut your computer down for the day and pick up again tomorrow, you may do so. Again, whatever you have achieved so far will stay put, so you will not lose anything by shutting down overnight.

    Presently your computer will start to apply the updates. Your computer may have to restart at some stage during this part. Just do as it requests, and when you restart, remember to hold down "alt option". Then go back to the previous step. Your computer may also ask for your password at some stage. Again, just do as it requests.

    Keep installing the updates until the box at the top of the Update Manager window is empty. Once you have installed all the updates, you should go to the Update Manager window and press "Check" again, to see if anything slipped through the net, and keep on installing updates until the upper box is completely blank. Once you have installed every update, reboot your computer and boot into Ubuntu. (Remember to hold down "alt option").
    Before you proceed, ensure that your package list is up to date and that your Ubuntu installation is fully updated.
    Step 7: Turn on sound output and turn up the sound output volumes.
    A default Ubuntu installation is pretty quiet on a Mac laptop. Also, the headphone out jack has zero volume by default, so if you like to plug in headphones or a some other audio device, you won't hear anything until you complete this step.

    There will be a speaker icon at the top right of your desktop, to the left of the current date. Click and release on that. A window should appear with a "Volume Control" button. Click and release on that. A window should appear. Its title will be "Volume Control", perhaps with a colon and some extra text.

    Click and release on the "Preferences" button at the bottom. A new window should appear called "Volume Control Preferences", though the window is narrow and perhaps not all of the title bar will be displayed on your machine. There is a list of items, each with a box to the left that either has a check mark or doesn't have a check mark. If anything is checked, leave it checked. Scroll up and down this list and look for "Capture" and "Surround". If you see one or both of them, make sure that they are checked. Now press and release the "Close" button at the bottom-right.

    Back in the "Volume Control" window, select the "Playback" tab at the top left (below the word "Device:") if it is not already selected. There is a series of sliders. Make sure every one of them is pushed all the way to the top. At the bottom of each slider is a speaker icon. There may be a tiny prohibition symbol superimposed over the speaker icon, indicating that the function is muted. Click on any speaker that has a prohibition symbol to unmute all the functions. Now click on the "Recording" tab, which is immediately to the right of the "Playback" tab. Push the sliders to the top and unmute the speaker if necessary. If the microphone icon has a small "X" superimposed, click on it to remove the "X". Now press and release "Close" at the bottom right of the window.
    Click and release on the System menu at the top of the screen, and move the pointer down to the "Preferences >" menu item. Select "Sound" from the drop down menu list by moving the pointer to it, and clicking and releasing. A new window will appear called "Sound Preferences". The topmost three items will be called "Sound playback:". To the right hand side of each is a button called "Test". For each of the top three items, click on the "Test" button, and ensure that you hear a sound, and that its loudness is comparable to the loudness of OS X. Press "OK" when you are satisfied with the sound.

    If you are in the habit of using your headphone jack, plug headphones or some other audio device in and test the headphone jack output by clicking any of the "Test" buttons. When you are happy with the volume level, press "OK".

    If any of your sound output tests do not work, or if the sound is too soft, do this step again and ensure that every relevant option is switched on, that all speakers are unmuted, and that all sliders are at maximum.
    Step 8: Set up Sound Capture.
    If you don't intend to ever use the microphone on your laptop, you can skip this step.

    If the "Sound Preferences" window is not already open, open it by using your pointer to point at the "System" menu and click and release on it, then hover your pointer over "Preferences >", then click and release on "Sound" from the drop down menu.

    The fourth item is called "Sound capture:". To the right of this is a box with some text in it. Press your mouse button or trackpad button or trackpad on this box and mouse up or down to select "ALSA - Advanced Linux Sound Architecture", then release. You should see "ALSA - Advanced Linux Sound Architecture" in the box.

    Click and release the "Test" button to the right of the box. Now put your fingers near your laptop microphone (which is probably at the top of your LCD screen) and click your fingers next to the microphone a few times. You should hear it echo. When you know that it's working, press and release "OK" to finish that, and then press and release "Close" at the lower right of the "Sound Preferences" window.
    Step 9: Uninstall the mouseemu package.
    Apple mice and touchpads generally only have one button. Mouseemu is a package that allows you to create a middle-click or right-click using the keyboard. When mouseemu is installed, pressing F11 is the same as pressing the middle mouse button, and pressing F12 is the same as pressing the right mouse button. Mouseemu is installed by default. You can try generating mouse clicks using F11 and F12 to see how it works.

    However, mouseemu has some incompatibilities. Although at the moment your "caps lock" key will correctly toggle on and off to generate all-capitals, the little light on the key will not illuminate to tell you when caps lock is on. Mouseemu can cause your mouse pointer to do some strange things. Also, it is incompatible with the xmodmap techniques used in these instructions, which allow you to map the unused keys on your keyboard. You can simulate mouse clicks in a more sophisticated way using that xmodmap technique if you follow these instructions. So I suggest getting rid of mouseemu.

    For the next few steps, you are going to use the Terminal to modify your packages. Some users may choose to use Synaptic package manager for these tasks, but if you're not sure what that means, stick with these instructions. Don't be scared of the Terminal.

    To use the Terminal, go to the top-left of your screen and select the "Applications" menu by clicking and releasing on it. Go to the "Accessories >" menu item, and select "Terminal" from the drop-down list by clicking and releasing on it. Type:
    Code:
    sudo apt-get remove mouseemu
    and press and release the "enter" key. Type your password and press and release the "enter" key if it asks you for your password. Also, type "Y" and press and release the "enter" key if your Terminal prompts you to at some point.

    It may take a few seconds for this package to be uninstalled. Wait until you get another prompt before continuing. You may now experiment with your "caps lock" key and notice that the light now works properly.

    While you're here, if you still have the Mactel key on your desktop, you can remove it now. If you deleted it already, then move on to the next step. Type:
    Code:
    rm ~/Desktop/"Mactel key.txt"
    (with the quotes), and press and release the "enter" key. You should see it disappear from your desktop.
    Step 10: Install the Mactel packages.
    Connect to the Internet if you're not already connected.

    The Mactel packages enable your function keys to act as brightness up/down hotkeys and volume mute/down/up hotkeys. They enable your eject key. If you have a keyboard backlight, perhaps with an ambient light sensor, they will be enabled too.

    Advanced users may note that applesmc-dkms and bcm5974-dkms do not need to be installed for some users and will provide no benefit. However, it does not hurt to install them. Also, these packages may not be suitable for version 9.10 (Karmic) and later of Ubuntu, which is due for release in October 2009.

    Within the Terminal, type:
    Code:
    sudo apt-get install pommed applesmc-dkms bcm5974-dkms
    and press and release the "enter" key. Type your password if necessary, and press and release the "enter" key. If it asks you to, type "Y" and press and release the "enter" key.

    Your screen may go blank. If so, you can get it back by pressing the brightness up key, which on my keyboard is F2. You will see all sorts of interesting messages appear in your Terminal window. Let it work. It will take a minute.

    Wait until you get the following message:
    DKMS: install Completed.
    and another prompt before continuing.

    Press your brightness up and brightness down keys (which are F1 and F2 for me), to see that you can alter the brightness. Note that it may behave chaotically right now, sometimes going brighter when you hit brightness down and sometimes going dimmer when you hit brightness up. We'll fix that later. For now, just make sure that the function keys can alter the brightness of your screen.
    Step 11: Install the X11 utilities packages.
    You will need these packages to make your keyboard's extra keys do something useful.

    These packages are installed by default on a standard installation of Ubuntu, so if you have downloaded the desktop CD and installed it as described in Part 1, you should already have these packages. However, just in case you got here from installing a remix (a modified Ubuntu installation), here are the instructions.

    Get a Terminal window open if you don't already have one. Type:
    Code:
    sudo apt-get install x11-utils x11-xserver-utils
    and press and release the "enter" key. You may need to type your password and press and release the "enter" key, and you may need to type "Y" and press and release the "enter" key when requested to do so. Wait until you get another prompt before continuing. If you used a default installation, it won't need to download or install anything.
    Step 12: Fix GNOME Chess' 3D mode (only if you wish to play Chess in 3D mode).
    A default installation of Ubuntu includes a chess game called GNOME Chess. You can find it in your "Applications" menu, under the "Games >" menu item, listed as "Chess". GNOME Chess includes a 3D mode. If you are not interested in playing Chess in 3D mode, then you can skip this step.

    If you are interested in playing chess using the 3D mode, then you need to install some extra packages. One of the packages that needs to be installed (mgltools-opengltk) is not correctly documented within GNOME Chess, and you will get unexplained errors if you don't complete this step.

    Get a Terminal window open if you don't already have one. Type:
    Code:
    sudo apt-get install python-gtkglext1 python-opengl mgltools-opengltk
    and press and release the "enter" key. You may need to type your password and press and release the "enter" key, and you may need to type "Y" and press and release the "enter" key when requested to do so. Wait until you get another prompt before continuing.
    Step 13: Install the hfsprogs package (only for advanced users).
    This step is only for advanced users. Do you know what fsck and mkfs are? If you don't know what they are, then skip this step. You will not miss out on anything.
    This package will give you fsck and mkfs for the HFS and HFS+ file systems, so it will allow you to manipulate OS X partitions from within the Ubuntu Terminal. You will end up with four new commands: fsck.hfs, fsck.hfsplus, mkfs.hfs, and mkfs.hfsplus. If you have no desire to perform these actions from within Ubuntu, then skip this step.

    Get a Terminal window open if you don't already have one. Type:
    Code:
    sudo apt-get install hfsprogs
    and press and release the "enter" key. You may need to type your password and press and release the "enter" key, and you may need to type "Y" and press and release the "enter" key when requested to do so. Wait until you get another prompt before continuing.
    Step 14: Install the hfsplus package (only for advanced users).
    This step is only for advanced users. Do you know what ls, mount and mkdir are? If you don't know what they are, then skip this step. You will not miss out on anything.
    This package will give you a number of commands for the HFS and HFS+ file systems, so it will allow you to manipulate OS X partitions from within the Ubuntu Terminal. You will end up with nine new commands: hpmount, hpumount, hpls, hpcd, hpcopy, hppwd, hpfsck, hprm and hpmkdir. If you have no desire to perform these actions from within Ubuntu, then skip this step.

    Get a Terminal window open if you don't already have one. Type:
    Code:
    sudo apt-get install hfsplus
    and press and release the "enter" key. You may need to type your password and press and release the "enter" key, and you may need to type "Y" and press and release the "enter" key when requested to do so. Wait until you get another prompt before continuing.

    For really advanced users, you may be interested in investigating the hfsutils package. It deals only with HFS volumes (not HFS+), and offers little advantage over hfsplus. However, it does have one command (hattrib), which is an equivalent of the OS X setfile command. Hfsplus does not have an equivalent of setfile. This hattrib command allows you to change file attributes on your HFS volumes from within Ubuntu. This means that you can bless files from Ubuntu. If this is important to you, you should install hfsutils.
    Step 15: Install the airport-utils package (only if you have an external Airport base station).
    Do you have an external Airport base station, Airport Express, Airport Extreme or Time Capsule attached to your Apple laptop? If you don't own any of these devices, or you don't know what they are, then skip this step. You will not miss out on anything.
    This package will give you a number of programs to manage your Airport from within Ubuntu. If you have no desire to perform these actions from within Ubuntu, then skip this step.

    Get a Terminal window open if you don't already have one. Type:
    Code:
    sudo apt-get install airport-utils
    and press and release the "enter" key. You may need to type your password and press and release the "enter" key, and you may need to type "Y" and press and release the "enter" key when requested to do so. Wait until you get another prompt before continuing.
    Step 16: Install software for your iPod or iPhone (only if you have one).
    If you don't own an iPod or iPhone, you can skip this step.

    If you have an iPod or an iPhone (which contains iPod functionality), you may wish to install software to allow you to perform various functions from within Ubuntu. There are countless dozens of packages that provide all kinds of iPod utilities. It's up to you to find which packages you want to use. If you don't wish to manipulate your iPod from within Ubuntu, you can skip this step.

    Click and release on the "System" menu at the top of your screen, then hover over "Administration >", and select "Synaptic Package Manager" from the drop down list. If you are asked for your password, type it in and press and release the "enter" key. A new window will appear entitled "Synaptic Package Manager". On the left hand side, below the "Reload" button, there is a list of options. Ensure that the top one, "All", is selected.

    At the top of the screen is a "Quick search" box. Type:
    ipod
    into the Quick search box and press and release the "enter" key. Scroll through all the packages that are available and see whether any of them appeal to you. If so, you can install them by clicking and releasing on the box to the left of the package's name, and then selecting "Mark for Installation" from the menu that appears. When you are finished selecting which software you want, you can then install it by clicking on the "Apply" button at the top of the window.

    While the Synaptic package manager is open, you won't be able to do any package work from the Terminal. You'll have to do package work using the package manager, or else close the package manager before using the Terminal. So if you're done using Synaptic package manager, close it by clicking the "X" in the top-right corner.
    Step 17: Install other optional packages.
    You may wish to install some of the following packages, which I find useful. All of them are free. In all cases, go to a Terminal and type:
    Code:
    sudo apt-get install name
    where "name" is the name of the package in question, and then press and release the "enter" key. You may need to type your password or type "Y" at some point, remembering of course to press and release the "enter" key afterwards.

    - boinc-manager and boinc-client, software that allows you to participate in distributed computing
    - clamtk, a virus scanner
    - dclock, a digital clock with an alarm
    - firestarter, a firewall
    - gkrellm, a system monitor program
    - gparted, a partition editor
    - grsync, a backup program
    - solarwolf, a game
    - phoronix-test-suite, a benchmark suite
    - trickle, a utility to limit bandwidth to your Internet programs
    - virtualbox-ose, virtualization software that allows you to run other operating systems within Ubuntu
    - wine, a Windows compatibility layer
    - zenmap, a port scanner

    To investigate what other packages are available, click and release on the "System" menu at the top of your screen, then hover over "Administration >", and select "Synaptic Package Manager" from the drop down list. If you are asked for your password, type it in and press and release the "enter" key. A new window will appear entitled "Synaptic Package Manager". On the left hand side, below the "Reload" button, there is a list of options. Ensure that the top one, "All", is selected.

    At the top of the screen is a "Quick search" box.
    Type the appropriate search term into the Quick search box and press and release the "enter" key. If you have a portable device that has a calendar that you like to sync with your Mac, you can investigate this by trying some relevant search terms. You may also be interested in foreign language packs, translations and dictionaries. Just type the name of the language in and press and release the "enter" key.

    Scroll through all the packages that are available and see whether any of them appeal to you. If so, you can install them
    by clicking and releasing on the box to the left of the package's name, and then clicking and releasing "Mark for Installation" from the menu that appears. When you are finished selecting which software you want, you can then install it by clicking and releasing on the "Apply" button at the top of the window. When you are done, close the Synaptic package manager by clicking on the "X" in the top-right corner.
    Step 18: Autoremove unused packages.
    When you're done installing packages, remove any packages that are unused. Get a Terminal window open if you don't already have one. When you have a prompt, within the terminal, type:
    Code:
    sudo apt-get autoremove
    and then press and release the "enter" key. Type your password or "Y" as necessary, pressing and releasing the "enter" key afterwards, of course. Any unused packages will be disposed of. If you install software from the Internet without using the official Ubuntu channels in future (for example, by installing the latest builds of wine, skype, firefox or virtualbox directly from their websites), this command may backfire, so do it this one time and don't do it from now on.
    Step 19: Fix your eject key.
    If you don't already have a Terminal window open, get one by going to the Applications menu, and selecting the Accessories menu item and then selecting Terminal from the drop-down list. Once in a Terminal, when you have a prompt, type:
    Code:
    sudo gedit /etc/hal/fdi/policy/eject.fdi
    and press and release the "enter" key. You may have to type your password, and of course press and release the "enter" key afterwards. A text editor should appear, called:
    eject.fdi (/etc/hal/fdi/policy) - gedit
    Below the row of icons (such as New, Open and Save) there will be a tab with "eject.fdi" on it and a small "X" to the right of it. Below that is a window where you can type text. There shouldn't be any text in the window. If you see the text quoted after this paragraph already in the text editor window, it means that you've already done this step, and you don't need to do it again, so press the "X" in the top right corner of the text editor window to close it, and skip to the next step. If your window is blank, type the following exactly as you see it (or copy and paste it from an electronic version of this document).

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <deviceinfo version="0.2">
      <device>
        <match key="info.capabilities" contains="button">
          <match key="info.product" string="Apple Computer Apple Internal Keyboard / Trackpad">
            <merge key="input.x11_driver" type="string">evdev</merge>
          </match>
        </match>
      </device>
    </deviceinfo>
    It's okay if some of the lines wrap to the next line. You can use your mouse pointer to grab the right-most border of the text editor window and expand it to the right if you like, so the lines will unwrap. Now move your pointer to the "Save" button, which is the third icon from the left within the text editor window, and click and release. Close the Text Editor by pressing the "X" at the top right of the window. If you installed the pommed package above, your eject button (the one at the top right of your computer keyboard, not including the power button) will be recognized. If there is a CD or DVD inserted in your drive, then it will be ejected. Even if you don't have a CD or DVD inserted, there should be an 'eject' logo that appears on a translucent dark window at the top right of your screen.

    However, it won't work right now. You need to log off and log in again before it will work. If you want to see it work right away, then you can re-login again now, or you can continue with these steps and check it later.
    Step 20: Fix your touchpad.
    This instruction only applies to those laptops that have an appletouch touchpad. MacBooks from first to fourth generation, and MacBook Pros from first to third generation have an appletouch touchpad. No MacBook Air has an appletouch touchpad. This is correct at the time of writing (mid 2009), and it is likely that this will not change in future. If you don't have an appletouch touchpad, skip this step.
    If you have a MacBook that is fifth or later generation, or if you have a MacBook Pro that is fourth or later generation, or if you have a MacBook Air, skip this step.
    If you don't already have a Terminal window open, get one by going to the Applications menu, and selecting the Accessories menu item and then selecting Terminal from the drop-down list. Once in a Terminal, type:
    Code:
    sudo gedit /etc/hal/fdi/policy/appletouch.fdi
    and press and release the "enter" key. If it asks for your password, type it and press and release the "enter" key.

    A text editor should appear, called:
    appletouch.fdi (/etc/hal/fdi/policy/) - gedit
    The text editor window should appear without any text in it. If you see the text quoted after this paragraph in the window, it means that you have already done this step, and you don't need to do it again, so close the text window by pressing the "X" in the top-right corner and move to the next step. If the text editor window is blank, then type the following exactly as you see it (or copy and paste it from an electronic version of this document).

    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <deviceinfo version="0.2">
     <device>
      <match key="info.capabilities" contains="input.touchpad">
       <match key="info.product" contains="appletouch">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.SHMConfig" type="string">true</merge>
    
        <merge key="input.x11_options.VertEdgeScroll" type="string">false</merge>
        <merge key="input.x11_options.HorizEdgeScroll" type="string">false</merge>
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>
        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">false</merge>
    
        <merge key="input.x11_options.VertScrollDelta" type="string">20</merge>
    
        <merge key="input.x11_options.RTCornerButton" type="string">false</merge>
        <merge key="input.x11_options.RBCornerButton" type="string">false</merge>
        <merge key="input.x11_options.LBCornerButton" type="string">false</merge>
        <merge key="input.x11_options.LTCornerButton" type="string">false</merge>
    
        <merge key="input.x11_options.TopEdge" type="string">0</merge>
        <merge key="input.x11_options.LeftEdge" type="string">0</merge>
        <merge key="input.x11_options.RightEdge" type="string">1100</merge>
        <merge key="input.x11_options.BottomEdge" type="string">800</merge>
    
        <merge key="input.x11_options.FingerLow" type="string">5</merge>
        <merge key="input.x11_options.FingerHigh" type="string">15</merge>
    
        <merge key="input.x11_options.TapButton1" type="string">1</merge>
        <merge key="input.x11_options.TapButton2" type="string">3</merge>
        <merge key="input.x11_options.TapButton3" type="string">2</merge>
    
        <merge key="input.x11_options.ClickFinger1" type="string">1</merge>
        <merge key="input.x11_options.ClickFinger2" type="string">3</merge>
        <merge key="input.x11_options.ClickFinger3" type="string">2</merge>
    
        <merge key="input.x11_options.MinSpeed" type="string">0.5</merge>
        <merge key="input.x11_options.MaxSpeed" type="string">2.5</merge>
        <merge key="input.x11_options.AccelFactor" type="string">0.15</merge>
    
        <merge key="input.x11_options.PalmDetect" type="string">true</merge>
       </match>
      </match>
     </device>
    </deviceinfo>
    Now press "Save", which is the third icon from the left. Close the Text Editor by pressing the "X" at the top right of the window. Now log off and log in again (see step 3 above for more info on how to do this). Your touchpad should behave differently, and should feel much more natural. If you plugged a mouse in to get you through the installation, you can unplug your mouse and use your trackpad now.
    Step 21: Install a thaw script.
    This step will install a script that will be run when you try to thaw (that is, bring your computer back to life after suspending it to RAM). Advanced users may note that this step is not necessary for some users and brings no benefit to them, but it does no harm to install it.

    If you don't already have a Terminal window open, get one by going to the Applications menu, and selecting the Accessories menu item and then selecting Terminal from the drop-down list. Once in a Terminal, type:
    Code:
    sudo gedit /etc/pm/sleep.d/99-macbook.sh
    and press and release the "enter" key. Of course, type your password and hit and release "enter" if necessary.

    A text editor should appear, called:
    99-macbook.sh (/etc/pm/sleep.d/) - gedit
    The text editor window should appear without any text in it. If you see the text quoted after this paragraph in the window, it means that you have already done this step, and you don't need to do it again, so close the text window by pressing the "X" in the top-right corner and move to the next step. If the text editor window is blank, then type the following exactly as you see it (or copy and paste it from an electronic version of this document).

    #!/bin/bash
    case $1 in
    resume)
    /etc/init.d/bluetooth stop
    /etc/init.d/bluetooth start
    ;;
    thaw)
    modprobe -r appletouch
    modprobe appletouch
    ;;
    esac
    Now click and release on the "Save" button, which is the third icon at the top of the Text Editor window. Close the Text Editor by pressing and releasing the "X" at the top-right of the Text Editor window.

    In Ubuntu jargon, "Suspend" means to turn the computer almost off but retain the contents of the memory, so that it may be quickly re-awakened by pressing the power button. Suspend ought to work properly now. Test it now. If it does not work properly, you may need to perform a hard reset and reboot.
    Step 22: Set up your trackpad preferences.
    Go to the "System" menu at the top, and click and release on it. Move your pointer down to the "Preferences >" menu item. Go to the "Mouse" item in the drop down list, and click and release on it. Click through the "General" and "Touchpad" tab items and look at the options there. Play with the settings until you get the touchpad to work the way you want it to. If you have an appletouch touchpad (see the previous step), note that the Linux appletouch driver tends to be quite jumpy when performing two-fingered scrolling, whereas the Windows and OS X drivers don't have this problem. You may be sufficiently annoyed by this jumpiness that you turn off multi-touch gestures altogether, which is done in the "Touchpad" tab, by unchecking "Enable vertical scrolling" and "Enable horizontal scrolling". It's up to you. When you are done, click and release on the "Close" button at the lower-right of the "Mouse Preferences" window.
    Step 23: Remap your keyboard.
    Remapping is when you tell the operating system to interpret a key on your keyboard as doing something different to what it is set to do by default. This step is optional. If you don't wish to remap your keyboard, then skip this step.

    Now look at your keyboard. If you are using your laptop keyboard, you probably have command keys (they're the ones left and right of the space bar with the Apple logo on them) that don't do anything useful in Linux. You might want to remap them. You may also want to assign special functions to the enter key that is two to the right of the space bar, and the F11 and F12 keys. You can't remap the fn key in the lower-left corner, and if you have set up your eject key according to these instructions, you can't remap that one either. If you have installed the Mactel packages, it is likely that you can't remap any function key below number 11 successfully, since the first 10 function keys are used as hotkeys. If you're using an external keyboard, you may have additional keys that you wish to remap. Your external keyboard might have a Windows logo key, for example.

    Decide which keys you would like to remap, and what you want them to do. You need to be judicious. For example, if you like to use Firefox's full-screen mode by pressing F11, then you should not remap that key. I have set up my left command key as "control", my right command key as the middle mouse button and my enter key as the right mouse button. I have set up F11 to mimic the Expose function of OS X, and F12 to "Show Desktop", using compiz-config-settings-manager. How to do these latter two things is beyond the scope of these instructions.

    For each one of the keys you wish to remap, you need to know its keysym. Here are some common keysyms that I have looked up for you already. If you selected the "USA Macintosh" or "USA" keyboard layouts when you were installing in Part 1, then these keysyms will work for you.
    • Left command key (to the left of spacebar on laptop keyboard): Super_L
    • Right command key (to the right of spacebar on laptop keyboard): Super_R
    • enter key (two to the right of spacebar on laptop keyboard): KP_Enter
    • F11 key: F11
    • F12 key: F12

    If all the keys you wish to reassign are on that list above, and you selected "USA" or "USA Macintosh" keyboard layout, skip to beyond the indented instructions. If you wish to reassign a key that is not on the list above, or you have a foreign keyboard layout, you need to find its keysym by using the following indented instructions.
    Get a terminal open. At the prompt, type:
    Code:
    xev | grep "keysym"
    and press and release the "enter" key.

    You should get a new window with a rectangle in it. Select that window by moving your mouse pointer over the rectangle that appeared in that new window and clicking and releasing on it. Press and release the key that you wish to assign a function to.

    Every time you press and release the key, you should get a bunch of text in the Terminal window that looks something like this:
    state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
    According to that text, the keysym for that key on my keyboard is Super_L. (I was pressing the left command key when I got that output). Depending on which key you pressed, and what model of Mac you have, it might be some other keysym. Also, some of the other text might be a bit different. Whatever it is, remember that keysym code. For every key on your keyboard you wish to reassign as a mouse button, press and release it and look for its keysym, until you know every one of those keys' keysyms.
    Now close that new window with the rectangle in it by clicking and releasing on the "X" in the top-right corner of it.
    Now move your pointer to the "System" menu at the top of the screen, and click and release. Move your pointer down to the "Preferences >" menu item, and hover over it until a drop down list appears. Move your pointer to "Startup Applications" in the drop down list, and click and release on it. A window should open with "Startup Applications Preferences" at the top.

    For each key on your keyboard that you wish to assign as a mouse button, repeat these indented instructions:
    Click and release on the "+Add" button to the right of the "Startup Applications Preferences" window. A new window called "Add Startup Program" appears. To the right of "Name:", you should have a cursor. If you don't, then click and release in the text box. Now type an appropriate phrase for the key you're trying to assign. You may choose one of the following phrases, or make up something that sounds appropriate:
    Map Left Command Key
    Map Right Command Key
    Map Enter Key
    Map F11 Function Key
    Map F12 Function Key
    The actual text doesn't matter much - it's just to let you remember what it does.

    To the right of "Command:", click and release on the text box so that you get a cursor. Choose one of the following commands depending on what you want your key to do, and type the command to assign the nominated function.

    Each of these commands will remap the left command key. If you're trying to remap a key other than the left command key, substitute the keysym of the key you're trying to map in the place of "Super_L"
    . Note that the quotes are part of the command in each case. The part from the hash symbol (#) onwards is a comment and you can leave that out if you like. The "delete" key on a Macintosh laptop keyboard deletes to the left of the cursor and is known in Ubuntu (and some full size keyboards) as a "backspace" key. The "delete" key mapping below will delete to the right of the cursor, like the "delete" key on a full size keyboard. The "menu" key is like the menu you get when clicking the right mouse button in some applications, but it is often different to the right mouse button menu.
    Choose only one of these commands! Replace the text "Super_L" with the keysym of the key you're trying to map.
    Code:
    xmodmap -e "add control = Super_L"                     # control key
    xmodmap -e "add mod1 = Super_L"                        # alt key
    xmodmap -e "add shift = Super_L"                       # shift key
    xmodmap -e "keysym Super_L = Delete"                   # delete key
    xmodmap -e "keysym Super_L = Menu"                     # menu key
    xmodmap -e "keysym Super_L = Pointer_Button1"          # left mouse button
    xmodmap -e "keysym Super_L = Pointer_Button2"          # middle mouse button
    xmodmap -e "keysym Super_L = Pointer_Button3"          # right mouse button
    xmodmap -e "keysym Super_L = Pointer_DblClick_Dflt"    # double click
    Advanced users should know that there are other possible assignments. If you are an advanced user, look at /usr/include/X11/keysymdef.h to see all the possible values. Remove the prefix "XK_" from the value code before assigning it.
    Now click and release on the "+Add" button at the lower right.
    Repeat this step for any key on the keyboard that you wish to remap.
    If you have remapped any of your keys to perform mouse/trackpad actions including button presses, then you need to read the rest of this step. However, if you have not done so, then skip to the last paragraph of this step.

    Move your mouse pointer to the "System" menu at the top of the screen and click and release on it. Move down to the "Preferences >" item, and then move to the "Assistive Technologies" item from the drop-down list. Click and release on it. You should get a window called "Assistive Technologies Preferences". You should see a checkbox called "Enable assistive technologies". If it is not already checked, check that box by clicking and releasing on it. One of the items in your window ought to be "Keyboard Accessibility". Click and release on that button. Select the "Mouse Keys" tab from the top row. There will be an item called "Pointer can be controlled using the keypad". If it is not already checked, check it.

    If you are using your laptop keyboard, then from now on, whenever your num lock key (which is F6 for me) is pressed, your numeric keypad (which are keys 789UIOJKLM for me) will control the mouse pointer instead of delivering numbers. If you want to use those keys as normal numbers and letters, ensure that num lock is switched off. If you want to use the numeric keypad as a numeric keypad in future, you will need to disable Mouse Keys and then turn num lock on. If you are using an external full-size keyboard, your numeric keypad will control the mouse pointer unless you disable Mouse Keys. However, the corollary is that if you disable Mouse Keys, your keyboard will no longer be able to produce pointer button presses.

    So as long as Mouse Keys is on and num lock is off, you will be able to use those keys as mouse buttons.

    You will need to wait until your next login before the remapping will work. You can re-login now to test it, or continue with the instructions and check it later.
    Step 24: Make your brightness controls work properly.
    If you're not already within Startup Applications Preferences, go to the "System" menu and click and release on it, then hover over the "Preferences >" menu item, and click and release on "Startup Applications" from the drop-down list. Click and release on the "+Add" button on the right side of the "Startup Applications Preferences" window.

    To the right of "Name:", type:
    Fix brightness controls
    To the right of "Command:", click and release to get a cursor there, and type:
    Code:
    xrandr --output LVDS --set BACKLIGHT_CONTROL combination
    Then click and release on the "+Add" button. Now close the "Startup Applications Preferences" window by clicking and releasing the "Close" button at the lower right. After you re-login and then use the brightness up/down keys, you should notice that the brightness control works much better. You can log off and log in again now to check it or continue on and check it later.
    Step 25: Additional configuration.
    You may now perform whatever additional configuration you would like. Some ideas from me are:

    - Within Firefox, install the DownThemAll! plugin
    - Install Compiz Config Settings Manager, and set up your function keys to mimic the Expose function of OS X.
    - Search the Ubuntu Forums for ways to extend your battery life.
    - Add a bookmark for www.ubuntuforums.org.
    - Install skype.
    - Google for methods that allow you to use your webcam in Ubuntu. It doesn't work well, and it requires some technical knowledge to get working.
    - Install rEFIt if you're confident enough, to avoid having to hold down the "alt option" key every time you want to use Linux.
    - Install some cool icons for rEFIt, and a banner with your name on it.
    - Search Google for the phrase "make Firefox go faster".
    - Install the Flash player for Linux (if you have a 64-bit distro, use the 64-bit Flash player alpha - it works fine).
    - If you have horizontal two-fingered scrolling turned on, use CompizConfig to disable Viewport Switching, because it is too jumpy.
    - It is possible to get finer-grained control over the volume and brightness hotkeys. If that matters to you, Google for that.
    - Edit your menu.lst to disable the boot menu once you know that your config works okay.
    - The performance of the Intel GMA950 chipset, if you have it, is diabolical. Search Google for ways to improve its performance, which includes using a previous version of the driver.
    - I can't seem to get the hibernate function to work on my computer, so I have disabled it from my Actions menu for both my login name and root.
    - Ubuntu only includes two desktop background images by default. Use Google to search for images that you find interesting and are the same size as your desktop.
    You're done!

    If you use these tasks to successfully install Ubuntu, please send me at PM on these forums to let me know how you got on, and please let me know whether the instructions are 100% compatible with your machine. If you have suggestions for improvement, please send them to me. If you bollocked your computer by following these instructions, don't bother suing me because I don't have any money.

    If you have questions or need support, please start a support thread. Or you can find me on the freenode IRC server at #ubuntu.
    Last edited by Richardcavell; September 5th, 2009 at 01:58 PM. Reason: upgrade to v1.1.

  3. #3
    Join Date
    May 2009
    Location
    Lytham St Anne's, England
    Beans
    119
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to Install Ubuntu 9.04 on an Intel-based Mac laptop

    How to install Ubuntu 9.04 on an Intel-based Mac laptop, by Richard Cavell v1.1. (June 2009)

    Part 3 of 3

    Basic tasks

    This is a list of instructions to perform basic tasks that may be of use while following the instructions to install Ubuntu 9.04 on your Mac laptop:

    To turn your computer on when it is turned off:
    Open the lid if it's not already open. Press and release the power key, which is the topmost, rightmost key on your keyboard. It only needs to be pressed for one or two seconds. If your computer doesn't turn on at all, perhaps your battery is discharged, so make sure you've connected the power supply. Your computer should make a noise (unless you've muted the sound when previously using your computer), and your screen should show some activity. If you get no activity or sound at all, check your power supply.

    To perform a hard reset: If your computer completely fails to respond, you should perform a hard reset. The power key is located at the top right of your keyboard. Hold it down for about ten seconds, then let it go. Your computer should suddenly and completely shut down. Now to power back on, simply press the power key for two seconds and then let go. You don't need to hold it down when powering back on. A hard reset may be performed any time, no matter which operating system you are using at the time. However, it is a drastic measure and you should only do it when your computer hangs completely (ie becomes completely unresponsive or otherwise unuseable). Your operating system may complain that you did not shut down properly the next time you try to boot up, and try to check your hard disk for errors.

    To click on an item: You can use a mouse with any modern operating system. If you have a modern USB mouse, simply plug it in. If you need to click somewhere on the screen, use your mouse or trackpad to move the pointer until it points at that item and then, if you have a mouse, click and release the left mouse button. Your trackpad may have a bar at the bottom that is the equivalent of a left mouse button, so if you're using a trackpad, click and release that button. With more modern trackpads, you press and release the whole trackpad itself to click on an item.

    To boot into OS X: OS X (pronounced "Oh - Ess - Ten") is the operating system that comes with your Mac. It is already installed before you open the box containing your computer. OS X has a bar across the top of the screen, and on the very left hand side of it is a small Apple logo. Down the bottom it has a number of pictures in a part known as the Dock. The Dock might disappear unless you drag your mouse pointer down to the bottom of the screen, when it will reappear. The left-most of the pictures in the Dock is a kind of Cubist face made from two other faces. Your computer will probably boot into OS X by default as soon as you turn it on. If it doesn't, and you want it to boot into OS X, look at the instructions below. In any case, when you boot into OS X, you will see a lot of activity on screen. Don't try to use it until all the activity on screen has calmed down.

    To shut down OS X: These instructions only apply if you are in OS X at the time. You can recognize OS X by the Dock at the bottom, and the horizontal strip at the top of the screen with the Apple logo at the far left. To shut down, press and release the power button at the top right of your keyboard. A menu will appear with Restart, Sleep, Cancel and Shut Down. Use your mouse or trackpad to select "Shut Down" by clicking and releasing on it. While your computer shuts down, some of your applications may complain, for example, if you haven't saved your work. Deal with them all. Wait until your computer looks as though it's not doing anything any more before trying to do anything else.

    To shut down Ubuntu: If you have a desktop, move your mouse pointer to the top right of the screen where you see your name and a red power icon. Click and release on your name, and you will get a list. Go to "Shut Down..." and click and release on it. A window called "Shut Down" will appear. Click and release on "Shut Down" again.

    To boot into the operating system of your choice:
    If you have two or more operating systems installed, it may be necessary for you to tell your computer explicitly which operating system you wish to use. The way to do it is this: Turn your computer off by using the shutdown process in whichever operating system you're using. Wait until your computer looks as though it has completely turned off. Hold down the key marked "alt option", which is two to the left of the space bar. Keep holding this key down while you turn your computer on again. Find the power key at the extreme top right of your keyboard and press it for two seconds, then release it. Keep the "alt option" key held down until you get a menu. Now you can take your finger off the alt option key. Each of the operating systems that may be booted will have its own icon. Any operating system that is installed on your hard disk will appear with a graphic that looks like a hard disk (a grey rectangular prism). Any operating system that is on a CD in your drive will appear looking like a CD. It is likely that any Linux installation will be labelled as 'Windows'. It's not Windows, but the Mac can't tell the difference, so don't worry about it being mislabelled. Using your trackpad or mouse, select the one you want and click on it. The operating systems will be labelled by the partition that they're on. OS X might be on a partition called "Macintosh HD".

    To launch a web browser in OS X: There are several web browsers. Safari comes with your Mac. You can also use Firefox or Opera. My favourite is Firefox, but you may choose to use Safari instead. Firstly, boot into OS X. Then take your mouse pointer down the bottom of the screen. The Dock is either already there, or it may pop up as soon as your mouse pointer makes it to the middle of the bottom of the screen. Move your mouse pointer left and right in order to examine the names of the programs you have in your Dock. If one of them is called Safari or Firefox or Opera, click and release on it. If that doesn't work, go back up to the Apple logo at the top-left of screen. Click and release on it to bring up a menu. Scroll down to "Recent Items". You may see Safari or Firefox or Opera on the list. If so, click on it. If that doesn't work, go back down to the Dock. Choose the logo at the left, which is called "Finder". It should bring up a window that lists various files on your hard disk. On the left side, you should have a folder called "Applications". Click and release on it. If that doesn't work, go to the Go menu at the top of the screen, click and release on it, and then select "Applications" from the list by clicking and releasing on it. Once you have all your Applications listed, they are probably in alphabetical order. If not, click on the bar called "Name" that is at the top of the right pane. Find the item in the list on the right side called "Safari" or "Firefox" or "Opera" and double-click and release on it.

    To launch a web browser in Ubuntu: There will be an icon at the top of the screen, to the right of the "System" menu and to the left of the envelope icon, that is for the Firefox web browser. Put your mouse pointer over it and then click and release on it. Your web browser should start up.

    To go to a specified website in a web browser: Whether you are currently using Ubuntu or OS X, or some other operating system, launch a web browser using the instructions above. If you have successfully launched your Web browser, it should have put up a window for you. In the middle at the top there will be an address that might start with "http://www." By default, this will probably be the website of whoever made the browser. Click and release in that window, and delete everything that's there. In OS X, one way to delete everything that's there, after you've clicked on it, is to hold down the Command key (one of the ones that look like the Apple logo on either side of the space bar), and type "A". Then release the Command key. Now hit and release the "delete" key. In Ubuntu, to delete everything that's there, after you've clicked on it, hold down the "Ctrl" key, and type "A". Then release the "Ctrl" key. Now hit and release the "delete" key. Now type in the address of the website that you want, and press and release the "enter" key.

    To burn a CD: Burning a CD means taking a blank (recordable) CD and putting data on it. Your Mac laptop can burn CDs. You will need a blank CD - in fact, grab a few in case the first one or two don't burn properly, which sometimes happens. You can also burn a CD image (a file ending in ".iso") to a blank DVD. Not all Mac laptops can burn DVDs. If you burn a CD image to a recordable DVD, then it will work just fine - but recordable DVDs are more expensive. To know how to burn a CD, see https://help.ubuntu.com/community/BurningIsoHowto
    Last edited by Richardcavell; August 18th, 2009 at 09:11 AM. Reason: upgrade to v1.1.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •