Run Windows and Ubuntu on a Mac

Posted on: 9th November 2011 No Comments

Now this is the story all about how
My Mac got flipped, turned upside down…

OK, not really. But this is how I installed Windows 7 and Ubuntu alongside OS X on my MacBook. After a serious case of not succeeding. For the record, this is the specifications I worked with: Windows 7, Ubuntu 11.10 (Oneiric Ocelot), and Mac OS X 10.7 (Lion). On a MacBook 5,2 (mid 2009).

After I did a clean install of OS X Lion some time ago, I hadn’t bothered to reinstall Windows on it yet. I need Windows for some programs that come without a Mac counterpart, but so far I had just used my desktop PC for this. But I found it would be better to have the opportunity to use the laptop as well. And while I decided it was worth the boring installation process, I decided to test out Ubuntu on the Mac as well. Try to have a Mac with all three installed at the same time. What could go wrong?

The first try

According to the Ubuntu pages for Mac support, it is recommended to install Windows on a partition that has the room for Ubuntu, and later use a part of the Windows partition for the Ubuntu install. And so I did. And it went all peachy until mid process of the Ubuntu, when the Ubuntu installer told me me partition was under 2.4 GB and could not be used. I aborted the installer and went back to OS X. In disk manager I could see that my Windows partition was now divided into one remaining Windows partition, and several Linux parts. Confusing for me, not used to Linux partitioning. But what was more troubling was the fact that Windows would no longer start, just displaying the message “No operating system found”. So…

The second try

So I decided to delete all of the newly created partitions, and start over. But the Disk Utility in OS X would’t let me delete the partitions created by Ubuntu. So I had to start Ubuntu from he CD, and delete them with the Ubuntu disk utility. In the end I had a “empty” partition, and was ready for a new round. But now Bootcamp (I used this for my previous Windows installations) wouldn’t recognise my partition as somewhere he could install Windows, even if it was a FAT partition.

But the thing with Bootcamp, is that Bootcamp don’t actually install anything for you. What Bootcamp does, is just formatting a partition in FAT and gives you the option to burn the Bootcamp software for Windows on a CD. If you have the CD, you can just create a partition manually, and start the Windows installer. As Windows 7 uses NTFS, and the installer will format your partition as this for you, the FAT partition OS X does will be overwritten anyway. But the CD is important, since you have all the drivers for the Mac on it, making the use much easier.

So new Windows installation, and a new go at a Ubuntu installation. Did it work? Did it feck. Same result, and back to start.

The final try

So back to installing Windows with room for Ubuntu. But this time I cheated, if you look at this with hardcore Linux eyes. I used the Windows installer for Ubuntu, not the Live CD. The Windows installer of Ubuntu lets you install Ubuntu as a program. It will be a genuine OS, and it will dual boot. But you don’t need a separate partition for it, it will be a part of whatever partition you have Windows on. And did that work? Indeed it did. Except for a nomodeset thing that I’ll explain in a minute.

The downside is that to start Ubuntu, I must first choose Windows in the Mac boot screen, and then choose Ubuntu from the Windows boot screen. So it is a couple of extra clicks. Does that matter? Not really. I will only use Ubuntu in addition to my other operating systems, not as my main system. And for that it works great. And it is a solution provided by Ubuntu themselves, so there is no real hack involved.

But is it possible to install Ubuntu so that it will be a treble boot? Of course it is. I’m sure I did something wrong, or missed something obvious. But I’m happy with the solution I got now, and can’t be bothered into checking it more.

Nomodeset

When I first tried to start Ubuntu from the LiveCD, it didn’t work. I started Ubuntu, and then the screen went black. And when I had finally installed Ubuntu on the Mac, the screen just turned in to scramble. It is the same cause and solution for both the situations: In the latest releases of Linux, the video mode setting is moved to the kernel, instead of just external drivers. This is often a good thing, but on some video cards, like mine, it turns tits up. So this must be turned off.

To do so on the LiveCD, press F6 when you are at the startup screen. This will give you a pop-up where you can tick off nomodeset.

To fix it in a Ubuntu installation, you must edit the boot commands in the grub screen. The grub screen is the Ubuntu boot screen, where you can choose your Ubuntu version to run. On my Mac, I can actually choose to run OS X from this screen as well. To edit the commands, press e when you are at the grub screen. This will give you the commands in a text editor. Add the word nomodeset to the line containing the word Linux. And hey, presto, you got a screen.

Default startup system

When you install Windows, it can happen that Windows is set as your default operating system. To change that (or choose that), you can go to System Preferences -> System -> Startup Disk, and choose your likings from there.

rEFIt

To choose another OS than OS X when starting you Mac, you must press alt when you start. If you want the menu to be displayed at every start up, you can install rEFIt. This will give you boot options at every start, and also some disk utilities. Good thing to have if you are terrible when timing your alt strokes. Be aware that it takes a couple of restarts before the rEFIt boot screen appears.



Turn on wi-fi syncing in iTunes

Posted on: 19th October 2011 1 Comment

To enjoy the new cable free syncing between your iOS 5 device and iTunes, you first have to turn it on. Logically.

To do so, just plug in your device, go to iTunes and highlight your device in the sidebar, and click on summary (if it doesn’t go there automatically).

Summary in iTunes

The summary page of your device in iTunes

Scroll down to the Options menu, and enable the wi-fi syncing for the device.

Device options in iTunes

The Options menu of a device in iTunes

And that’s it. And when you want to sync, just go to Settings -> General -> iTunes Wi-Fi Sync and press Sync Now. And presto. Or plug it into a charger, and it does it automatically.

Sync screen in iOS 5

Settings -> General -> iTunes Wi-Fi Sync

The sync requires iOS 5 and iTunes 10.5, and the use of the same wi-fi of iTunes and the device.

I’ve used iPhoto to import my photos from my iPhone earlier, but this doesn’t work with this method. Now I must either set up picture syncing in iTunes, or use the new Photo Stream function with iCloud.

So far, it works like a charm.



Microsoft Outlook 2011, iCal and iCloud

Posted on: 13th October 2011 18 Comments

Almost as expected, there would be some Outlook 2011 issues with the introduction of iCloud this week. But this time, I blame Apple as much as I normally blame Microsoft.

For me, the issues was that my Outlook calendar went missing (as always). As many Outlook users, I use Sync Services to sync between Outlook and iCal, and therefore with my iPhone. But after I installed the latest Lion update, that laid the pavement for iCloud, and signed up for it, the Outlook calendar went blank. All of my calendar entries remained in iCal, but they did no longer talk.

Maybe a simple fix for this would be to turn of iCloud for my calendar, and just continue to sync that old school? Well, it turns out that when you turn of iCloud for the calendar, it removes iCloud content: And iCloud content means your entire calendar, even if the entries originated from iCal to begin with. Nice feature, Apple! If you turn it off on the iPhone, you can choose if you want to keep the calendar entries.

Deactivate iCloud warning

What do mean "user friendliness"? We've stopped doing that.

If you try to export your iCal calendar as an iCal archive, turn off iCloud, and import, the iCloud will be turned back on automatically.

So my solution to keep a happy sync between Outlook and iCal, was to export each calendar (for some reason I have many) from iCal as  .ics-files while on iCloud. Then turn of iCloud, import them in iCal, and we were back were we was before the update. If you want to merge some of your calendars you could do so, or keep them separated.

Export ics from iCal

Export ics from iCal

(Update 14/10: As Ian points out in his comment below: If you have a Time Machine backup of your system from before you turned on iCloud, you can use that for a roll back.)

Another solution would of course be to abandon Outlook, at least until something pulls out a finger from somewhere, and fixes this.

So now I can once again sync Outlook with my iPhone. Surprisingly, the address book sync works like a charm.

Maybe I’ll just go back to pen and paper.



Negative Z-index kills links

Posted on: 9th October 2011 1 Comment

Here is something I stumbled over today: a negative Z-index value in your CSS will kill the links in whatever the Z-index covers. Maybe old info for some, but it was new to me. So if you use Z-index to stack, make sure you only use positive values when handling links.

I was working with two divs on a page, lets call them #boxOne and #boxTwo. And I wanted the top div to have drop shadow, so it looked like it was floating over the bottom one. My CSS looked something like this:

#boxOne {
	background: #BF8C60;
	width: 100px;
	height: 100px;
	box-shadow:5px 5px 20px #000;
	-webkit-box-shadow:5px 5px 20px #000;
	-moz-box-shadow: 5px 5px 20px #000;
}
#boxTwo {
	background: #A66C4B;
	width: 100px;
	height: 100px;
}

But the way the page elements are stacked on a page, meant that #boxTwo was stacked over #boxOne, and breaking the drop shadow illusion. But no worries, I googled stacking, and got w3schools description (don’t judge me!). Summary: set z-index to -1. And I did, by adding this to #boxTow:

position: relative;
z-index: -1;
Stacked div boxes

#boxOne and #boxTwo. From left: no drop shadow, with drop shadow and default stack, changed stack order, and with useless link.

And it seemed to work, all the way until I added a link in #boxTwo. And the link was un-clickable. The pointer didn’t recognise it as a link. Turns out, when you set the Z-index to a negative, it is set behind what is possible to interact with. The solution: give both boxes a Z-index, with #boxOne’s the highest:

#boxOne {
	position: relative;
	z-index:2;
	background: #BF8C60;
	width: 100px;
	height: 100px;
	box-shadow:5px 5px 20px #000;
	-webkit-box-shadow:5px 5px 20px #000;
	-moz-box-shadow: 5px 5px 20px #000;
}
#boxTwo {
	position: relative;
	z-index: 1;
	background: #A66C4B;
	width: 100px;
	height: 100px;
}

So there you go. Always better to be positive!



I’m gonna grab me some screen

Posted on: 18th September 2011 No Comments

Sometimes I need to grab something that happens on my screen. May be for a blog post, a report, or just to show someone something funny.

Where I used to work before, I made a lot of manuals and instructions. And in this work, TechSmith’s SnagIt! became my trusted friend. This is a screen grabber with a lot of options, and it became a revelation to everyone who used it. However, when I moved forward and away from this job, I gave up SnagIt!, since I didn’t want to fork up for something I might get for free in another software. SnagIt! was developed for Windows (the one I’ve used), but has also been released as a Mac app.

After a tip from one of my tutors, I ended up with Jing, also from TechSmith. This is a free software (also comes a a more feature rich paid version), that gave me my basic screen grabbing options. I installed it on both my Mac and PC, and it works the same on both. When started, it features as a little sun on the top of your screen, and it easy to use. All very well.

As I write this, a free app called Skitch, is at number 6 in App Store for Mac’s list over most downloaded freeware. This, as Jing, is a app that sits happy in the background, until you need it, and you have you basic grabbing options covered. And, as the two mentioned above, it gives you the option to edit your grab by adding texts and arrows and other stuff to it, before saving or sending.

But it turns out, that for most of my grabbing needs, I need to look no further than my Mac keyboard. I come a very long way by just using these keyboard shortcuts:

cmd+shift+3 – Saves your screen as a image file
cmd+shift+fn+3 – Saves your screen on your clipboard
cmd+shift+4 – Saves a selection of choice as a image file
cmd+shift+fn+4 – Saves a selection of choice on you clipboard
cmd+shift+4, then hit space – Saves a chosen app window as a image file
cmd+shift+fn+4, then hit space – Saves a chosen app window on your clipboard

The best thing about this shortcut approach, is that the window you are grabbing, remains the active window. Because when you use a app to grab, this grab app becomes the active one, and the window you are grabbing, can fade. And that can give a not so good result.

Be aware, that when you grab a whole app window (by using cmd+shift+4, then push space), the image will be saved with an annoying, fancy shade around itself.

The images that are grabbed like this, is saved as PNG.