Tuesday, April 3, 2012

Apple... Stop Hatin'

Apple... Why? As a developer I see the benefits of using OSX as a development platform (at least over Windows), what I can't get over is the fact that I can't develop iPhone applications under Linux. I don't mind paying the $100 and going through the review process, what I do mind is being restricted to an inferior operating system on inferior hardware. In my first post I wrote about my setup, 8-Cores 8GB DDR3 1866GHz RAM, and the Ati Radeon HD 5870. I didn't mention that my build came in at ~$1000 (I'v made upgrades here and there but 1k is a good estimate.)

Now lets compare my ~$1000 computer to a similarly priced Apple product. The iMac, $1200.

  • 4GB RAM
  • Quad Core (2.5GHz)
  • Ati Radeon HD 6750M


What... Those specs don't even come close to mine. Yes, I can buy a Mac Pro, and yes I know that I'm paying for the brand as well (+OS). But in order to stay competitive on the hardware side of things with regards to developing, I can't be spending $2000+ every other year for an up-to-date machine.

Apple, you need to open up to Linux developers (especially for the iPhone).

Monday, February 13, 2012

xmonad and DWM

Recently I removed Crunchbang from my net-book and installed Debian wheezy (testing). Openbox was great, but I still felt that I was relying too much on the mouse. I normally shy away from tiling window managers, mostly because I use Gnome on my desktop, but I decided to make an exception and try out xmonad.

Conclusion: xmonad (dwm in haskell) is great (and dwm is ok too, but its necessary to tweak it a bit so that it looks nice)

Now I say this because xmonad allows me to stay on the keyboard for pretty much everything (besides web browsing - and there's a way to even do that, though I won't be trying it anytime soon). Accessing multiple work-spaces is as easy as <Alt>+<Work-space Number>. If I need to float a window, its as easy as dragging it while holding the <Alt> key.

So without further ado, lets go through some setup steps.

Step 1. Read the tutorial, Its short and really easy to get a hold of

Step 2. Install xmonad (aptitude install xmonad)

Step 3. Install dmenu (aptitude install xmonad)

Step 4. Ok, so here's where I probably screwed up big time, but hey it works. So basically I need a GUI for wireless (too much encryption junk to remember for commandline), and a way to monitor battery life.
The tools I decided to use were trayer (a tray like gnome-panel to hold nm-applet) and nm-applet. This allowed me easily connect to wireless. Next i needed to monitor battery (and actually a clock). These are some useful commands:
acpi #Display battery life
date #Display time and date

For sound I installed gnome-sound-applet which launches into trayer.

Step 5. Confession: Ok, so while what Step 4 said is correct, I actually ended up installing gnome entirely to allow me access to all of the easy-to-use gnome apps that I'm so used to. I know there are better options but this way I was easily able to use gnome specific apps and tools from inside xmonad

Step 6. Suspend:
I made a script file to suspend the computer, and here is the command I use:
echo -n mem > /sys/power/state

Step 7. Enjoy! xmonad is a great way to maximize screen real-estate when you have to deal with small screens (not 4 monitors, but like a net-book). Have fun and good luck!

Sunday, January 29, 2012



Here is a poem I wrote in terza rima. Enjoy!

Linux


Linux is the king OS
its power unmatched
by any of the rest

built from an idea hatched
by the godly Linus Torvalds
whose ideas dispatched

out to all the many small
communities of developers around,
this idea of an OS, the best of all

Its birth was the crown
of a new era of immaculacy
to burn microsoft into the ground

microsoft, for even with its maturity
still feels the need to screw
its users by faltering in security

and with that I call upon you
to make the switch to Backtrack
or Debian or even Ubuntu

and fight the power, fight back!
together we will show microsoft
that we are ready to attack

Wednesday, January 11, 2012

Linux == God [Video]




I just finished watching "The Story of Linux: Commemorating 20 Years of the Linux Operating System" (Yes, I should have watched this sooner.)
-1:18 for Linux Jesus Drawing

Where I learned of IBM Linux Ads - 2:14

Which led me to this: IBM Linux ad - Prodigy

Saturday, January 7, 2012

Start My Day - Linux Script For Daily Apps


Click. Click. Click. Every day when I sit down at my computer and boot it up, I always launch the same 6 applications. I got tired of opening them manually every time, so instead I put a shortcut on my desktop that allows me to launch all of my apps at once via bash script.

To do this, just make a file called <whatever>.sh and put it somewhere safe. Next, create a desktop shortcut (Gnome 2) or menu entity (Openbox) that points to that script file. Then just add whatever commands you want to run to <whatever>.sh and you're good to go.

About Shell Scripting:
I recommend (if you're not familiar with it) reading more into shell scripting and really learning it, as it is a great tool for many jobs with this one being a very small example.

My script:
I keep my stuff simple, <command> &\n, nothing fancy.
google-chrome &
firefox http://gmail.com &
pidgin &
etc...

Notice the "&" at the end of each command. This tells the interpreter to run the process in the background, and continue running the next command.
The URL after firefox tells it to open that url, just how it would work in a terminal shell.

Autorun
Now, if you want your script to run automatically at login then the easiest option is to use the .bashrc_login file. At login time, bash looks for this file in your home directory and runs it. It should be located under your home directory ~/.bashrc_login. If it doesn't exist just create a new one. Add the command "sh /path/to/file/<whatever>.sh &" to the end of the file and you're set.

Further Reading
Running multiple apps at once is great, but bash scripts can do so much more. Here is a great guide to let you unleash your inner ninja: http://tldp.org/LDP/abs/html/

Sunday, December 25, 2011

Linux (Ubuntu) on the Samsung Galaxy S2 Skyrocket.

I recently received a Galaxy S2 as a gift, and thought I would share how I rooted it and then proceeded to install ubuntu on it. Before I begin, I would like to note that I did this out of curiosity to see how it would perform, and not actually as something I would use day-to-day. In reality it's just for kicks, which is why I took the path of least resistance and installed Ubuntu.

Step 1. Rooting the Phone
Rooting the phone was easy thanks to the great people on xda-developers. I followed this guide, and the whole thing ran smoothly. (If you have trouble, the users there are happy to help) Here is an alternate link.

Step 2. Removing Bloatware (ie. system apps)
Now, this isn't exactly related to installing linux, but I would like to share some tips about what I learned. DON'T DELETE ANYTHING, and by that I mean don't go into terminal and mount system as RW and then run rm /apps/<bloatware>. While this may work, it's not the safest solution and can break the phone (I realized this late, so don't make that mistake - luckily I didn't delete anything important). Instead download AntTek App Manager and FREEZE the apps that you want to get rid of. This allows you to bring them back should you need them later.

Step 3. The Meat
I followed this guide here. However things didn't smoothly the first time. Some key points, when in terminal when it says "WARNING.... Apps.... You have to go... Please wait...", all of these are normal, none of them are actually errors. When it says "Please wait..." it's done, so press "Home" and let it run in the background. If a "#" appears at the end of the terminal, something went wrong. If it doesn't work the first time do this:
1.Reboot
2.su
3.rm -r /data/local/mnt
4.cd sdcard
5.sh ubuntu.sh
That fixed it for me, and hopefully will fix any other problems you might run into.

Conclusion.
VNC is awful. Ubuntu actually runs fine, with good speed and usability, however the VNC client just wasn't up to the challenge. It's painful to try to run things via command-line, and its pretty much impossible to do anything that requires constant keyboard input. Maybe one day things will change, but from what I'm seeing, this is just another flashy trick to show off to your friends.

Friday, December 23, 2011

4 Monitors


Setup: 17" 1280x1024 (2 on far left and right),  22" 1680x1050 (vertical), 24" 1920x1080 (center).

The vertical monitor is on a hand-build stand made of 3/4" inch plywood (hand sawn - no power tools). Having a vertical monitor is amazing, especially for development. The difference it makes viewing code is phenomenal as it allows me to view 90 lines of code at once instead of 55.

The Struggle
Setting these monitors up was extremely difficult. But hopefully my endeavors can aid the rest of you, should you choose to increase your productivity by adding monitors.

Step 1. Don't buy an AMD graphics card. The cards are wonderful, the drivers are unbearable.
Step 2. Ok, so you bought an AMD card by accident, now what? The next step is to install the proprietary drivers. Twice. I first try to use 11.8 catalyst drivers, and then when they don't work I install the latest version.
Step 3. Now, you may notice some weird overlap between screens (only a few pixels), this can be fixed by editing your Xorg.conf file (/etc/X11/xorg.conf). Scroll down till you see "Section "Screen"", then change the "Virtual desktop" size and increase it as large as you need to.

Finally the tool that makes things work even when you're down, arandr (an XRandR GUI).

Well, that's about it, or at least the key points that helped me set up my multi monitors.
Note: Have another computer on hand just in case things go awry.