Muffinresearch Labs by Stuart Colville

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

  1. Download the Desktop CD .iso image from the Ubuntu Downloads site
  2. Create a new VM (I chose “Linux” and then “Other Linux kernel 2.6″)
  3. Once you have done this edit the VM’s settings so that the boot sequence will use the CD first.
  4. 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
  5. 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
  6. Boot the new Virtual Machine and you should end up running the desktop linux.
  7. To install linux permanently simply run the install shortcut from the desktop.
  8. 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.

Dialogue showing adding the xmodmaprc file to be loaded when 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.

Post Tools

Comments: Add yours

1. On August 16th, 2006 at 3:54 pm digitaldion said:

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

2. On August 19th, 2006 at 1:07 am cjpa said:

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.

3. On August 28th, 2006 at 1:56 pm Piotr said:

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-xorg

The 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] ------------------&gt [fn]+[F1]
[Ctrl]+[Alt]+[F1] -----&gt [fn]+[Ctrl]+[Alt]+[F1]

but they don’t work whith “macintosh” keyboard model…

4. On February 8th, 2007 at 12:11 am Paul Reid said:

Using:

sudo dpkg-reconfigure -phigh xserver-xorg

and 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!

5. On February 12th, 2007 at 10:27 pm steve mcfarland said:

This solved my problem when a dozen other sites telling me only to edit the xorg.conf didn’t – thanks so much!

6. On February 19th, 2007 at 10:43 pm Lucian Micu said:

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!

7. On February 28th, 2007 at 5:34 pm abe said:

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

8. On March 25th, 2007 at 7:57 pm Jarle said:

Downloaded the latest Ubuntu, running Parallels 3188, will not recognise the boot image, do I need to mount it first ?

9. On March 26th, 2007 at 9:21 pm Jarle said:

Tried the method described to change the resolution to 1440×900, any other suggetstions ?

10. On April 17th, 2007 at 5:21 am nitin sood said:

paul select the resolution by presssing space bar and not just enter key.. i think that could be the problem…

11. On April 26th, 2007 at 6:01 pm jenson said:

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.

12. On April 28th, 2007 at 12:43 am shaice said:

No way with Parallels and latest Ubuntu 7.04 – but it works great with VMware Fusion!! Hope ti helps! s

13. On April 30th, 2007 at 3:41 pm Fabian said:

Anyone tried to dist-upgrade to 7.04?

14. On April 30th, 2007 at 3:47 pm Stuart Colville said:

@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’.

15. On April 30th, 2007 at 6:05 pm Trevor Rowe said:

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

16. On May 7th, 2007 at 1:45 pm cjpa said:

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..

17. On May 15th, 2007 at 8:05 pm Douglas said:

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?

18. On May 15th, 2007 at 10:31 pm Stuart Colville said:

@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.

19. On June 5th, 2007 at 3:25 pm Michal said:

Ubuntu 7.04 Feisty Server & Parallels – CDROM/Kernel Workaround

20. On June 7th, 2007 at 6:19 pm Seth King said:

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).

21. On July 7th, 2007 at 4:08 am nimesh said:

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

22. On July 10th, 2007 at 1:03 pm Stuart Colville said:

@nimesh: Have you installed a 64bit version in error?

23. On August 23rd, 2007 at 10:40 am Mark said:

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?

24. On October 27th, 2007 at 2:17 pm Martijn said:

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.

25. On November 25th, 2007 at 4:37 pm cctoronto said:

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..!

26. On December 31st, 2007 at 12:09 am John Stoner said:

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.

27. On December 31st, 2007 at 7:22 pm John Stoner said:

never mind… switched toregular Ubuntu, and it runs fine. Thanks!

28. On December 31st, 2007 at 9:45 pm John Stoner said:

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?

29. On January 14th, 2008 at 5:18 am Miguel Guhlin said:

Howdy, the key mapping works on PCLinuxOS 2007 Gnome running on a dual booting Macbook. Thanks again!

30. On April 28th, 2008 at 12:21 am Rich said:

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$

31. On April 28th, 2008 at 11:32 am Stuart Colville said:

@Rich: Sorry can’t help you with this as I’ve moved over to using Vmware Fusion now for all my virtualization needs.

32. On April 29th, 2008 at 11:42 pm Rich said:

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

33. On May 4th, 2008 at 6:22 pm Stuart Colville said:

@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.







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.632s.