Skip navigation

Category Archives: Linux

Vim is my favorite text editor (sorry Emacs guys). Anything that I write on my computer gets written in Vim. I used to be a word processor fan until they started to annoy me with spell-check. While I love how word processors can fix my spelling mistakes, I want them to do it after I write. I absolutely hate how they underline every misspelling. Writing and editing are two separate processes and writing always goes first. That’s why I started to blog using Vim.

There are a lot of great things about Vim, but before you dive in, know that it takes some adjusting if you’ve never used a command-line text editor. You don’t get your open and save buttons like you do in most applications. Everything you do in Vim is done with the keyboard, which in turn means that you need to learn some commands, and some of them are a little odd to say the least. How about we start with the basics though, shall we?

If you haven’t brought up a terminal window yet, do so. Ready? Okay, here we go. Type vim and press Enter. You should be greeted by a nice welcome screen or you’ll be met with an error saying that it doesn’t exist. If you received the latter and you’re on Ubuntu, type sudo apt-get install vim and you should be good to go.

Once you reach that nice intro screen, you’ll probably realize that you can’t type anything. This is because you have to press ‘i’ to enter insert mode. Write a little bit, just to test it out. When you have some text down, press the ‘Esc’ key. This exits insert mode. Now I can show you some of Vim’s commands.

The commands you are going to use the most are :w, :q!, and ZZ. The :w command tells Vim to write the buffer out to a file (in simple terms, it saves your work), while :q tells Vim that you want to quit. Try typing something without saving and exit using :q. It won’t let you will it? You see, if you modify a buffer without writing that buffer to a file, Vim won’t let you quit. That’s why you should use :q! instead. It overrides that default behavior, letting you quit without saving. You can combine the save and quit commands with ZZ.

Those commands are all you need to know to start using Vim, but there are tons more. One easy way to learn them all (or to avoid using them) is to use GVim. GVim is Vim with a graphical interface. It teaches you by showing the keyboard commands next to the actions in the menu. For example, it will say ‘Paste’ in the menu, but to the right of it you’ll see "+gP. This makes GVim a great app if you’re just getting started.

The true power of Vim lies in it’s simplicity. It separates the two parts of the writing process (writing and editing), by forcing you to do only one at a time. It also helps you concentrate on your work. No distractions, no notifications, just a clean environment where you put your thoughts into words.

Vim can be used by programmers as well. It supports syntax highlighting for a variety of languages and has many features just for developers. In fact, Vim is meant more for programming than writing, but it does both equally well.

For more information about Vim, go over to www.vim.org where you can read some documentation and download Vim for other platforms. I also highly recommend downloading GVim (it’s at the Vim website). It helps during the learning process and will get you up and running in no time.

Advertisements

There is a plugin for GNOME Do that shorten URLs, so you don’t have to have an ugly bookmarklet in your bookmarks bar.  Simply go to your GNOME Do preferences and enable the TinyURL plugin.  Now go to a site and copy the URL in the address bar.  Then open GNOME Do with Super Key + Spacebar and type tinyurl.  Then press tab and select the Selected Text option.

GNOME Do's TinyURL Plug-In

You should now have a TinyURL.  Now press TAB and use the Down Key to select Copy to Clipboard.  Press Enter and paste it in your Twitter or Identi.ca message.  Now you can add URL shortening to GNOME Do’s feature list, as if it didn’t do enough already.

Irssi is a really simple command-line IRC client.  To install it, use apt-get or yum.  There is no configuration required.  Simply run irssi -c (server) -n (nickname) and once it connects to the server, type /channel and enter the channel you want to chat on.  When you want to disconnect, use /disconnect and when you want to quit, use /exit.

Why You Should Use It

There are many reasons for using irssi, but simplicity and the lack of a GUI are the two main ones.  The lack of GUI really helps if you are on an older machine or if want to use it remotely using SSH.  It also doesn’t get in your way because it doesn’t have all of the options that other IRC clients do.

As mentioned in my KeePassX article, Dropbox is a great file syncing/backup service.  It supports all three major platforms (Windows, Mac, and Linux) and makes file syncing a snap.  To get Dropbox, go to http://www.getdropbox.com/ and download the client.  If you are on Ubuntu, you may want to add the repositories and install it with sudo apt-get update and then sudo apt-get install nautilus-dropbox.  To do so, add the repositories listed below to your /etc/apt/sources.list.

deb http://linux.getdropbox.com/ubuntu jaunty main
deb-src http://linux.getdropbox.com/ubuntu jaunty main

Once you have the client installed, you have to log out and log back in.  Then go to your Applications menu and launch Dropbox.  It is in the Internet section.  Complete the steps that follow.  Once you have your account created and Dropbox running, you can access it by going into the Dropbox folder in your home directory.  You can also use the web interface by logging into the Dropbox site.  Now you can add files to your Dropbox and the files will be sent to their servers and synced to your other computers instantly (as long as they have Dropbox installed).

Dropbox

Dropbox is a great service.  It is stable, it looks professional, and essentially replaces the USB stick.  I have had no problems at all so far.  I’m actually considering the upgrade to 50gb of storage space which only costs $9.99 a month, even though the free 2gb service is working great.  You can actually get more storage for free if you tell your friends about Dropbox.

Syncing works fine.  You put a file in the Dropbox directory and in seconds, every computer you have Dropbox installed on has the file.  The public folder support, which allows you to publicly share files is slick too.  I don’t have a use for it myself, but it could be just what you’re looking for.  If you put files in Dropbox’s Photos directory, you can have a photo gallery online as well.

Dropbox is not perfect.  It does have some really minor issues.  One of them is RAM usage.  Dropbox uses about 32mb of RAM idle.  While this is by no means huge, it could be an issue on certain netbooks that have limited RAM available.  Also, Dropbox only supports Nautilus, the GNOME file manager.  Thunar and Dolphin are not supported.  Hopefully Dropbox will add support for them in the future.  My last “issue” with Dropbox is the lack of many storage options.  They have great prices ($9.99 a month for 50gb is really cheap), but I think people would want options for sizes like 5gb or 10gb as well.  I would gladly pay $1.99 a month for a 5gb option, which is what most people need.

If you haven’t already, you should get Dropbox.  There’s no reason not to.  It gives you 2gb of storage for free.  That alone is worth the download in my opinion.  Dropbox is the best file syncing service available and is a great application for people with multiple computers.

Most of us could care less about security.  We use easy passwords and leave our login credentials out in the open.  We do these things for convenience, but at the cost of security.  So how do we balance the two?

There are many ways to keep your accounts secure and private.  To secure an account, you need to have a good password.  I recommend using this site.  Every time you go there, you will get a random string of characters to use as a password.  Just select as many characters as you want and copy and paste it as your password.  The only problem is, they are long and random, making them hard to remember.  Fixing this is easy with KeePassX.

KeePassX is a free and open-source password manager that securely stores all of your login information in a database.  Why is it better than Firefox’s built-in manager?  Well, for one, you can access this database either with a password or a key file.  A key file is simply a file that you must present to the program in order to unlock the database.  This gets rid of the need for a password, making it much more convenient and secure.

To install KeePassX on Ubuntu, simply check the box next to it in Add/Remove Programs.  To launch it, go to your Applications menu and then to your Accessories menu and click on the KeePassX entry.  Once you start it, you need to create a database.  To do this, go to File, and then New Database.  In the window that pops up, uncheck the box next to Password and check the box next to Key File.  Then click on Browse and select the file you want to use as the key.  Make sure that this file will never be deleted.  Keep a backup just in case.  Once you choose a file and click OK, your password database will be created.

Now it is time to add your accounts.  Right click on a group in the left pane and select Add New Entry.  Add a title, your username and password for that site, and click OK.  Just repeat this for all of your accounts and when you are done, click the floppy disk icon to save.  To login to sites now, open KeePassX, select the account you want to use, right click on it, select Copy Username to Clipboard, and paste it into the username field on the site.  Then select Copy Password to Clipboard and paste it into the password field.

If you have multiple computers (or even if you don’t), KeePassX in combination with Dropbox can be amazing.  You can put your database file (it’s encrypted, so don’t worry about security) into your Dropbox to sync it with all of your computers.  As long as that computer has KeePassX or KeePass (the Windows version) installed, it can use the file.  This is perfectly secure because your database requires the key file to be opened, so even if someone gets the database file, they can’t use it.  Just make sure you have the key file on all of your computers to do this.  If you don’t have multiple computers, consider Dropbox as a free backup solution for your database.

If you followed these steps correctly, you should have a convenient and secure way to manage your passwords.  If you have a question, concern, idea, or solution, leave a comment and for those of us in the USA, have a great 4th of July weekend!

Pros: Clean interface, fast, renders pages well, a lot of cool features like user script support

Cons: Unstable (crashes randomly)

Score: 6/10

Summary: Great potential, but too unstable at the moment for regular use.

There are a ton of web browsers on Linux.  I’m starting to wonder if there are too many actually.  A few stick out in the crowd though.  Firefox (obviously), Epiphany, Opera, and Konqueror just to name a few.  One browser, called Midori (which means “green” in Japanese), might be included in this group in the future if development continues.

Midori is a GTK+ 2-based browser, that uses the WebKit (formerly KHTML) engine to display web pages.  This means two things.  One, Midori looks great on GNOME and XFCE.  It also means that Midori is fast—really fast.  Pages load quickly in Midori and usually render correctly.  The browser is written entirely in C, so the program itself is lightweight and quick.  It has support for user scripts (like Greasemonkey for Firefox) and styles (like Stylish for Firefox) too.

Midori Running on Xubuntu 9.04

You’re probably wondering, if Midori is so great, why did you rate it so low?  Well, Midori is the most unstable web browser I have ever seen.  For example, I went to Google in Midori and after that, I attempted to go to Engadget.  Immediately after I pressed Enter to go there, Midori crashed with no warning at all.  The worst part is, the crashes are random.  You cannot predict when they will happen.  Sadly, this makes the browser unusable at the moment.  The browser is in the early alpha stages though, so this should be expected.  The web site does say that these crashes are the fault of WebKit, not Midori, while the FAQ says that the issue could be caused by Glib 2.16 and says that an upgrade to 2.18 could fix some issues.

Overall, Midori is a great web browser, if you can overlook the crashes.  This will obviously be fixed in future releases, so it should be relatively stable in a while.  Right now, I would stay away, but it is definitely a project to keep an eye on.

You can find more information about Midori at http://www.twotoasts.de/index.php?/pages/midori_summary.html.

This little command saved me a ton of time and searching back in Ubuntu 8.04 when I needed to know what wireless card I had.  I found out by running the command:

lspci|grep -i “wireless”

What It Does

The lspci command shows you your computer’s hardware interfaces (SATA controllers, wireless cards, etc.).  The standard output it gives you can be a little hard to read, so I piped it to grep.  The grep command allows you to search through a file or a program’s output for a line with a string in it that you specify.  The -i option tells grep to ignore case.  The string at the end finishes the command by telling grep what to look for in lspci‘s output.  So, the full command runs lspci, sends the output to grep, which searches through the output to find the string “wireless”, regardless of case.

Why It’s Useful

This command is amazingly useful, especially in Arch Linux.  Arch doesn’t give you a GUI by default and you need to install X with the right drivers.  If you replace “wireless” with “VGA”, you’ll know what you need.

I know this isn’t the MAME post I promised, but I felt that I should write about this first.  Network Manager, which comes with GNOME, does exactly what its name implies.  It manages networks…well…sometimes it does.  It crashes a lot and for no apparent reason.

That is why I decided to switch to Wicd.  Wicd does exactly what Network Manager does except it doesn’t crash and it doesn’t have any GNOME dependencies, so it runs great in all desktop environments.  Installation is simple.  Simply use apt-get or whatever your distro uses to manage packages to get it.  It should remove Network Manager and replace it with Wicd.  The rest is quite self-explanatory.  Try restarting if something doesn’t quite work and go into Wicd’s options to set it up.

Why Wicd isn’t included by default is beyond me.  Nearly everyone complains about NetworkManager.  The only benefit I see is that Network Manager can use 3g cards and that Wicd cannot as far as I know, but I could be wrong.  Anyway, if you are looking for an alternative to Network Manager, Wicd is for you.

My Eee PC has been gathering dust, so I decided to put Xandros back on it and see what I could do with it.  I never really got into customizing Xandros because I immediately put Ubuntu 8.04 on it when it arrived.  Little did I know, there is a heck of a lot of good stuff you can do with it.

I got the “Full Desktop” mode first.  By default, Xandros uses a custom ASUS “Easy Mode”.  This was easy to fix by following these directions.  Next, I installed the latest stable version of Opera.  The Eee PC comes with an outdated version of Firefox, so I decided to just switch to Opera rather than upgrading (which is not a very easy process).  Installation was simple.  I went to Opera’s download page, downloaded the Debian Etch package, and installed it using dpkg -i.

Xandros Running Opera and Console

After I was done doing this, I wanted to play some games.  The Eee PC does come with some great casual games, but I wanted real ones.  Tremulous and Open Arena run well on it and don’t require installation, so I naturally chose them.  I downloaded both (Tremulous can be found here, while you’re going to have to Google for Open Arena), ran chmod +x on the tremulous.x86 file and the openarena.i386 file, and then ran them with ./.

There are many more things I’m planning to do as well.  My next post will most likely be on getting MAME installed.  Finding ways to get things to work on this odd distro is quite fun and has been the focus of my time recently.  If you have any tips on installing applications or modifying the distro leave a comment below.

Linux isn’t known for games.  In fact, one of the main reasons people don’t switch is because almost no commercial games have native Linux support.  The Wine project is certainly helping, but we Linux users really want native Linux games, which there are many already available.

Crack Attack! is a free, fast paced puzzle game for Linux.  It is in most distribution’s repositories and is a blast to play.  In the game, you try to line up blocks of the same color.  Once you have three or more lined up either vertically or horizontally, the blocks dissappear and you get points.  While you are doing this, more blocks are slowly added until the blocks touch the top of the window.  When that happens, the game ends.  The goal is to prevent this from happening by getting rid of as many blocks as possible.

Crack Attack! Being Played on Fedora 11 KDE

Although it is a “casual game”, it is great fun.  Also, all you really need to move the blocks are the arrow keys and the spacebar, so a netbook will be fine to play it on.  In fact, it was one of the games included in the ASUS Eee PC’s Xandros Linux install, so it should work on almost any machine.