07/14/2013 § Leave a comment
An example is worth a thousand words, that’s always been my motto, so when I needed to do some DBus digging I was stymied by the usual lack of examples. There is documentation, but like so much of it in the OSS world its pretty dry, obtuse, and difficult to follow. I looked at several examples around the web and most of them were non-working regurgitations of the examples in the sdk written for Qt. And of course the typical badly-written, broken english nonsense that pervades the web. The example I linked to just now is perported to have been written just 8 months ago! Also, what the hell is going on with Qt!?!?!?! I just installed Mint Linux in a new MacBook Pro Retina as described in my last article and one of the things I do is install my favorite IDEs; usually Qt Creator and Anjuta, but man, what the hell is going on? Anjuta works as it always did but there are these huge black spaces in the IDE as though some graphical component is missing, and moving from Qt 4 to 5 have been very painful. The cardinal rule in the development of user tools should be that certain files are sacrosanct and not to be messed with, or at least backwards-compatible. The Qt project file (*.pro) is one of these files. I spent hours last night and could not for the life of me get an older project up to v. 5 standards. I’m going to try to re-create the project from scratch and import the source files when I can but I shouldn’t have to do that.
So I took the echo example out of the DBus-c++ sdk and sort-of modified it for my own needs (all that means is I re-named some files and created my own Makefile.) Since I installed the sdk with Synaptic and I have no idea what I’m supposed to do with them since they are part of an automake package and I only want the one example I decided to extract them to my home directory, analyze their needs, and like Maslow or Freud, prescibe them long hours of therapy. The result is this archive that compiles on my Mint 15 (3.9 kernel) system and works, with a plain Makefile.
I’m really interested in exploring the DBus systems and probing its capabilities. Now that I have an example that I know works, at least in my context, I can do just that.
07/09/2013 § Leave a comment
I’m so ashamed. I swore off Apple products for ever and here I am again with a new McBook Pro Retina 13″.
I love my Acer S3, but it has problems. Its got 4 Gigs ram, total. The keyboard is prone to spurious typing anomalies (broken words, typing errors, lots of them). The resolution is really low, even for an ultrabook in 2013. The battery lasts 2 hours on a full charge, 2 1/2 if you really pack it. In 2013 those stats are rediculous. Plus I’ve had a banner year so far so I had some spare bux burning a hole in my pocket.
First I went to the nearby Fry’s Electronics and took a look. What I look for in an ultrabook is light-weight and power. I look for the lighest book with the most Ghz I can get. Then I look for RAM, expandability would be nice but that’s REALLY hard to find in an ultra. So, given that the RAM will be static in size I try for the most I can get. That’s also hard. It was impossible to find an ultra with more than 4 Gigs two years ago, ALL the manufacterers were worried about price plus meeting the minimum specs for running Windows 7, so 4 Gigs was the most they were willing to fit the new, hot-selling ultrabook phenomenom with. Now that things are a little more relaxed its easier to find ultras with 6, and even 8 gigs. Another thing I crave is low weight. I know I ask a lot but as a consultant I travel a lot and weight is serious consideration. One thing I really don’t need is a book with a light drive (you know, a CD/DVD drive.) I needed to use one last year to install Windows XP on an old but tiny pc I wanted to use as a media server, but before and after, rarely. If you feel like you need to use plastic light media for anything you need to get aquainted with modern SD Multi Media memory devices. Ever breath on a CD and all of a sudden not be able to read it? I have) yet they were difficult to find, being larlgely relagated to the Japanese market. Lately however that hasn’t been as much of an issue and light-driveless books are easy to come by here in the states.
At the Fry’s nearest to my house I wandered about the notebook aisles until I spied a really great number that met all my criteria. It in fact looked a bit smaller than typical ultrabooks, but at 8 Gigs RAM it would have worked quite well, and I wanted it.
Is there anything worse than a retail store that won’t sell you something? I don’t think so. I found a sales droid and showed her the ultra I wanted to purchase. She spent the usual 10 minutes fumbling about doing who knows what and finally came back and told me should coudn’t sell it to me. I asked her for the display model. She said she couldn’t sell me that one either. Seeing red I left the store. I should have looked on-line for the model and probably would have gotten it cheaper but I was really pissed off. I was on a mission now.
If you’re familure with Fry’s you know its the one retail brick store that, like Mitt Romney’s “binders full of women” has aisles full of notebooks, there’s really no other place like it. The help is utterly worthless but the sheer number of models on display can’t be beat. The only other place better WAS CompUSA, may that establishment rest in peace. So my only other shot, though I was loathe to take it, was another Fry’s. So I decided to haul my butt to the next nearest one, which happens to be the Fry’s in Palo Alto. THE Fry’s. A Fry’s in San jose is certainly near the pulse of Silicon Valley, but the Fry’s in PA would be in the Valley’s heart beat. This is near Stanford University and Page Mill Road, the valley’s trail of venture capital repositories. THE Fry’s did indeed have a number of models available on display, but not the make/model of the one in San Jose that I wanted. But what it did have was a full selection of MacBook Pros with the Retina display. I took a look at the Retinas. Damn the display was pretty. They had both MacBook Airs and the “classic look” Pro models, the new ones. The smallest one caught my eye; it was just like my older MacBook Pro but considerably smaller, and with that increadible Retina display. I also knew that my keyboard issues with the Asus would be completely gone. The crisp MackBook Pro kb design is probably the best in the business. I also knew that I would have problems running the software that *I* wanted to run on it. The latest MacBooks use the new Intel boot process known as Unified Extensible Firmware Interface, or UEFI, and like anything unknown the human reaction is to fear it. Which I did, but its the replacement for BIOS, and not going away. It also complicates Linux installation. Thankfully it doesn’t prevent it, which I first feared, it simply complicates it.
In an effort to be both entertaining, relevant, AND useful let me breifly summerize the process of installing Linux on a Retina. And let me preface the process by explaining that I have absolutely NO use for MacOS, sorry mac fan boys. And I have a larger MacBook that runs Windows 7 when I need that, I also stuffed 16 Gigs of RAM in the thing so I use it for running virtual machines (usually other versions of Ubuntu, the embedded & thin client world is going nuts for Ubuntu for some reason). What I wanted was a small, light, powerful book for traveling with MORE RAM. Since most of my work is on Linux, that’s what I wanted to run.**
First thing you’ll want to do is install rEFInd, and use the “binary zip file”. Don’t get too caught up in the wordy web page that is the rEFInd home page; the author spends WAY too much time explaining the story of rEFInd in tangents. After resizing your disk execute the install.sh script as root using the “–esp” and “–drivers” options. I’m not sure that the drivers option is absolutely nessessary, but the esp one is. If you don’t specify it refind won’t get installed on the disk and when you reboot the machine Linux won’t boot. I went ’round and ’round on that one. Then reboot with your Linux distribution ISO of choice written on a plugged-in USB dongle. There are some instructions on the net saying you need to write the ISO in a special way for MacOS, I didn’t find that to be true. You should see a new boot manager menu with an Apple logo and a generic USB symbol as button selections. This is the rEFInd boot manager. Select the USB option. Your choice of Linux should be a fairly recent so as to take advantage of the EFI boot process, if you insist on using an older distribution you’re on your own, I have no idea what BIOS-based distributions work on the EFI system of the MacBook Pro Retina. After the dry run system (if your distro has a test drive desktop, I think most do now) boots up go ahead and double click the install icon. Installation is the same as always, but be very aware of what you are doing during the disk editing part of the install; you’ll be presented with a gparted (or whatever they do with KDE based distros) dialog. Go ahead and partition the main slices however you want; BUT DO NOT DELETE THE EFI PARTITION. If you want to use the Linux as your sole OS on the Retina thats fine as long as you do not touch the ~200 Meg boot partition at sda1, or whatever device node your boot disk is (usually sda1 on Debian systems). This is the partiton that should clearly be labeled “EFI” in the gparted partition list. I wanted to use this book soley for linux, so when I got to this step I blithely deleted all partitions and created a main slice and a swap area, which normally would work fine. I installed Linux (Mint in my case) and when I re-booted: NOTHING. The machine wouldn’t load Mint.
After doing some research I learned about the newer EFI boot process, that rEFInd was needed to install a new boot loader, and that you don’t want to re-construct an EFI boot partition from scratch. After messing around with re-creating EFI boot partition structures for 3 days (They have to be a certain size, have a certain directory structure, have certain files…) I finally re-installed MacOS Mountain Goat* or whatever and re-tried my Linux installation, this time without messing with the EFI partition. It worked like a charm, my new Retina was running Mint 15.
Here’s some after install pointers, points; I had to install and open up the curses-based alsamixer app and unmute all the sound devices, simply uping the volume controls or messing with them in any way using the usual gnome controls didn’t give me my sound. I also edited /etc/modprobe.d/alsa-base.conf and added “options snd-hda-intel model=mbp101″ as the last line in that file. The HDMI port on the right side doesn’t appear to work unfortunately, and neither does a minidisplay port to HDMI adapter. I was really looking forward to having HDMI out. I don’t know if a miniport to VGA or DVI dapter will. Also this book appears to have two display adapters, one from Intel and one from nVidia; don’t install any of the many nVidia driver options available in the repositories, they don’t appear to work, while the Intel driver works great. Its kind of wierd getting a full 2560×1600 resolution on a 13” notebook LCD. That resolution is so high that I had to step on it a bit to make everything readable. I re-compiled a mandelbrot generating X app I wrote that also prints the execution time in the shell if its launched from that and running it on the Asus took about 9 seconds; on the Retina it takes 5. I get the sense also that this thing has four full core i5 @2.5 GHz processors, not just two real and two virtual ones. I’ve also read reports of the Retina running very hot on Linux, but I’ve not noticed this.
The 13″ Retina is a very powerful ultrabook, a true “Ultra”. I love it. Its really the perfect size with the perfect power and RAM. It’ll run at least twice as long on a full battery charge as my trusty-but-slower Acer S3. I’m looking forward to doing a lot of work on it. I hope linux developers down the road get the ports working, but that’s not going to hold me back.
UPDATE: I spent the latter half of my yesterday building and installing the 3.9 kernel and some Intel support libraries and viola! The HDMI port works!!! I’m staring into the warm glow of my Vizio 26″ HDTV as I type this. Its funny, the Retina’s LCD is STILL higher rez than the Vizio, but its nice to have a “console” sized display. The MicroSD slot on the right works too! I LOVE THE RETINA!! Pricey, and locked down as far as RAM & SSD go, but I’ve come to live with that from Ultras. If you’re looking to run Linux on the 13″ Retina, follow the above directions and then grab the 3.9 kernel and install it. Also grab the intel graphics stack components here. After installing everything (yes, I went ahead and compiled everything from source, getting missing libraries from the baseline repositories when they popped up) I had control over my HDMI and SD ports.
* I have to say that Apple really saved my ass in this regard; the 13″ Retina (and I assume all the latest Pros) don’t come with much in the way of paperwork or media, almost none at all in fact. Just the usual worthless warranty “square”. There is no Mac OSX install disk, nothing. Just the MacBook and that funky, little white power supply. Scary, but in some ways refreshing for a faux minimalist such as myself. Re-installing Moutain Lion was a simple matter of hitting an option-R key combo during the boot process, using the disk utility to re-partition the drive the right way, and then selecting the Mac OS re-install option. Apparently, since I had already configured the book to use my wifi it simply retrived that configuration from *wherever* and went to town. After a warning that the re-install process would be slowed by my use of wifi (a hard ethernet connection would obviously be faster, but who cares?) it automagically just connected to an Apple server (I assume) and re-installed Mountain Lion. The whole thing was really kind of amazing from a geekly perspective and very easy.
** The Apple droids will say that MacOS is a version of Linux. No, its not. It resembles it in better then superficial ways, but its not.