Tuesday, January 29, 2013

Getting Fedora 18 set up on VirtualBox: Round 2

Wow, sure has been a while since I've set up a new Linux machine. I am missing all my aliases and keyboard shortcuts!! Ahh!!

Learned a few more things tonight. Apparently the default user you make in Fedora 18 does not have Administrator access, so that's why I was having problems doing anything outside of root. I just learned the difference between "su" and "su -" as well. You can put a user into a group called "wheel" that gives sudo access which is fancy. I guess I haven't set up a machine in quite a while, and I am used to having these things all work a certain way from the get-go. Crazy times. Anyhoo fiddled with this for a while and got it to work.

For some reason you can't right click on the background to get a terminal?!?!? That's NOT default Linux behaviour, which was really surprising. For that I needed ot install "nautilus-open-terminal". Who would have thought? (*Note, turns out this is just cause I am new to Gnome 3, and these are all Gnome 2 features I am used to, so you can install something called gnome-tweak-tool that allows you to do stuff you'd expect to be able to do on Linux, like right click the background and get a terminal window.) :)

Ok this is pretty sweeeet. The website http://extensions.gnome.org has a bunch of add-ons you can load just from a web browser, and they will install on your local machine. Pretty sweet. That allowed me to get a nice quick launch sidebar and some other useful stuff.

Alright back to work trying to get my build of the Sugar OS running!

Almost there...
As it turns out my problems last night were related to software group permissions (ain't that always the thing, eh!) After I got some great advice from one of the friendly folks at Sugar Labs who said it looked like an "Authentication Problem", I realized I was trying to run the code as "mjutan", but I had sync'd and built as "root" (since mjutan was not a sudoer when I tried to do this yesterday). All of this led to my build not launching.

After all is said and done... I've got Sugar running from source code I built!!!! Hooray! This is great news. I'll need to install some other activities but then it ought to be pretty straightforward from this point to iterate on the work and see the results back in Sugar. Very nice.

Sugar OS, running from built source code on Fedora 18, which is emulated on my Windows 7 machine through VirtualBox

Hooraaaay!!!!!!! Awesome to get this going. Next step will be to read through the "Make your own sugar activities" manual in full (or as much as I need to) and then start planning the changes I am going to make to the existing Recording app, or alternatively plan out my own app in more detail. I gotta see if I can playback movie files through this VirtualBox thing, hopefully my video card doesn't freak out.

More details as I figure 'em out :) Till next time... Mike :)

PS More good news. Audio and Video playback both work in the VirtualBox instance. I tested running a .ogg file with audio and video and it looks good. So that means I'll be able to test playback with pre-recorded ogg files from my XO laptop. Sweet.

Monday, January 28, 2013

Setting up Fedora 18 virtually on Windows as a Dev Environment for Sugar Activities

I had the pleasure of attending OLPC-SF's (One Laptop Per Child, San Francisco Chapter) 5th Anniversary event here in SF this weekend. It's amazing that folks have been working on exciting projects together for 5 years already, and I feel lucky to have met all of these interesting and awesome people, albeit coming to this game only relatively recently!

Since being first inspired to jump aboard and do my part for OLPC, I've got my own XO 1.75 laptop (courtesy of the lovely ladies from OLPC Canada) to experiment with and test my work, and I've managed to get SoaS ("Sugar on a Stick") installed via Oracle's VirtualBox on my development machine at home. This was pretty straightforward, and I documented some of the steps on this previous blog entry.

If you are interested in developing Sugar Activities or contributing software skills to the OLPC effort, contact the fine folks on the Sugar Dev team here or email me at jutanclan (-at-) gmail (-dot-) com and I'm happy to give you a hand or pass you along to the right people/helpful website.

In the background I've been slowly making my way through this excellent Floss manual ("Making your own Sugar Activities") and I thought I'd do a bit of screen-capping of my own as I go, to document my own process, and to help anyone else who might come across this and have an interest to develop for OLPC too.

If you're like me and born after 1980, you grew up with Microsoft Windows and you might not use Linux at home... even if you are a Computer Scientist. (I know, I know.) ;) I have a Win 7 Dev machine and a Mac Mini, and my Win 7 machine has a massive HD and is my main go-to machine... so I've decided to install the Fedora 18 Operating System via VirtualBox. You can also do a dual-boot scenario, but VirtualBox really seems to have improved over the years, so it makes it easy to virtualize a machine... plus that idea is just kinda cool, and sortof crazy that this works.

You really need Linux for developing parts of Sugar or Sugar Activities, so I'm installing the newest Fedora (version 18) now. First I made a new VirtualBox machine, and labelled it "Fedora 18".

Fedora 18 Virtual Machine in VirtualBox
Then I downloaded what's called an "ISO" file, also sometimes referred to as an "Installer". This was from the Fedora site: http://fedoraproject.org/en/get-fedora



If you get an error like this, go to the Devices-> CD/DVD Devices menu and select "Choose a virtual CD/DVD disk file" and point to the ISO file you downloaded from the Fedora site.

Reboot the Virtual Machine from the "Machine" menu, then you should see something like this.


This is a good sign. Let's get started!

Log into Fedora, and start setting up your user/account. You can just select Live System User for now, that's a quick way to get started.

Well that certainly was easier than installing Linux ever used to be :) Now we've got Fedora 18 up and running, and humming along fast enough. I just noticed my VirtualBox settings are only giving this Virtual Machine 764Mb of RAM, so I up'd it to 1GB, and also gave this machine 2 Procs so it'll run a little faster.

We're in!
You'll notice this isn't running at full resolution either, it's not taking up my entire screen. That's pretty annoying, but VirtualBox has a way to fix that. Just google "virtualbox larger resolution" and you'll find lots of pages explaining how to extend the size of the window.

Now let's install the OLPC Sugar Operating System locally on this machine, so we can have an area to test our development going forwards.

First we need a terminal window. I was surprised you couldn't right-click on the desktop by default to get a Terminal window, but it is easily found in the "Activities", "System Tools" area.


Ok now, let's follow the very helpful instructions for getting the package of Sugar from the Sugar Development site, and install it to our Virtualized Linux machine.

Now that you've got a terminal open, run the following 3 commands:
1) su (press enter. This puts you into "root" access mode, allowing you to install software locally)
2) yum groupinstall sugar-desktop (press enter, then wait for a while while it downloads) Note: I had this freeze on me at action 46/106, and it stopped installing... I had to do a reboot of the virtual machine and just try again....
3) yum install sugar-emulator

Installing...
Ok this stalled on me a few times and was generally unstable. I decided it was probably a bad idea to be running this "Live System" mode on a Virtualized Machine, so I went through with the rest of the installation instructions listed here.

The installer finished and I had a "real" Fedora install now rather than the sortof temporary "Live System" one, better place to start from. Then I rebooted and things are already looking more reasonable. Things run much faster now.

I tried again to get VirtualBox to do a higher resolution screen but it was taking a while and I ran out of patience ;) It's harder to get that to work than it should be, but I remember getting it going ages ago for another older project. I'll figure that out and post it another time. (Edit: turns out I just needed to change desktop settings in Fedora itself - duh. Should have checked that first).

Building Sugar

Then I decided it was probably wiser to just BUILD sugar from scratch rather than to install it, since I am going to ultimately be modifying activities and testing them anyway. There are great instructions for this here.

First you need git for code repository access. You can install this with:

yum install git-core

Then follow those great instructions on that previous page I linked. This setup is pretty great because all related dependancies are contained within this script and it gets all the related libraries and does an install of everything that is needed. Pretty sweet.

Looks to be working much better than my earlier atempt

Alrighty! Looks like it built perfectly which is awesome. Now I tried to run it... and I got a few errors. Looks like I might have messed something up with my dual monitor setup in VirtualBox, so that might be messing with stuff. I'll try to get that worked out for next time and post the details.

That was a pretty good hack-a-thon to get this off the ground. Soon I'll get it running and then I can start digging into the code for the Activities themselves. Boom!

Friday, January 25, 2013

J.J. Abrams to direct Star Wars Ep 7!!!!

Confirmed as of this evening... J.J. Abrams will be directing Star Wars Episode 7!!!!!! Ahhhhh!!!!!! So amazing:)

http://starwars.com/news/star-wars-is-being-kick-started-with-dynamite-jj-abrams-to-direct-star-wars-episode-vii.html

This is unbelievably amazing news. Oh man he is gonna knock this out of the friggin park!!!!!!

Can't wait :)

- Posted using BlogPress from my iPad