Monthly Archives: December 2006

DOS Emulation with DOSBox – Get your old-school game on!

As a Christmas gift to my brother I decided to do a little research and figure out how he could experience some of the old-school gaming enjoyment that I grew up with. Remember the old games? 2D. Bad sound. No story. Yes, those were the days! Forget all that World of Warcraft stuff, I’m talking about old-school DOS based games.

Well, I hope you’re reading this Taylor because I have detailed below how to setup the DOS emulator and install just about any game you want. I hope this doesn’t hurt your grades in school. I’m sure some of these games made me dumber growing up and, once you start playing some of these, you’ll definitely see why!

First we’ve got to install the DOS emulator, DOSBox. You can do that using your favorite method (Synaptic or command line), example:

sudo aptitude install dosbox

Once DOSBox is installed you’ve got the emulator, you just need to create a folder to store your totally RAD games and play them. First you’ll want to create a directory to store your games. Perhaps in your home/ folder. Open a terminal and use:

mkdir dosgames

You’re already 2/3 of the way there. (What did I tell you about Linux being easy!) At this point you’ll need to install your games and you’re ready to go.

A great place I found to download a TON of old-school games is at Abandonia. They’ve got a lot of old titles that I remember playing when I was a kid. From Tetris to Double Dragon, Prince of Persia, Rampart and a LOT more. Take a look through those and see what you’d like to play. When you’ve found something simply click the “Get it” button and download the .zip file. You’ll want to extract this .zip file into your newly created dosgames folder. (note: look for the little icon that says “DOS BOX” to make sure its completely compatible. If its got that icon you are SET! A few games I found are “protected” by the ESA. If you see this, unfortunately, they aren’t available for free download.)

After you’ve installed the games you want to play it’s just two quicks steps to actually launching them. First you’ll need to start DOSBox, which is done simply by running the command.

dosbox

This will load a DOSBox window that looks like the old-school DOS command line. You’ll then need to mount your local dosgames folder so that it knows where to find the games.

mount c /home/username/dosgames (replace username with your own, or substitute the path with your local dosgames path)

At this point use the good ‘ol DOS navigation to find the folder, look for the executable and get playing. Remember, use cd to move to a new directory and dir to list the contents. Look for a .exe, .com, or .bat file to launch the game. For example, with Prince of Persia you would do the following after downloading and unzipping to the dosgames folder:

dosbox

mount c /home/username/dosgames

c:

cd PRINCE

prince.bat

That should be all. …and if you’ve got other games you’d like to play that perhaps you still have copies of for whatever reason, simply copy the appropriate files to your dosgames folder and play away! Let me know if you have any trouble with this. Between DOSBox and Abandonia you should have hours of wasted gaming in front of you!

Find and Replace with Vim : Ubuntu (6.06.1 / 6.10)

I recently posted about the power of Vim and we also learned about some of Vim’s Sweet Moves. Today I wanted to talk about a few more advanced actions within Vim that can make your life easier. What are they? Find and Replace.

Something that we’ve all had to do at one time or another is use find and replace within a document. This is really easy within Vim.

To change all instances of one word to another within one line use:

:s/word/replacement/g

To change all instances of one word to another within the entire file use:

:%s/word/replacement/g

To ask for confirmation before replacing each instance of a word use:

:%s/word/replacement/gc

I use these options regularly, especially when I’m upgrading between releases (or steps to upgrading). It’s simple to find & replace all instances of dapper within your /etc/apt/sources.list to edgy using one simple command within Vim. Once those lines are updated you’re ready to upgrade to the next release–it’s as simple as that!

If you want to find out more about Vim (as if this wasn’t enough!) you can use the command:

:help

while within Vim and it’ll give you some more tips and options. You can also run the command:

vimtutor

to walk you through doing all of these suggestions in actual practice. It’s a really easy to follow, very informative tutor.

Also, for some more advanced uses of Vim including using it as a file explorer, using tabs and quite a bit more check out my buddy Aaron’s post Use Vim!

Vim the MacGyver of text editors : Ubuntu (6.06.1 / 6.10)

If you’ve been following this blog or using Ubuntu for any amount of time I’m sure you’ve had to get your hands a bit dirty on the command line and use a text editor of some sort. Everyone seems to have their favorite. Some people prefer nano, maybe pico and the old-school peeps will always tell you about vi/vim. Why vim? You might say vim is the MacGyver of text editors. With a few commands hacked together you can do *anything* with your text file. Perhaps even blow up your machine! ;)

For those of you that have avoided vim in the past due to its fairly steep initial learning curve I thought I would outline some of the key commands and shortcuts for using it. I’m sure I will end up leaving a few out so if you have any additional tips on using vim please pipe in with a comment.

h,j,k,l : move cursor left, up, down, right within the file. arrow keys will do the same.

w,b : move forward or backward one word at a time. faster than one space at a time!

^,$ : move to the beginning or end of the current line.

gg,G : move to the beginning or end of the current file.

:number : jumps to a specific line number.

/keyword : keyword search within the document. n for next.

Now these are all commands to navigate your way around the file but what about actually editing the file? First use the i command to change to insert mode or a for append mode. Either will let you start adding or removing text from the file. Press escape to drop back out of this mode once you’ve entered.

If you want to do any copy/paste magic within vim you’ll need to change into visual mode. You use this, surprisingly, with the v key. Once you are in visual mode you’ll notice that as you move your cursor it will highlight the text and characters with it. Once you’ve highlighted the text you want to copy press the y key to “yank” the text and then use p to paste it after you’ve set your cursor in the proper position. Also, if you know you want to copy full lines of text you’ll want to switch to visual mode using the uppercase V and use the same method afterwards. (can anyone offer insight into why these aren’t he more standard x,c,v for cut, copy & paste?)

A few more things. Have you ever screwed up part of a text file while you were editing? Never? Really? Well I do it all the time and that’s why God invented undo. In vim simply press u while you’re in normal mode (press escape to always exit to normal mode) and you have unlimited undo power on your document.

Now after you’ve navigated your way through your text, done some copy pasting and put together your Pulitzer prize winning novel (all using vim, of course!) you’ll want to save it. To save something within vim you’ll need to switch to command mode using the :.

Once you’re in command mode you can use :w to write the file, :q to quit the file or a combination of the two, :wq to write and then quit the file.

That should be enough for today. Tomorrow I’ll have some more about find / replace within vim and where you can find out more. You can also find more here about vim’s sweet moves.

Ubuntu Tutorials – Giving The Planet A Spin

Based on much of your feedback I’ve submitted the Ubuntu Tutorial blog to the Ubuntu Planet. I have been an Ubuntu Member for almost a year now and I haven’t felt that my blog has been up to par for that level of syndication. Well, many of you have given me some great feedback and given me the confidence to make the plunge and submit to the Planet. I hope I’m able to continue with good content and keep moving in a positive direction.

My main goal is to try and educate as many people as I can on how to maximize their Ubuntu desktop, laptops or servers. Some of the content is similar to what you might find on the forums, but my focus is to compile these into regular tutorials and make them simple for anyone to follow.

As always, if you have comments or improvements to offer based on the topics please leave comments. Ubuntu will continue to become a major player if we can educate the public. This is my goal.

See you back here soon for another Tutorial tomorrow. One a day is the goal–it keeps me on my toes.

Software For Starving Students 2007.1 Released (XP / OSX)

I know this post is a little off-topic as it isn’t a tutorial (but hey, you’ve already got one today!). This is a project that some great local guys have been working on that I wanted to share with everyone reading the blog. Free software alternative so XP & OSX all compiled into a single CD. You should definitely check this out and share it with friends / family that are still using “the other OS”.

The 2007.01 release of Software for Starving Students is now available for download. http://softwarefor.org/downloads.html

“Software for Starving Students is a free collection of programs organized for students (but available to anyone). We’ve gathered a list of best-in-class programs onto one CD (one disc for OS X, one for Windows), including a fully-featured office suite, a cutting-edge web browser, multi-media packages, academic tools, utilities and more.”

More info:

* Project homepage: http://softwarefor.org/
* A complete list of included titles: http://softwarefor.org/faq.html#q5
* Screenshots: http://softwarefor.org/screenshots.html

Please help us out by seeding the torrent, spreading the word, and burning copies for your friends and family. (Nothing spreads holiday cheer like good, free software.)

Happy Downloading!

How to forcefully empty the Trash : Ubuntu (5.10 / 6.06.1 / 6.10)

Have you ever run into the situation where something wouldn’t delete from your Trash folder? I’ve run into it a few times and I’m not even sure why it happens. For those times when you need to forcefully empty the Trash you can use the following command:

rm -rf $HOME/.Trash or sudo rm -rf $HOME/.Trash

Note: you should be careful when using the -f (forceful) option with remove. It will just straight-out remove something with no verification. It could be dangerous if it ever fell into the wrong hands ;).

Yes, this is a quick tutorial for the day. Tune in tomorrow for a little talk about Viruses.

Blogging from GNOME with Drivel : Ubuntu (6.06.1 / 6.10)

This tutorial was written while offline and without any kind of browser open. That’s right. You can blog right from your gnome-based desktop with the greatest of ease!

Tutorial for the day: Installing and blogging with Drivel.

To install Drivel you can use the basic methods we’re familiar with. Via the command line or from “Applications” > “Add / Remove” > search:Drivel. (command line “sudo aptitude install drivel”

You can then access Drivel from your Applications menu inside the Internet section.

Now once you have it installed it is pretty straight forward and easy to use. The only part that might be tricky is giving it access to the right file to verify your account with your blog. For WordPress (which is the only one I’ll outline since it is what everyone uses anymore) you’ll need these three things:

  • username
  • password
  • Select “Moveable Type” and then give the path to: http://myblogaddress.com/xmlrpc.php

At that point you can login and start blogging away! Here is a quick rundown of some of the features of Drivel:

  • Category Selection
  • Editing previous posts
  • Image Linking

Take it for a test drive and see what you think. Blogging just got easier!

Explanation of the Ubuntu / Linux file structure : Ubuntu (all versions)

In the Linux file system everything is considered a file–even devices, drives and removable media. It definitely is a bit different than what you might be used to in the Windows world, but after a quick rundown (below) hopefully the organization will make some more sense.

The base (or equivalent of C:\) is called the root folder or “/”. The closest equivalent of “Documents and Settings\User” would be “/home”. The “/home” folder stores each users files, settings, pictures, etc. Most of what you do is held within the /home folder. Below is a quick explanation of the rest:

  • /bin – binary applications (most of your executable files)
  • /boot – files required to boot (such as the kernel, etc)
  • /dev – your devices (everything from drives to displays)
  • /etc – just about every configuration file for your system
  • /home – locally stored user files and folders
  • /lib – system libraries (similar to Program Files)
  • /lost+found – lost and found for lost files
  • /media – mounted (or loaded) devices such as cdroms, digital cameras, etc.
  • /mnt – mounted file systems
  • /opt – location for “optionally” installed programs
  • /proc – dynamic directory including information about and listing of processes
  • /root – “home” folder for the root user
  • /sbin – system-only binaries (see /bin)
  • /sys – contains information about the system
  • /tmp – temporary files
  • /usr – applications mainly for regular users
  • /var – mainly logs, databases, etc.

I hope this helps. Again, for the most part as a regular user you wont need to bother with the rest of the areas of the system. Occasionally you might need to edit a configuration file in /etc (as you may have seen in earlier posts), but the rest pretty much takes care of itself.

How to install & play World of Warcraft : Ubuntu (5.10 / 6.06.1 / 6.10)

This one is for all you gamers out there. Did you know (I know, you probably did) that World of Warcraft will work on an Ubuntu system? You just need to add a few things to get it going but its really not hard at all. I have been playing for some time now (although I don’t get to as much as I’d sometimes like). Below are instructions for installing and running World of Warcraft on an Ubuntu system. (Thanks goes to this page for original information)

You’ll need to install the latest version of WINE for World of Warcraft to be able to function. You can do that the following ways (depending on your Ubuntu version)

    deb http://wine.budgetdedicated.com/apt edgy main (Edgy Systems)
    deb http://wine.budgetdedicated.com/apt dapper main (Dapper Systems)
    deb http://wine.budgetdedicated.com/apt breezy main (Breezy Systems)

      After you’ve installed the appropriate line to your repositories you’ll need to run the following two commands:

        sudo aptitude update
        sudo aptitude install wine

        The next step is to copy all files from your World of Warcraft CD’s to a directory on your hard drive (overwrite when prompted). This, of course, will take a few minutes.

        When this is finished run:

        ALT-F2 : wine path/to/warcraft/installation/Install.exe

        (you can also optionally copy the World of Warcraft folder from a Windows installation.)

        You’ve now got World of Warcraft installed and just about ready to play. You’ll want to tweak one more thing before you get going though.

        World of Warcraft seems to work best using OSS audio. To set this you can do the following:

        ALT-F2 : winecfg

        In the resulting menu select “Audio” and then select “OSS driver”

        .. and then one last thing before you get playing. You’ll need to add a few lines to a configuration file and then you should be in business.

        ALT-F2 : gksudo gedit path/to/warcraft/installation/WTF/config.WTF

        add the lines:

        SET SoundOutputSystem "1"
        SET SoundBufferSize "100"
        SET gxApi "OpenGL"

        Happy gaming. Ooh, I nearly forgot. To launch Warcraft you can use the following command or create a launcher with this path:

        wine path/to/warcraft/installation/WoW.exe

        Alternate Desktop Manager – Xfce / Fluxbox / Enlightenment / Blackbox / Openbox / Afterstep / FVWM / WindowMaker : Ubuntu (6.06.1 / 6.10)

        How many of you have older hardware? I know I’ve got a few machines that I can’t take myself to throw away. It’s ok though because we all run Linux which is very kind to old hardware (Don’t throw away good hardware, use Ubuntu!) For those of us with even older hardware we might need to tone things down just a bit. How do we do that? We’ve got a few options, let me go over a few:

        First, if we’re using GNOME (which is the default desktop manager) we can tell it to tone things down a bit using gconf-editor. Try the following and see how much difference it makes in your responsiveness:

        ALT-F2 : gconf-editor
        set "/apps/metacity/general/reduced_resources" to true

        Or, if you’re using KDE you’ve got a few options as well. note: in my experience KDE is the least hardware friendly (as far as responsiveness and memory requirements). You can try running (or installing if it isn’t included) a program that will allow you to reduce the eye-candy level of KDE:

        kpersonalizer

        Now for those of you that have hardware that served back in the war, or want to venture into some new desktop manager options you can install any of the following:

        Xfce - sudo aptitude install xubuntu-desktop
        Fluxbox - sudo aptitude install fluxbox
        Enlightenment - sudo aptitude install enlightenment
        Blackbox - sudo aptitude install blackbox
        Openbox - sudo aptitude install openbox
        Afterstep - sudo aptitude install afterstep
        FVWM - sudo aptitude install fvwm
        WindowMaker - sudo aptitude install wmaker

        note: you’ll also want to install a menu application that keeps the different Desktop Manager menus separate. Install the package menu using your preferred method (command line or Synaptic Package Manager) and, after installation run:

        sudo update-menus

        Now you might be wondering how to switch between these new desktop managers. It’s really simple and you can very easily have any / all of these installed at any time and switch between them all.

        1. Logout of your current desktop manager
        2. On the Login screen find the “Options” button
        3. Select “Sessions” and select your newly installed desktop manager

        It will ask you if you’d like to switch to that manager just this time or if you’d like to make it the default. That is, of course, up to you. If you’d like like to give things a test-drive just use it for this session. You can easily switch between any desktop manager using the same method. So what are you waiting for? Check out some of the other available Desktop Managers and make your desktop completely unique to you! Ooh and, of course, many of these alternates are MUCH more lightweight and work GREAT on older hardware!