Running Ubuntu under Parallels Desktop for Mac | Comments (33)
Posted in Apple on 13th August 2006, 4:00 pm by Stuart
Installing Ubuntu 6.06 Dapper Drake under Parallels Desktop is really easy to do so here’s a few pointers how to do it and to customise it to be easier to use via the mac keyboard:
The installation
- Download the Desktop CD .iso image from the Ubuntu Downloads site
- Create a new VM (I chose “Linux” and then “Other Linux kernel 2.6″)
- Once you have done this edit the VM’s settings so that the boot sequence will use the CD first.
- Next open the CD settings and change the CD to run from an image file and point it at the iso image you have downloaded
- For memory settings I used 376mb and it runs just fine. You can use more but I have heard of people running into issues using 1GB
- Boot the new Virtual Machine and you should end up running the desktop linux.
- To install linux permanently simply run the install shortcut from the desktop.
- Once complete shutdown Ubuntu, stop the VM and revert the CD to a normal CD device instead of the image file.
Changing the resolution
Now the one thing that I found a little annoying with the newly installed ubuntu is that it defaults to a maximum resolution of 1024×768 which hardly makes best use of the full resolution of the MacBook Pro or indeed the larger resolution of your MacBook etc. So to remedy this I though I should be able to simply edit the xorg.conf file found at /etc/X11/xorg.conf, however doing this did not work at all. The available resolutions do not change from what had existed before.
Then when I was double checking my edits to the xorg.conf file I noticed this note:
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
So I ran sudo dpkg-reconfigure -phigh xserver-xorg from the ubuntu terminal. This runs the command line configuration tool for xorg. When going through the options I selected the default “vesa” driver (I wouldn’t recommend deviating from this). In the next step I was able to choose the resolutions that I wanted. I added both 1440×900 and 1280×800 but once I had restarted the X server, Ctrl+Alt+backspace the Ubuntu VM jumped straight to the 1440×900 resolution. This is perfect for full-screen use. In trying to change the resolution down to 1280×800 which is more ideal for use of the VM in a window I found that every time the OS reverted to the 1440×900 resolution. Thus it would appear that for now that you will only be able to achieve the maximum resolution that you make available from the configuration tool. If you like the full screen mode then feel free to set the resolution to match your mac and the you can set the VM to always use full-screen mode when you launch. Great for convincing linux buffs that you just splashed out on a mac only to rip out OSX and run Ubuntu!
Improving the keyboard mappings with xmodmap
Once again like using windows under Parallels if you live in the UK you will need to set the keyboard to an American layout to better match that of the mac. Even when you have done that you will find that some keys don’t work as expected for example the backticks and tilde key are mapped to < and > . To fix this and the to re-map the apple key it’s possible to use a tool called xmodmap which allows you to create new key mappings.
After a while experimenting with this I came up with the following keymap file:
!this sorts out the apple key+backspace to do delete
keycode 22 = BackSpace Terminate_Server Delete
!map tilde and grave
keycode 94 = grave asciitilde
!maps apple key to ctrl
remove Control = Control_L
keycode 115 = Control_L
keycode 37 = Control_L
add Control = Control_L
If you want to use this you will need to add it to a file called ~/.xmodmaprc then you can test it by running xmodmap ~/.xmodmaprc. When you logout and log back in you will be asked if you wish to load the modmap file. When this happens you will need to move the file across to be loaded everytime X starts up.

There’s more work that can be done with the keyboard but this is certainly a step in the right direction. Ideally I would properly map a key for the right mouse button though I normally use an external mouse so this is less of a problem. Also alt+(1-0) need to be mapped to the correct keys. Alt+3 should be # whereas at the moment you need to use shift+3 for #.
Hopefully it won’t be long before there is a “Parallels Tools” package for linux so that you don’t have to press Ctrl+Alt to switch from the VM to mac as well as having better support for the clipboard between host and VM. This is planned, so hopefully we won’t have too long to wait.

Thanks for this post! I was struggling to figure out why my Ubuntu setup would not go out of a HUGE display mode. I ran the configuration tool and rebooted. Now I can run Ubuntu on my Macbook Pro very well!
Thanks!
Dion
Nice post!
There is already the possibility in Parallels to change the alt-ctrl combination. Check the global Preferences.
I mapped mine to alt-capslock, for instance.
Great !
Just few notes:
- the memory allowed must be less or equal to 512 Kb
- You can chose the “macintosh” keyboard with the dpkg-reconfigure command.
just type:
dpkg-reconfigure xserver-xorgThe access to configure the xorg.conf file is complete. In the keyboard section, chose your contry code (us for USA, de for Germany, fr for France, …) in the “Please select your keyboard layout”.
After, as explain in the “keyboard model” screen, you can chose “macintosh” as model after the “Please select your keyboard model” question. When you look in the /etc/X11/xkb/rules/xorg file, you can see all possible values like “ibook” or “powerbook”.
- If you want to specials keys with a MacBook keyboard, you must add
the “fn” key. For example:
[Ctrl]+[Alt]+[Del] —-> [fn]+[Ctrl]+[Alt]+[BackSpace][F1] ——————> [fn]+[F1]
[Ctrl]+[Alt]+[F1] —–> [fn]+[Ctrl]+[Alt]+[F1]
but they don’t work whith “macintosh” keyboard model…
Using:
sudo dpkg-reconfigure -phigh xserver-xorgand selecting 1680×1050 for the 17″ MacBookPro I restarted the Ubuntu VM, with Ctrl+Alt+backspace but the resolution remains at 1024×768.
Am I doing something wrong?
Any tips appreciated but not expected!
This solved my problem when a dozen other sites telling me only to edit the xorg.conf didn’t - thanks so much!
Excellent tips, but in my case, after reconfiguring the xserver and choosing all of the above mentioned resolutions, the VM reverts to 640×480. What am I doing wrong? (I am running Ubuntu 6.1 on a MacBook). Thanks!
Lucian Micu: You need to edit the VM options inside Parallels for your Ubuntu VM. You need to edit the video adapter and then enable CUSTOM RESOLUTIONS, then you must add the resolution that you desire, e.g. 1440×900
Downloaded the latest Ubuntu, running Parallels 3188, will not recognise the boot image, do I need to mount it first ?
Tried the method described to change the resolution to 1440×900, any other suggetstions ?
paul select the resolution by presssing space bar and not just enter key.. i think that could be the problem…
Has anyone try the latest build 7.04 in Parallels? Can’t even run the live system from CD, not to mention installing, hangs right after booting up from CD.
No way with Parallels and latest Ubuntu 7.04 - but it works great with VMware Fusion!! Hope ti helps! s
Anyone tried to dist-upgrade to 7.04?
@Shaice: I’ve yet to test VMWare fusion, but I’ve heard plenty of good things.
@Fabian: Not yet, but it sounds like a plan. I will try that as soon as I get a mo’.
Fabian, just got the dist-upgrade to 7.04 working today, lots of messing about. I first tried a fresh install of 7.04 but had lots of problems with the install freezing + lots of blank screens. I went back to 6.0.1 then 6.10 and then 7.04. The dvd player no longer works as the linux kernal has changed and parallels doesn’t work with the changes but iso images work ok. I could only get the network upgrade to work, could not get the upgrade to work even though I had the full install on CD. Also getting corruption of screen on shutdown when it changes the resolution as part of the shutdown. Also make sure you set the memory to 512meg as higher values were also causes freezing during installation - hope this all helps, Trev
I just installed the 7.04 (on a normal macbook) and had no problems whatsoever. OK, at install, the progress-bar wasn’t visible but that’s a minor imo. Everything works out of the box..
Trying to install 7.04 on Parallels on MacBook. May try Fusion later, but would like a solution for Parallels. I have zero Linux, Unix, or command line background, so please be gentle.
I get as far as the initial boot prompt screen with no trouble. Booting proceeds for about 4-6 lines before giving the error “ACPI: Unable to find RSDP.” Then says “Loading, please wait…” and goes black. The end.
I tried working through all the help menu options, and searching for the error online. The only suggestions I found were to try extra commands (e.g., acpi=off) at the boot prompt, but none of them made any difference.
Have tried this with new virtual machine, and with clone of virtual XP. Makes no difference. Stops at RSDP thing every time.
Ideas?
@Douglas: Sounds like X is failing. I’m pretty sure that RDSP message isn’t anything to worry about. Unfortunately this is a fairly common problem and can be enough to put someone off experimenting with Linux.
Hopefully you’ll not let this get you down!
What need to do is re-configure X with settings to suit your macbook. There’s some additional instructions here: ‘file:///Library/Parallels/Help/13965.htm’ (local help for parallels copy and paste that into a browser to view it.
If that doesn’t work or you get stuck send me a mail via my contact form and I’ll see what I can do to help.
Ubuntu 7.04 Feisty Server & Parallels - CDROM/Kernel Workaround
Douglas, I ran into this problem also. The trick is to set up a new virtual machine as “Solaris” and to install “Solaris 10″. Then when booting, type
live acpi=off
and hit return. Be patient, as the desktop took some time to come up (during which it was a black screen and I could only tell stuff was going no by the green light disk indicator).
Have a macbook with 10.4 and just installed ubuntu 7.04. Get error message that “YOUR COMPUTER DOES NOT SUPPORT LONG MODE, USE A 32 BIT DISTRIBUTION.”
Anyone know what I can do to get Ubuntu working
@nimesh: Have you installed a 64bit version in error?
I got the same message as nimesh, I got a MacBookPro with Intel core 2 duo 64bit procesor. I’m new to linux and i don’t know what to do?
To those with 64-bit problems: you’re making a mistake. It’s not your 64-bit MacBook Pro but the 32-bit Parallels virtual machine which is running Ubuntu. Remember, as far as Ubuntu is concerned, the virtual machine is all that’s available. So download the 32-bit version of Ubuntu and you’re fine.
I’m running the xorg configuration tool in the Terminal, but I can’t get select/choose a resolution from the list… I know this probably sounds silly, but I’m a newbie, I just can’t find the correct keystroke to select a resolution in the list..!
I’m trying to install Kubuntu 6.06 under parallels 3.0 from a DVD. When I initiate the install process, I get as far as step 4, where it asks me for my identity info. When I hit submit, it hangs. I’ve tried with the VM set to Ubuntu and also to Other 26 kernel–no dice. It hangs at the same point.
never mind… switched toregular Ubuntu, and it runs fine. Thanks!
OK, sorry for all the comments. I’ve run through the install and system update, and I have ubuntu up and running. Now when I try to issue the command you recommend I get package not installed. I try apt-get to install it, but it says package not found. Any ideas?
Howdy, the key mapping works on PCLinuxOS 2007 Gnome running on a dual booting Macbook. Thanks again!
Tried the resolution line, but it failed … can anyone give me any tips to change the resolution? I’ve already added a “1440 x 900″ line in Parallels … but it doesn’t seem to have helped in any way. In full screen mode, I have a 1″ to 1.5″ border all around my 1024 x 768 screen. Thanks much! -Rich
rich@VM-ubuntu8:/etc/X11$ sudo dpkg-reconfigure -phigh xserver-xorg
xserver-xorg postinst warning: overwriting possibly-customised configuration
file; backup in /etc/X11/xorg.conf.20080427161305
FATAL: Error inserting battery (/lib/modules/2.6.24-16-generic/kernel/drivers/acpi/battery.ko): No such device
rich@VM-ubuntu8:/etc/X11$
@Rich: Sorry can’t help you with this as I’ve moved over to using Vmware Fusion now for all my virtualization needs.
Stuart, how do like VMware? Are you much happier with it? I wasn’t familiar with Fusion … might have to look it up … On my PC’s, I’m interested in using ubuntu 8.04 as host for Win XP … trying to figure out what and how next … VMware doesn’t appear compatible with 8.04. Thanks and take care, -Rich
@Rich: yes I’m much happier with it overall. Although it’s feature set is less rich - I’m not finding I miss that much and it’s very solid.