Mac For Ubuntu 11 10



Using a Mac keyboard in Ubuntu 11.10 with Mac-like shortcuts

How to get Ubuntu 18.04 (Linux) on a Mac running macOS or Mac OS X. This process is called a dual boot. Links: My website to get the bootable drive maker: ht. Download the latest LTS version of Ubuntu, for desktop PCs and laptops. LTS stands for long-term support — which means five years, until April 2025, of free security and maintenance updates, guaranteed. Ubuntu 20.04 LTS release notes. Recommended system requirements: 2 GHz dual core processor or better; 4 GB system memory; 25 GB of free hard. Mac currently has Ubuntu 10.10 32bit, but i get issues with the touchpad, I read Ubuntu 11.10-mac version resolves these issues, hence the attempted re-installation. I do not have any MAC OS installed in this PC only Ubuntu 10.10. When I press 'alt' the CD does not. ATI RADEON 9600 UBUNTU 11.10 DRIVER FOR WINDOWS MAC. Should i install ati propriety video drivers on ubuntu 11. X1050 series secondary. Products supporting windows, windows behavior altered ubuntu, ixp driver old, install bundle southbridge, catalyst software suite, hydravision basic edition windows, wdm driver install bundle southbridge. Ixp driver catalyst control. This is for those who are looking forward to Macbuntu 11.10, It looks cool and looks like Mac OS X. Free OS X is based on Ubuntu Gnome. I haven't tried it yet So I can't say anything about this, It is good or buggy. You should try and after that you can write here your responses. Free OS X alternative Macbuntu 11.10 is available only for 64-bit.

I'm trying out Ubuntu 11.10 (Oneiric Ocelot) on a PC with a Mac keyboard attached. I made a few hacks to make the keyboard work smoothly and in a (very roughly) Mac-like fashion. I figured I'd make a few notes here for my own future reference. (Note: I'm using a U.S. keyboard. If you are using a different kind of keyboard, your mileage may vary.)

Goals

  1. Make the function keys (F1..F12) work as function keys without needing to hold down the Fn key.
  2. Use Mac-like keyboard shortcuts for window navigation (Cmd-Tab, Cmd-`) and the terminal (Cmd-C for copy, Cmd-V for paste).
  3. Avoid stepping on Unity's use of the Super key (i.e. the command key on Macs and the Windows key on PC keyboards).
  4. Use the legacy Caps Lock key for something useful.

The plan

  1. Change a driver parameter to enable use of the function keys without holding down the Fn key.
  2. By default, the keyboard's left and right command keys are mapped to Super_L and Super_R. Map these instead to the seldom-used Hyper_L and Hyper_R keysyms. (If you try to use the Super keys for shortcuts, the Unity dock will appear every time you hold down the command key. It's really annoying.)
  3. Map the Caps Lock key to Super_L so it can be used for certain Unity shortcuts.

Making function keys work

Create a file in /etc/modprobe.d which sets the fnmode parameter of the hid_apple driver to 2 = fkeysfirst:

echo 'options hid_apple fnmode=2' > /etc/modprobe.d/apple_kbd.conf

Reboot, and the function keys will work without needing to hold down the Fn key. (You can access the volume controls and such by holding down the Fn key.) Thanks to Alan Doyle for reporting on this tweak.

Remapping the keys

I used the xkbcomp utility to remap the keys. I extracted the current keyboard mappings into a default.xkb file, made a copy of the mapping file as mackeyboard.xkb, made the changes to this file, then loaded the new mapping into the running X server:

xkbcomp :0 default.xkb
cp default.xkb mackeyboard.xkb
vi mackeyboard.xkb
xkbcomp mackeyboard.xkb :0

I'm attaching my mackeyboard.xkb file and the diff for reference. (Use these at your own peril.) I made the following changes:

  1. Changed the LWIN and RWIN keycode identifiers to LCMD and RCMD, for clarity.
  2. Commented out the LMTA and RMTA keycode aliases, to avoid confusion.
  3. Changed the CAPS keysym mapping from Caps_Lock to Super_L.
  4. Changed the LWIN and RWIN (now LCMD and RCMD) keysym mappings from Super_L and Super_R to Hyper_L and Hyper_R.
  5. Changed the modifier mapping so that only the CAPS keycode is used for Mod4. Since Mod3 wasn't previously in use, I mapped Hyper_L and Hyper_R to this modifier.

Configuring new shortcuts

In System Settings -> Keyboard -> Shortcuts, configure these shortcuts:

Mac For Ubuntu 11 10 Key

SectionShortcut nameKey
NavigationSwitch applicationsCmd+Tab
NavigationSwitch windows of an applicationCmd+`
WindowsToggle fullscreen modeCmd+Return
WindowsClose WindowCmd+Q

In Terminal's Edit -> Keyboard Shortcuts, configure these shortcuts:

SectionShortcut nameKey
FileNew WindowCmd+N
FileClose WindowCmd+W
EditCopyCmd+C
EditPasteCmd+V
ViewZoom InCmd+=
ViewZoom OutCmd+-
ViewNormal SizeCmd+0

I think the biggest benefit of the new Terminal shortcuts is the use of sensible copy and paste shortcuts that don't interfere with using Ctrl-C and Ctrl-V in the shell.

Future hacks

The following improvements are left as an exercise for the reader:

  • Have xkbdcomp load the new mapping every time you log in, so you don't have to run it manually.
  • Make other applications (such as Google Chrome) recognize Mac shortcuts such as Cmd-C and Cmd-V.
  • Figure out a generic way for specifying key translations for specific apps that happen to be in the foreground, similar to the functionality that AutoHotkey provides for Windows. (compiz plugin?resurrect the deprecated XEvIE X11 extension?)

Update, November 7, 2011: AutoKey

In the comments, Nivth Ket brought to my attention the AutoKey tool for mapping arbitrary keys to other keys, phrases, or even Python scripts. This tool seems to use the XRecord extension to X11 to listen to incoming keys. I gave AutoKey 0.80.3 a test drive, and found a few limitations that clashed with my needs. However, with a few hacks, I think I've overcome these limitations and found a solution that seems to work for me so far. The limitations and workarounds are as follows:

  • The AutoKey GUI does not allow assigning the same hotkey to multiple actions. This prevents me from assigning a key combination to do one thing in a particular application (i.e. the window title matches 'Google Chrome'), and something else in every other application. The workaround is to edit the configuration files in ~/.config/autokey/data directly.
  • AutoKey does not have a notion of order semantics for the entries — the entries are processed in a seemingly random order. Therefore, if my entry for 'Cmd-V with no window filter' happens to come before my entry for 'Cmd-V only for Terminal windows', the former will eclipse the latter, and the Terminal-only rule will never happen. My workaround was to hack AutoKey to always process entries with filters first, then process entries with no filters. Here is the patch.
  • AutoKey does not support the little-known 'Hyper' modifier key, which I use in my layout for the 'command' keys. My workaround was to hack AutoKey to support the Hyper modifier. Here is the patch.

Downloads

  • mackeyboard.xkb - The xkb file for my keyboard, suitable for loading into a running X server with xkbcomp.
  • mackeyboard.diff - The changes I made to the original keyboard mappings.

posted at 2011-10-16 18:58:35 US/Mountain by David Simmons
tags: mac ubuntu keyboard
permalinkcomments

Creating a USB Boot CD that can be used to boot your Ubuntu Live 11.10 USB Flash Drive from a PC or Mac with a BIOS that doesn't natively support booting from a USB device (USB drivers are loaded from CD). I used a Macbook Pro to test this tutorial. This process is similar to our older USB Boot CD for Ubuntu tutorial, with new requirements added to make it work with 11.10. A boot menu option has been included for booting from a Macbook (forcing bypass of the Nouveau nVidia drivers, which do not play well with a Macbook.).

Boot CD for Ubuntu 11.10 USB Prerequisites

Mac For Ubuntu 11 10 32

Mac For Ubuntu 11 10
  • PC or Macbook that can Boot from a Live CD
  • USB flash drive with Ubuntu preinstalled
  • Working CD Burner and USB Port
  • Active Internet Connection

Making a USB Boot CD to Boot Ubuntu 11.10 from a Flash Drive

Note: I prefer to perform the following steps by booting from a prebuilt Live Ubuntu Flash Drive created using UUI, using a machine that does support booting from USB. This allows us to free up the CD Burner and use it to burn the final ISO.

  1. Insert your Ubuntu Live USB (or Ubuntu CD) and restart your computer, booting from the CD or USB
  2. Open a Terminal
  3. Type sudo apt-get update
  4. Type sudo apt-get install --reinstall nvidia-current grub
  5. Type mkdir -p ubcd/boot/grub
  6. Type cp /usr/lib/grub/i386-pc/stage2_eltorito ubcd/boot/grub
  7. Type gedit ubcd/boot/grub/menu.lst
    Add the following information to your menu.lst file and click save:

(red text is to all be one line)

title Start Ubuntu from USB DISK (MACBOOK)
root (cd)
kernel /boot/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper noprompt cdrom-detect/try-usb=true persistent nouveau.noaccel=1 blacklist=vga16fb
initrd /boot/initrd.lz
boot

title Start Ubuntu from USB DISK (PC)
root (cd)
kernel /boot/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper noprompt cdrom-detect/try-usb=true persistent
initrd /boot/initrd.lz
boot

  1. Type cp /cdrom/casper/vmlinuz ~/ubcd/boot
  2. Type sudo gedit /etc/initramfs-tools/modules
    Add the following lines to the modules file and click save:

    usbcore
    usb-storage
    uhci_hcd
    ohci_hcd
    ehci_hcd
    sd_mod
    scsi_mod

  3. Type sudo gedit /etc/initramfs-tools/initramfs.conf
    Add the following line to the bottom of the file and click save:

    WAIT=8

  4. Type sudo mkinitramfs -o ubcd/boot/initrd.lz
  5. Type mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o usbcd.iso ubcd
  6. Insert a blank CD and type brasero -i usbcd.iso (to burn the usbcd.iso to a CD)

Mac For Ubuntu 11 10

Make a USB Boot CD for Ubuntu 11.10 published under Use a Boot CD to Boot from USB