Super Spread Sheet S³

Or little computing tricks and hacks

Category Archives: Curious user

Adventures with Ubuntu in a MacBookPro9,2

My daughter came to me one day: “Mum, my Mac is kaput”. When upgrading, the computer just hang. After all the diagnosis possible, we figured it was a disc crash.

A mac techie acquaintance took the computer and after checking it up told us that he could replace the disc and … install Ubuntu! Yes please!

After getting the computer back I started playing with it, connect to the wifi, install this, download that, why is the Ubuntu version only 14.04? Let’s upgrade. After all we are only a few days from the next release 15.10. Hmm, there are errors. We need to reboot, yes, no, ahhh. Kernel panic…

… After some research I had some interesting findings.

There seems to be a tie between the Mac model and the Ubuntu release. This page shows the recommended Ubuntu release to the specific MacBookPro hardware model. They recommend the latest LTS when the user is not sure of the release to install. I was reticent to leave 14.04LTS, but looking at this wikipedia page, I was reassured that this particular version’s support runs until 2019-04! By then this Mac should be history!

To install according to the Mac’s model, first find out the hardware type by typing the following:

sudo dmidecode -s system-product-name

The output in my case:

MacBookPro9,2

And there is where I noticed that 15.04 was not going to work. So I proceeded to reinstall 14.04LTS from a usb stick and that was like a breeze, only after reading how to boot from a usb stick in a Mac:

Insert the Ubuntu LiveCD into your Mac and Shutdown. Restart the Mac and hold the Option Key. When the boot selector screen comes up, choose to boot from the CD.

The full installations instructions can be found here, but I just followed the section “Single-Boot: Ubuntu Only”.

All good except that the wireless card did not seem to be set up. But it was working before so it can be done. I did get scared when I clicked on the MacBookPro9-2/Utopic Unicorn link, and it read that wireless was not supported. But Utopic Unicorn is 14.10. And I have 14.04 Trusty Tahr.

Roughly these are the steps to follow to set up the wireless connection.

Identify the wireless chipset

This can be done in a couple of ways:

  • lspci | grep Network
  • lspci -vvnn | grep -A 9 Network

From the commands I learned that

  • The Chip ID is BCM4331,
  • The PCI-ID is 14e4:4331, and
  • Kernel driver in use is bcma-pci-bridge

Find the drivers for the chipset

This guide contains a full description of specific drivers supporting Broadcom BCM43xx Chipset. And there are a different instructions that one could follow. IN my case the chipset was supported by more that one driver but what worked for me was the section b43 – No Internet access:

  1. Install the b43-fwcutter package.
    cd /media/pool/main/b/b43-fwcutter/
    sudo dpkg -i b43-fwcutter* 
    
  2. Download the firmware file from here unto a computer with internet connection.
  3. Copy the file to your working directory (yes, using a usb stick). In a terminal use b43-fwcutter to extract and install the firmware:
    tar xfvj broadcom-wl-5.100.138.tar.bz2
    sudo b43-fwcutter -w /lib/firmware broadcom-wl-5.100.138/linux/wl_apsta.o
    
  4. Restart the computer or reload the b43 module by switching between drivers. I did the later.
    First unload all conflicting drivers (this includes removing the driver you’re trying to install):

    sudo modprobe -r b43 bcma
    sudo modprobe -r brcmsmac bcma
    

    Then load the driver to use:

    sudo modprobe b43
    

And by magic I now have a wireless connection, and life is good again!

Related links

  1. https://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Ubuntu_15.10_.28Wily_Werewolf.29
  2. https://help.ubuntu.com/community/MacBookPro
  3. https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation
  4. https://help.ubuntu.com/community/WifiDocs/Driver/bcm43xx
  5. http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2
  6. http://askubuntu.com/questions/338210/broadcom-sta-wireless-driver
  7. https://en.wikipedia.org/wiki/Station_%28networking%29
  8. https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported

LibreOffice window resizing

My daughters eeePC is still running an old version of eeebuntu. I know I should update to something lighter and newer, but I haven’t.

She came in panic, telling me that all she had in front of her was terminal. When I asked how she got it, she said that she pressed ctrl F4.

That action takes you to one of the predefined ttys as described in http://ubuntuforums.org/showthread.php?t=1257533. Except that an answer there states that

… CTRL+ALT+F1 though F6 brings you to one of 6 predefined ttys.

except that for my daughter’s version of Linux CTRL+ALT+F1 is the gnome space.

She got to that state when she wanted to resize he LibreOffice window which was fullscreen without any controls. After looking everywhere for shortcuts to resize windows to no avail, the answer was found in http://forum.linuxmint.com/viewtopic.php?f=42&t=100046:

  1. Close all libreoffice files.
  2. Go to home folder ~/.libreoffice/3/user
  3. Rename registrymodifications.xcu
  4. Delete registrymodifications.xcu
  5. Restart libreoffice file that was opening un-minizeable.

eog oversized

I have the following problem: when viewing pictures with eog (eye of gnome), the window size always exceeds the screen size, whether I’m using the laptop screen or the attached monitor.

Looking for solutions in the internet, I found that it is a reported bug. They don’t offer any fixes, rather a temporary hack: “a quick and dirty workaround is to use the CompizConfig Settings Manager (ccsm) to enable the Window Rules Plugin, then add “name-eog” in the maximized dialogue.” So under the “Window Manager” category, click on window rules to enter the options. The box also had to be clicked.

categories of ccsm

categories of ccsm

Window Rules Plug-in

Window Rules Plug-in

I thought that this had an influence in the terminals (somehow) when I ctrl’ed + or – to change the font size, the window does not change its size and as far as I’m concern, this is a new undesired behaviour. Of course it doesn’t, so looking for a solution for that.