Archive for the ‘Linux’ Category

Minimalist Distros are the Way to Go (Not Ubuntu)

October 26, 2010

Ubuntu, the most user-friendly of the Linux distributions; Ubuntu, the harbinger of the day of the Linux desktop to the world; Ubuntu, the crowned king of all distributions; Ubuntu — the Operating System that has now killed my desktop for the third consecutive upgrade in a row.  This is ridiculous.  I have been an Ubuntu user and supporter since the seventh grade, when I first started using Linux, but this is just too much.  I know I’ve denounced Ubuntu and then reconsidered at least once in the past, but this is different, this is intolerable.

My final unfortunate experience with Ubuntu began last week.  I had just run the upgrade to the new release, version 10.10.  When turning the computer on in the morning, I had expected to be greeted by my customary desktop with maybe a new theme at the most.  However, I was welcomed by a bleak login prompt on tty1 — the command line.  The new upgrade had ruined my configuration so that the X server would no longer start the graphical display.  Fail.  Ubuntu has ruined my desktop three times in the last two years, not coincidentally in the wake of each six-month release.  That makes its record of stability in my experience worse than both Gentoo and Arch, each of which are supposed to be horribly difficult to use.

I’ve come to the counterintuitive conclusion that if I want to get anything done on my computers, I’ll have to use minimalist distributions with rolling releases.  The rolling release system is convenient and unobtrusive enough to not get in the way, while being reliable enough to not destroy the computer every few months.  Further, having an at least cursory knowledge of most of the things running on a system makes it a lot easier for me to troubleshoot in the case that something does break.  The legitimacy of this argument is confirmed by my experiences with Gentoo, Sabayon, Arch, and Ubuntu — the four distributions I use most often.

Both Sabayon and Ubuntu Linux work great out of the box, look good, and function smoothly.  They have a well-designed appearance and many flashy extras that other systems cannot boast.  However, when things get serious both of these distros fail to deliver.  First off, they apparently have problems when upgrading.  Moreover, it’s difficult to modify the system configuration without a very rational fear of causing an avalanche of errors to come down upon your head.  On the other hand, Arch and Gentoo have more involved installation processes (especially gentoo), and user interfaces that are as plain or intricate as you could want, assuming you know how to set them up.  Once in place, they work well, they work fast, and they work with you — you can configure them to whatever extent you want.

This brings me to my conclusion about Linux Distros: although the ‘user-friendly’ and ‘convenient’ distributions are great for new users who simply want to try out Linux or carry out simple tasks, the more an individual wants to get into Linux, the more they will find the need to gravitate toward the minimalistic distributions.  I’ve made the decision to replace my Ubuntu installation with Arch on the recently destroyed box.  Although I am heavily disappointed in what has been my favorite distribution in the past, some good has come of this experience.  The computer rescuscitation project led me to convert the desktop into a dedicated Apache server running several virtual hosts with various new and old projects.  Further, I stumbled on some scripts from last year during the file-saving process and continued work on the backup box I’d begun just before summer (it’s currently halfway done).  More news on my new projects later; for now, go replace your bloated underperforming machines with a simple, light Linux distribution like Arch.


I Need to Apologize to Ubuntu

June 23, 2010

A few months ago, I tried to update my existing Desktop Ubuntu to version 10.04, and I hated it.  All of my configurations were ruined, and it looked and felt downright awful.  I immediately made a fuss about how I was leaving Ubuntu and moved my desktop to Sabayon.  We have since seen what has become of my Desktop (see my previous post).  In despair, I decided I’d give Ubuntu another whirl, wondering if a fresh install would be better than my abysmal update experience.

And it definitely was!  The new Ubuntu is fantastic on a fresh installation.  From the attractive new branding to the innovative features and relatively bug-free experience, Ubuntu definitely holds its place as the most user-friendly Linux distribution.  I think the entire installation and configuration took less than an hour, but I was away from the computer a lot that day and could only check on it periodically, so I’m not sure about the aggregate installation time.  There were also a handful of features which I noticed for the first time after this install (some new, some that i just realized existed):

  • Music Store: The bundled Rythmbox music player finally has a real music store (not just Jamendo and Magnatune) that sells songs in MP3 format.  This is fantastic because I’m sick of buying music in proprietary formats and losing my music in a crash.  Chances of losing your files are reduced even more by the compatibility which the music store has with another feature, Ubuntu One
  • Ubuntu One: Ubuntu has a feature, called Ubuntu One, which gives users 2GB of free online storage (50gb for $10 a month) that can be used to sync files between computers, backup data, share files with other Ubuntu One users, and even automatically keep copies of your music from the music store.  Although I haven’t used this much, I can see how it could be extremely useful for people who buy lots of online music, have multiple ubuntu computers, or need to back up/synchronize things like email contacts.
  • “Me” Menu: This release has introduced Ubuntu’s new ‘me’ menu.  The me menu is a menu in the taskbar at the top right of the screen that allows for easy access to things like, chat, email, and social networking.  It gives quick access to the empathy chat, evolution email, and gwibber social networking clients.  This is a great idea and works well enough, but I’d like to see some improvement in it for future releases.  It’s not that it doesn’t work, but the software that is incorporated into the menu is not ideal in my opinion.  I’m not a big fan of evolution email or gwibber, so I would prefer different applications to be integrated into the menu.
  • Ubuntu Software Center: The Ubuntu Software center has become much, much nicer than it was in the past.  It’s really convenient and good-looking now.

So this is yet another victory for Ubuntu Linux.  Now is a great time for everyday users to switch to Ubuntu from Windows or Apple OSX because there is finally a linux distro which not only matches the other operating systems in most areas but also surpasses them in innovation of useful features.  I should never have doubted a solid distribution like Ubuntu.  It may not be as easily configurable or minimalistic as my favorite distro, Arch Linux, but it is the hands down best choice for new Linux users or people who need stable systems.

Sabayon Linux: Great Until You Update Something

June 12, 2010

Before I begin, let me say that I hold no ill will for Sabayon Linux.  In fact, it is near the top of the list of my favorite Linux distributions and the second most user-friendly distro I’ve ever used (the first being Ubuntu).  Sabayon has an excellent feature set, plenty of pre-installed software, and it works out of the box!  It is such a great distro that I have installed it four times despite its failing at the hands of the same problem each time.

I currently use Sabayon on my Desktop machine, but I used to also have it on my laptop.  I use it as my quick and easy computer if there is some task which I don’t really know how to do because Sabayon has most of the software needed to do anything on it by default (as opposed to the minimalistic arch linux on the laptop).  It works great, with a single exception: updating can be a risky procedure.

Most of the time, it’s fine to update.  Sabayon, which is based on Gentoo, even has a great binary package manager, entropy.  However, there are certain times when updating is surprisingly un-user-friendly.  If you update your kernel version, you need to manually get all the drivers for it.  Not being aware of this caused me to experience an unfortunate crash several times.  Most recently, I allowed the package manager to update one of my configuration files (I hadn’t made any changes to the file, so I figured there was no problem).  Bad Idea.  The next time I booted up the computer, ther X server would not work.  This means I’m stuck on the command line, which isn’t much of a short term problem, but I’d eventually like my GUIs back.

After spending some time trying to get stuff back to normal, I just decided I should switch distros.  Now I have to pick.  I’m looking at Ubuntu as my first choice right now, but I didn’t like the newest release (which is why I started using Sabayon on that computer in the first place).  Maybe I’ll like it better after having had a break.  My other options are Gentoo and arch, so Ubuntu is the way to go if I want it to be easy.  I’ll keep you posted on what happens with the Desktop.

My Indispensable USB Toolkit

May 28, 2010

Many people carry around a USB stick to store and transfer files from place to place.  It is a crying shame that most of them are not aware of the incredible powers latent within their USB sticks.  The worst part is that much of this power is sitting right under their noses, untapped and wasted.  Lucky for you, I plan to give a quick description of what I do with my thumb drives, hopefully inspiring you to push the limits of your own flash drive.

The first, incredibly obvious, thing that you can do with a flash drive is to put small programs on it that you can take with you.  For example, I keep nethack (a game that features prominently in my post on gaming in linux) on my flash drives for use any time I’m stuck with a computer and not  much to do.  This happens an awful lot at school.  Others with more modern taste in games keep halo or starcraft handy (on a related note, I would really recommend the computer science classes at my school).

Although carrying around games in your pocket is fun, it’s not always really useful.  A much more useful tool to have around is a Putty client.  Putty is an ssh client, meaning that it allows you to connect to a secure shell (ssh) server on any computer, anywhere.  This means that if you’ve got an ssh server running on your computer (I do, makes life a lot easier), you can simply remotely log in from anywhere.  Need some obscure tool that you’ve only got on your home machine? Got it.  Forgot some important file? Found it.  Not only does this method give you a great deal of peace of mind, but it also causes everybody around you to ask you if you are hacking.  For some reason there is an unbreakable connection in the public mind between terminals, like the remote command prompt putty gives you,  and malicious computer use.

It is a distinct possibility that at this point you’re thinking that you a) already knew this, or b) have no use for it because you may not have an ssh server or don’t know how to operate a computer remotely from a command prompt.  Don’t give up on me yet, I’ve saved the best part for last.  You may or may not be aware that most newish computers and USBs give you the option to boot from a USB drive in much the same way as you could boot from a CD, Floppy disk (remember those?), or even a typical Hard Drive.  This means that you can install a whole operating system to your USB stick and boot it up anywhere you find a computer!  You can configure the operating system on the USB as much as you like and always boot into a familiar environment with all of your programs and settings already loaded, no matter where you go.

Personally, I have an 8gb usb  with BackTrack 4 (a Linux distribution dedicated to providing a platform for penetration testing) installed on it.  You can find an easy tutorial on how to do this here.  For brave souls who are undaunted by gentoo linux (the most configurable and therefore most difficult to set up linux distribution out there), my friend Jeff installed gentoo to his USB drive when his laptop’s hard disk gave out.  He now uses that as his primary operating system.  Although I haven’t tried them all myself, I believe you could install any Linux distribution to a USB drive.  In fact, I plan to set one up sometime soon with a basic arch linux configuration — I’ll let you know how that goes.  Another option, if you don’t have a massive USB stick available, is to go with Damn Small Linux (DSL).  DSL is a distribution that is commited to providing a functional environment that takes less than 50MB of space.  For a slightly larger variant, try DSL-N, DSL’s big brother.  I also plan to get myself a DSL usb stick, so I can have a different linux distro ready for any situation.  In fact, the options for installing Linux to a USB drive are so plentiful that there is a whole website dedicated to it.

As a final housekeeping note, you’ll note that the URL of my website has changed from to  Although still works for now, it is going to be phased out, so you should update your bookmarks.  I’m having some trouble getting my email and blog addresses changed, but I’ll make sure to let you know when I finally figure that out.

Gaming in Linux

May 25, 2010

Although I’m not a big gamer, I feel that I should write a post about gaming in Linux because that is one of the main reasons why people choose not to switch over from other operating systems.  Of course, this is not actually too much of a problem.  There is an excellent thing called WINE (which stands for ‘wine is not an emulator’) that acts as a windows compatibility layer for Linux computers.  This means that many games built for windows computers can actually be played on Linux as well.  Unfortunately, there are a few games that do not work or only work after lots of suffering and configuration-changing that seem to ruin Linux’s reputation as a platform for gaming.

Windows compatibility aside, there are a host of games that run natively on Linux.  Although they are not all as elaborate as the expensive PC games people buy, they are still fun and free.  I figure I’ll share a few of the games that I enjoy having around as well as a couple others that may hold some appeal.  First off, there is nethack.  Nethack is perhaps the original role-playing game.  It allows for expansive gameplay and hours of suffering (it is notorious for the infinitely many ways you can die).  It is played in the terminal and everything is represented by different characters, an indication of how old it is.  It has something of a learning curve getting started, but once you learn how to use it, nethack becomes one of the most fun and addicting games around.  Did I mention that if you die, you actually die?  Yup, no restoring save files without cheating (maybe I’ll briefly explain how to keep nethack progress in a later post, it’s rather simple).

Another game, and the one that most sources will designate as the best game available for Linux, is the Battle for Wesnoth.  This is a turn based RPG based in a fantasy world, but you can download many additional campaigns and themes, allowing for phenomenal replay value.  Another strategy game you could try is Freeciv, an excellent clone of civilization II (build an empire, conquer others, etc).  If you are a fan of shooter games, the US government (that’s right) has developed a game called America’s Army.  I’ve never played it, but I hear its pretty good.  It appears right behind Wesnoth on many top 10 linux game lists.  A more lighthearted RPG game is FreeDroidRPG, a game in which you play as a member of a penguin-esque species tasked with saving the world from evil robots.  The game is still under heavy development, but what they have so far allows for a couple hours of fun.

Some other notable linux games include SuperTux, a super mario bros imitation featuring tux, the linux penguin.  On that same theme there is Supertuxkart, a mario-cartish game featuring tux and his other open source mascot friends.  On a distinctly non-mario-poser line, there is LiquidWars, a unique game in which you control a big blob of what looks like colored sand, and you try to conquer all of the other sand.  It’s very difficult to explain, but quite a bit of fun to play, especially with friends.  Finally, Neverball and Neverputt are worth trying.  The first is a game in which you roll a ball and try to pick up coins without falling off a platform (like Mojo, if you ever played that on the PS2), and the second is a mini-golf game.

There are many, many more Linux games, but that’s all I have time for right now.  Granted, these are not quite as complex as some PC games, they are definitely satisfactory for me (I don’t play much video games, although I do keep an old PS1 attached to my desktop monitor for whenever I get bored).  If you are simply unwilling to begin using Linux but still want to try out the Linux games I’ve mentioned, don’t despair.  Most of these games are also available for windows and sometimes mac users as well.  Happy gaming!

Of Backups and BASH

May 23, 2010

Anybody can save backup copies of all their files somewhere for later retrieval, but when I planned to backup my files, I would not settle for a simple run-of-the-mill backup plan.  I would come up with a new and innovative system full of hack value goodness.  I had the idea of setting up an old computer with a large hard disk and writing a script to execute when the computer booted.  This script would download all of my important files from my other computers and save them in a compressed file identified by the date of the backup.  It would then wait ten or fifteen minutes, time for me to remotely log in and kill the script if I need to make configuration changes on the computer (or retrieve one of the past backups), and shutdown.  In essence, I planned to create a magical box on which I could push a button and have all of my documents backed up without any effort on my part.  It was a great idea, and I couldn’t wait to try it.

Unfortunately, the poor resources at my disposal prevented me from succeeding.  The computer that I wanted to use for this project was very, very old and, as it turns out, unreliable.  I couldn’t get anything to work on it.  In fact, it was such a rotten machine that I just took out the dvd drive (I always seem to have a shortage of those) and threw out the rest of it (and I’m not one to throw out computers at a whim).  It was a sad evening for me, but I did not give up all hope of having my files properly backed up.

The decision was made that I would write a backup script that would run on my desktop  (the one with the largest hard drive).  I finally got around to doing it last night around midnight.  My final product:


now=`date '+%F'`
mkdir "$now" #make a folder for the date
cd "$now"

echo 'making backup directory'
for places in laptop desktop server #make direcoties for each machine
mkdir $places

#now we have to pick out the important directories in each computer
#we'll copy those directories here, and then we'll compress the whole thing
#include command line options to include the desktop

echo 'copying server files'
scp -r server:/var/www/ server/
echo 'copying files from laptop'
scp -r laptop:/home/saba laptop/

if [ $# == "1" ]
if [ $1 == "-d" ]
echo '-d option enabled'
echo 'copying files from desktop'
scp -r desktop:/home/saba desktop/
cd ../

tar -cf "$now.tar" "$now"
gzip -r "$now.tar"
rm -r "$now"

exit 0

The script is available for download on my website at  There is also a short description of what the script does and how to make it work for you at the aforementioned link.

As you can probably see, I’ve gotten better at scripting since my updater script last week.  I owe it to a long series of web searches and the reading of many documents last night.  In order to help others who are trying to write a real script for the first time, I’m going to make a BASH scripting super quickstart guide and publish it on the tutorials section of my website.  Expect that to be up in a few days.

The Great Big Rolling Ball of Releases

May 21, 2010

New versions of software and operating systems are a pain.  Sure, they have new features, but each time a new operating system is released, you need to go buy it (for those who haven’t realized they can get better products for free), maybe reinstall your OS, transfer all your data, and at the very least have to wait for a long, long time as your computer upgrades to the new version of your product.  What if there were a way to escape the dreaded release cycle?  What if you didn’t have to subject yourself to this systematic torture but could still have a computer that is as current, if not even more up-to-date, than other computers?  Enter the rolling release cycle.

A rolling release cycle is one in which the operating system is constantly being updated without being separated into different versions.  There is never any need to do a major upgrade.  All that is required is a short periodic update that takes a few moments and can usually be done in the background.  You can run updates as often or as sporadically as you like; you can even write scripts to simplify the process of updating multiple computers (see my previous post).  With a rolling release system, new stuff can be added to your machine as soon as it is ready, instead of waiting for the next scheduled release date.  This means that people working on rolling release operating systems have more time to work on the important stuff that matters rather than troubleshooting compatibility problems with older releases.  More exciting for the user, having cool new stuff as soon as it is ready means having systems that run newer and better technologies.

Before we get too excited, there is one drawback.  Always having the newest version of software means that you are likely to end up with some stuff that is essentially ready, but whose developers are still working out the kinks.  There are occasions where a user can end up having to deal with an annoying bug for a while. Fortunately, there is a massive online community using the new software, so there are almost always workarounds available on the web.  As an example, I’ll talk about Namoroka, the next version of firefox.  I’m running Namoroka right now, and it generally works great.  However, there is a thing where the facebook chat doesn’t work because it doesn’t recognize the browser (after all, it is brand new).  Although I was initially very unhappy about this, I quickly found a fix that had my browser back on facebook chat in under a minute.

Now, are you ready to embark on the rolling advenure?  Excellent!  I have three computers running in this room, and each is running a different rolling release linux distribution.  These are Arch, Gentoo, and Sabayon.  Each has its own features and ups/downs, so you’ll have to pick one that suits your needs (or find another good distro with rolling releases).  I plan to talk more about my favorite linux distributions at a later date, but for now I’ll recommend Sabayon to anyone who wants a working rolling release system and doesn’t have the experience needed for the Arch or Gentoo installation process.

Enjoy your new rolling release distribution!  Maybe you can use the time you’ve saved to go laugh at the peoplewho haven’t learned they can get free operating systems that are better than the ones they pay money for.  Better yet, you could tell your friends to read this and other linux-related posts so that they too can get in on the fun.

A Universal Updater Script for Lazy Linux Users

May 19, 2010

Being who I am, I have multiple computers running different services, and I always want them to be up to date.  However, I’ve got a big problem: I’m Lazy.  Lazy people don’t like routinely running updates on several computers, and we like it even less when the computer takes hours to update (and then breaks) whenever we do get around to it.  Luckily, there is a solution.

The other day, while waiting for my bus home in the rain, I had an idea.  I realized that if I didn’t have to move from computer to computer and do stuff on each, I would be much more willing to do updates.  Thinking in this vein, I decided that I could write a script that would simply go through each computer and run its update commands, keeping everything current and saving me a handful of keystrokes.  Now I’m no master of scripting, but anyone can string a few commands together.  Here’s what I came up with:

#run updates on laptop, desktop, and server
#runs on laptop
#add updates for backup box when that is ready

echo 'note: give root passwords for each machine when prompted'
echo 'laptop: pacman -Syyu'
su -c - root 'pacman -Syyu'
echo 'desktop: equo update && equo upgrade'
ssh root@desktop equo update && ssh root@desktop equo upgrade
echo 'desktop: emerge --sync && layman -S'
ssh root@desktop emerge --sync && ssh root@desktop layman -S
echo 'server: emerge --sync'
ssh root@tux emerge --sync
echo 'server: emerge --update --deep world'
ssh root@tux emerge --update --deep world

Now this may need a bit of explanation.  The commands pacman, equo, and emerge are the different commands used to update each distribution I’m running.  They are Arch, Sabayon, and Gentoo Linux.  I’ve named them based on their function, with the exception of my server, tux.

You’ve probably noticed the reference to a backup box in the comments that start my script; I’ll have more details on that project as soon as I get started with it.  It’s one of the more exciting plans I have lined up to complete before summer.

A bit more information and a link to download this script is available on my website at