Happy 2012! Install Linux on your MacbookPro


My last project of the last year was to get ready as a linux user. All my setup in OSX was targeting toward ‘getting used to using terminal,’ and after all, I couldn’t wait to move to Linux.

Yeah. I have only Apple computers (PowerPC, MBP 4,1, MBP 8,1) , and after a long time as a Apple user, I feel very much tired of how the apple system becomes ‘closed.’

I know a lot of people might argue about this, but I would like to be able to configure my own environment that follows users’ preference, not something that a system offers for the users to fit into.

I though linux is perfect for that,  although after some time of struggling to install, and having a scary moment that I needed  to ‘open up’ my laptop, and now all my three old and new apple computers have both osx and linux!!! yay!!

Alright. so I would like to briefly talk about how I installed it, and what, and of course, everyone can find this from ubuntu forum with better detailed explanations. I deeply admire those people who give this document to everyone.

 Macbook pro 4,1 -> Ubuntu 11.10

For the Macbook pro 4,1; I installed Ubuntu 11.10 Oneiric Ocelot (http://cdimage.ubuntu.com/releases/11.10/release/) . Well, before I found this ‘mac’ specified version, I installed like… 5 different versions, and threw away all cds and dvds that I experimented.

So for you, this will be helpful. I downloaded ubuntu-11.10-desktop-amd64+mac.iso .

My CD room of the computer is broken. But i was able to install it with my usb stick. The thing is that Ubuntu forum explains how to install with USB. But somehow it was not working (failing to boot from there properly.) After a while of googling, I found this application for window. (yeah. I also have a window installed with VMware, this is just to do ‘online banking’ from Korean banks…!!)

This progam is called UFDISK. (download : http://goo.gl/UYitG)

You put your usb stick into the port, and run this. (backup all your files before) then you push ‘Auto run’ . Select your iso file, and run it. Then done!!

Then you need to install ‘ReFit’ (http://refit.sourceforge.net/)

After install, open the terminal and type

sudo sh /efi/refit/enable-always.sh

then you will see this when you boot,

you can select your usb to boot it.

Some remarks on Refit

When you first put your usb (or cd) and run REFit, you will see the login window that you can choose from where to boot. Before you choose, at the bottom part, there are some menus like shell script.. I don’t remember by heart right now, and choose the second one, and run. This will make everything suitable to boot. Then ‘shut down’ once, and then on next boot, choose your booting harddrive.

Make sure you are connected to internet (ethernet connection), and for more help, http://www.ubuntubuzz.com/2011/10/ubuntu-1110-in-macbook-pro.html

 Macbook pro 8,2 -> Ubuntu 11.04

here, I needed to have both CD, and USB in order to boot properly. Go here http://cdimage.ubuntu.com/releases/11.04/release/ download ubuntu-11.04-desktop-amd64+mac.iso

For the procedure for usb, please look up, and for burning CD, just to burn with DiskUtility on osx. (I have ‘lion’ installed)

Also you need REFit. (also look up for the explanation and download) On lion, I had a hard time for this to run. After few times of reinstalling, it was just working. I cannot explain what it was.. but it works!

Alright. Then put usb and CD together. when Refit login window, you will only see two linux install. Choose the first one, and run the install.

Make sure you check this site : https://help.ubuntu.com/community/MacBookPro8-1/Natty for more help and additional install.

 

Some remarks :

For ubuntu 11.10, I made two partitions for ubuntu, one as root(/), and one as /home. (except for swap disk) this was working fine. But on ubuntu 11.04, this was not working. (trouble on booting with Refit.) so do not make seperate partitions for your ubuntu. just make one, (again, except for swap disk)

 

Hope this helps. well, I had a hard time figuring out all. I might have missed some important part that I was struggling. Then I will update later on.

Now I have Ubuntu working with ‘awesome’ window manager. Good bye mouse!

 

**28.02.2012 updated:

If you have an issue with rEFit regarding OSX security setting, check this page. It will guide you the way.

http://sourceforge.net/tracker/?func=detail&aid=3488641&group_id=161917&atid=821764

Adios 2011 !

After finishing my final concert of the year 2 weeks ago, I finally had some time to organize my computer, configure the working enviroment, renew my blog. and study many different things!

The first thing that I wanted to study is VIM in order to get used to it more and more and be comfortable when programming. My final goal will probably be to make my osx Lion into Linux. But so far there are too many issues to solve in order to do that, such as to find a nice soundcard that I can work on both systems.

Well, anyway, I was not so close to terminal for instance. Few years ago, when my friend was telling me that some of the people are checking their email on terminal, I was baffled by it. Who knew if I would do that.. So, I was digging into the possibility and found ‘Mutt.’

Mutt

It took a while to configure everything. The main issue was to use both Gmail and Hotmail, and to make it possible to read RSS feed. Due to many helps in google search, anyway, I am now using it.

Another big change is to use Midnight Commander instead of Finder as the window manager.Midnight Commander

The main issue for me on Lion was of course its usage of memory, but above all, I dislike this closed format that I cannot change anything, cannot watch the hidden files well, and without mouse, is hard to be flexible in use, and the amount of finder windows that I need to deal with.

Of course at the beginning, I was very much struggling with all shortcuts. But the best way to get used to it is to use lots and lots. and now, I feel pretty much comfortable.

 In order not to use finder (turn it off), I turn on ‘Path Finder’ when I log in to my system. Path finder has an option to ‘kill’ the finder without any harm on system. Then I turn it off, and turn on iTerm2, the replacement for osx Ternimal.

The black background, together with this new blog design, is due to the condition of my eyes. According to what doctor says, I have a brighter sight than others. So that I feel tired easily. Black background feels always comfortable to me. Also, in finder this is totally impossible.

Well, then I fixed this blog. I was using ‘Textyle,’ one of the blog environments from Korea, and it was way to slow. I really wanted to change it into WordPress but didn’t want to blow away the whole posts that I have written for 10 years. Yes!! Next year will be 10 years birthday of my blog. That became a motivation, and at the same time, I found a nice converter that a Korean programmer developed. Thanks to him, here I am.

Yes. time goes by. I am quite surprised that I have been running this blog for 10 years. But quite embarrassed by the content. Since I am developing myself, as I have been aiming to share what I have and think, I would like to make more efforts on running the blog. To post nice contents, first I need to study more though. 🙂

Happy that some of the missions have done. Personally I had a difficult year; finishing my study, hit by motorbike, and trying to stay in the Netherlands, etc etc.

But this moment that I am saying good bye to the year 2011, I am sure that next year it will be very much fruitful, and I go for it.

I never knew how much people are actually enjoying my posts. But whoever reads this, Merry christmas and Happy new year!

oh, and someday, I will get back to the subject of configuring Mutt and MC.

Supercollider and Vim (SCVim) in OSX

After a while struggling with the supercollider editor, which for me has an issue with lots and lots of windows floating around the window, I decided to move to another editing environment to code SuperCollider.There are several options for this, such as using TextMate with sc bundle(https://github.com/sbl/scmate.tmbundle), but I wanted to have a more simple platform.

Then there was ”VIM’ and SCVim. (for more options : http://supercollider.sourceforge.net/wiki/index.php/Systems_interfacing_with_SC)

I will explain a bit how to make a proper install in OSX. (Lion, 10.7.2 at the moment of this posting)
First of all, I normally compile SC from the latest source using git. (for more information about download the latestSC source codes: http://supercollider.sourceforge.net/developers/)
In the source folder, there already is the editor source for SCVIM in the editor folder.
Go to the folder /yourSCSourcedirectory/editor/scvim.
If you want to compile scvim seperate, using those command

cmake ..
make
sudo make install

Then your scvim is located in /usr/local/bin/scvim (to see where your scvim is located: type this in terminal ‘which scvim’)
I assume that your SuperCollider is located in /Applications/SuperCollider, which by default this newly compiled supercollider should be there,
scvim is working by an application called ‘sclangpipe_app,’ which makes possible to run sclang.
When you run scvim, it automatically opens up this sclangpipe_app and this should be able to link all your SCClassLibrary and library files.
In your folder, you see the library files such as libsclang.dylib.
(In the official SuperCollider, you don’t see this so that you can skip this part) and those files should be symlinked to sclangpipe.
To do so, type this in your terminal

cd /usr/local/lib; sudo ln -s <build-dir>/SuperCollider/lib* 

There is another problem with scvim + sclangpipe_app.

When you run scvim on your terminal, your sclangpipe_app is not entirely loading SCClassLibrary, which somehow doesn’t work properly.
So that you need to execute sclangpipe_app seperate from scvim.
In order to do so, I use shell script that automaticallt does this job.
This is the example.

#!/bin/bash
open -a "iTerm.app"
  killall sclang
  /usr/local/bin/sclangpipe_app -l /Applications/SuperCollider&
  sleep 0.5
  open -a "iTerm.app" /usr/local/bin/scvim

I saved this file as ‘scvimsc’ and did ‘chmod +x scvimsc’ to make it executable, and put it into the folder /usr/local/bin/ .
Then what you need to do is in terminal, just type

scvimsc

Then it will automatically open both scvim and sclangpipe_app in a proper way.

 

Optional use of iIerm2 for scvim

I use iTerm2.app(free application) instead of default osx terminal, because I like the way it can do window management.
I wanted to put both ‘post window’ and ‘editing window’ on ‘one window’ so that I do not need to have several windows floating around.
In order to do that, you need to use apple script instead of shell script to set up this.
This is the apple script that I use.

tell application "iTerm"
activate
  -- my project workspace
  set myterm to (make new terminal)
  tell myterm
  launch session "sclang"
  set number of rows to 150
  set number of columns to 40
  tell the last session to write text "killall sclang"
  tell the last session to write text "/usr/local/bin/sclangpipe_app -l /Applications/SuperCollider"
  tell i term application "System Events" to keystroke "d" using command down
  tell the last session to write text "scvim"
  set number of columns to 100
  set number of rows to 10
  end tell

I saved it as an application called ‘iscvim.app’ (from the apple script editor) and put it into /Applications/
So that I can only execute this application to open up iTerms, and scvim, and sclang together in one window!

In theory, this compiling process should be all to make scvim to happen. But surely there is an issue with library links.
But for now all are working fine with some lines on terminal, and can be solved with premade script to make things work.

A nice part of using vim is not only ‘window management’ but also using plugin for VIM. such as snippets for supercollider.
I will get back to this subject some day.
any remarks and commends and questions are welcome.