Mac GNU/Linux install, i3-wm setup & usage, homebrew, iTerm 2, & other thoughts.

Hello everyone!

So, the semester has had a fair amount of time pass and I decided to finally get a post in about a good amount of things I’ve experienced so far in the class and what not. Alright, so let’s get this started:

Installing GNU/Linux on it’s own partition along side Mac OS X Mountain Lion 10.8.2. Goodness, all I have to say about this is that it was pretty terrible getting things worked out. All the blame is able to be aimed at the almost infinite amount of incorrect and outdated “documentation” there is in a google search. The first time, after a couple tries and trying to tweak various things to get the Linux boot to work or trying blah blah blah to make blah work, I had to ultimately completely restore my Mac from a Time Capsule backup. I upgraded the harddrive in my computer so it was basically going to have to restore around 400GB of stuff back from this time capsule back up so that took about 24 hours. Ha, good start right? This was after screwing around with this first set up terribleness for about 4 hours. This first round of terribleness was caused by something I totally knew about already but had forgotten about at the time making it much more terrible haha. And this was the fact that there is a “security” feature for Mac’s that doesn’t let you boot anything or install anything from bootable devices or CDs if they are connected via a USB port. Just use the CD drive you say? Well, I took out my CD drive to have another HDD installed. So, how did I get GNU/Linux installed? Yeah, you got it. I had to take out the extra HDD, put back in the CD drive, install it to the partition on my original HDD, take the CD drive back out, put back in the extra HDD, and then use my computer like normal. What a mess! But that isn’t the half of it! The first time I did this, I messed up the install. Basically, I think it came down to either you cannot have a /sda/boot partition because the installer will try and write the MBR there AND/OR you CANNOT let the GNU/Linux install write the MBR to Mac’s boot record whatever because it’s a different type of boot record that is called EFI so it will mess things up AND/OR you have to, for sure, write that GNU/Linux MBR to the ROOT ( / ) directory or your life will end instantly AND/OR the ROOT ( / ) has to be the first after all your Mac (and bootcamp Windows install if you were triple booting) so it can see that boot record you installed to that ROOT partition and load up GRUB (or LILO or whatever you decided to use) and load up your GNU/Linux install. Gee, that all seems really simple, doesn’t it? Yeah, not at all. I eventually got it all installed after at least 3 days total of screwing around. Brutally… fun…?

So, wow, that was great! I then had it going in class with mostly everything I needed installed and wanted to switch from the windows manager that came with my install and use i3 (which if you don’t know what i3 is, it’s the windows manager that Darren uses on his GNU/Linux install on his Mac so take a look at that in class). i3 is pretty much the definition of useful and productive. Pretty much very little to no mouse usage, relatively simple hot keys, window management made easy, great stuff. Well, after I first got it installed, I had no idea how to open a terminal window haha. The mouse does nothing on the desktop and there are no menus or anything available (which is fine because that’s the point) but I could not figure it out after 5 minutes so I eventually ended up having to google it from my iPhone haha. OKAY! Got it! mod-return. Mod is whatever key you decided to set it at when you first start and configure i3. Usually, it’s the windows / command key or the alt key. Those are the two most popular. I continue to play around with this and do the first homework assignment on this install. Only a few things that aren’t configured that I need like how to make the laptop go to sleep when I shut the lid, some things about the scroll pad that do some behavior that is goofy like scrolling really fast, things like that. But overall, I got it going nicely. It is still a little annoying having to reboot to do linux homework or what not.

This is where homebrew comes in. On the Mac side, there are a few popular community supported equivalents of yum, apt-get, emerge, etc aka package managers. There is Mac Ports but I’ve used that before and it’s the definition of pain. The more logical, popular, and less painful one is homebrew. Homebrew is awesome. Just like “apt-get install blah” you can do “brew install blah” and it will more than likely have a Mac ported version of the things we have in Unix class. And this allows me to do a few things I couldn’t on my other partition, namely listen to music (I could have configured a music player on my other install but iTunes has everything already together since I’ve been on my Mac side longer), not have to reboot, learn to navigate my computer with the terminal instead of the Finder, etc. So, I eventually got everything set up here all easy (an hour tops I think) and got connected to the IRC server with mosh / ssh and tmux with a little help from Darren after class and bam, I’m pretty much golden!

Darren suggested I check out iTerm 2 which is a better Terminal emulator than the Mac terminal because it adds some slick features. So I did. He wasn’t kidding. iTerm 2 is awesome. I love it. Better hot keys, better usage, plays better with weechat and IRC, just better. So now I leave iTerm 2 full screened and try and basically play in that window more than I do in my other desktop windows essentially making the iTerm 2 terminal my home stomping group over using my mouse to click around. I can’t live in there forever, of course. I have to write blog posts, check scholar, Skype, iTunes, etc, but that’s much less Finder usage which means I’m more efficient. Finder usage is equivalent to slow.

I was going to have another section on “other thoughts” but I think I’ve written more than enough and tortured anyone actually reading this long enough! I will say this though: bash programming is rough. Until next time everyone, stay awesome.

-Mattie (pengii23)
—–
Currently listening to: “Gravel (Original Mix)” by Feed Me

Re: the little things of ubuntu

In a recent post thomaswy mentioned some things he liked about the CLI in Ubuntu (Linux in general, running bash in any distribution should yield an extremely consistent experience) and some things he disliked about the GUI. He’s not alone, just do a quick google search for “what I hate about Ubuntu Unity”.  Luckily, there are numerous ways to resolve this.  If you read the “Futures” chapter and other bits about the X-windows system in The Art of Unix Programming you learned that to remain consistent with the Unix design philosophy the designers of X created a clear separation between policy and mechanism.  A result of this is several graphical toolkits available to developers who want to create a GUI, and a result of *this* is many different GUI environments.  Unity is but one of them and just because it comes packaged with Ubuntu doesn’t mean that’s all Ubuntu can use.  If you aren’t in love with Unity, consider some of the alternatives:

Alternatives to Unity

and because it didn’t make it onto the previous list:

Cinnamon

And that is but a small sampling of the graphical environments available for Linux.  A more complete list quickly becomes overwhelming

21 of the Best Free Linux Window Managers

and that still doesn’t include the one I use, i3.

It’s easy to see why Ubuntu, a distribution aimed at the casual user, would opt not to emphasize the amount of choices you have when it comes to picking a graphical environment!

And then many of the environments are further configured through themes and settings to control the look and feel and behavior for events like “click on a minimized window”.  Yes, you can easily spend a day or more finding and configuring the “perfect” desktop.  But that’s what makes Linux fun ;-)