A fusion of technology, music, and geekyness.
Currently Browsing: Software

World of Warcraft in Ubuntu 9.10

wow-ubuntu2
wow-ubuntu2

Wine and Ubuntu have really come a long way. These days it is very easy to get World of Warcraft to smoothly run in Linux. I felt the need to write this guide for two reasons: one as a mark of my triumphant achievement, and two as a helpful guide for those looking to do the same. This walk through assumes the following.

  • You do not have wine currently installed. If you do and it is not the wine1.2 package then World of Warcraft probably won’t run very well, if at all.
  • You currently have the restricted drivers installed for your video card
  • Your system is up to date.
  • You are running Ubuntu 9.10
  • The WoW current patch is not too far past 3.3.3
  • You have basic knowledge of Linux and understand how to use a terminal

Warning: This configuration worked great for my hardware. Other hardware configurations may need additional tweaking.

1. Before you start you must verify that your graphics card had DRI enabled.

glxinfo | grep rendering

If it returns “Yes” then you are all set. If it returns no I am not sure if you should continue with this guide.

2. Install Wine via apt

sudo apt-get install wine1.2

3. Download the Visual C++ Patch From Microsoft at www.microsoft.com/downloads/en/confirmation.aspx?familyId=200b2fd9-ae1a-4a14-984d-389c36f85647&displayLang=en.

wine /home/username/Downloads/vcredist_x86.exe

Follow the prompts to install it and it will close when it has finished. This patch is needed to successfully download patches at a certain point for WoW to run.

4. Install World of Warcraft. There are several means available to do this. You can install from the CDs/DVDs you bought or if you are like me you will need to download the entire installation from Blizzard. I had to download the downloader at https://www.worldofwarcraft.com/account/download_wow.html. For other methods of installation see the sources at the end of this article.

wine /home/username/Downloads/InstallWoW.exe

Choose Wrath of The Lich King when it prompts and keep going through the wizards. The downloader will eventually begin and you will have several hours (depending on your connection) to wait while it finishes.

5. Once the installation is complete, you will most likely want to edit the configuration to start WoW in OpenGL mode.

vim /home/username/.wine/Program\ Files/World\ of\ Warcraft/WTF/Config.wtf

Press the i key on your keyboard to go into insert mode. Add the following line to the bottom of the file.

SET gxAPI “OpenGL”

Press escape, type :wq, and press enter to save and exit the file.

6. Wine currently has permission issues with the World of Warcraft folder. If you ever notice WoW not starting after the launcher loads it is probably because the permissions somehow got screwed up on the folder. I have chosen to completely bypass the loader and I have also written a launcher script to make sure that WoW loads every time. Execute the following commands to start WoW for the first time.

chmod 755 /home/username/.wine/drive_c/Program\ Files/World\ of\ Warcraft/
wine "C:\Program Files\World of Warcraft\WoW.exe"

After some patience World of Warcraft will successfully load up. Get your initial video / audio configuration out of the way before the next step.

7. The endless loop: Login and it will force you to download a patch. You will have to complete this step approximately 5 or 6 times until all the patches have downloaded.

8. After all the of the patches have downloaded you should be good to go! Install all mods to /home/username/.wine/drive_c/Program\ Files/World\ of\ Warcraft/Interface/AddOns/. Keep in mind that by default in Gnome that your keyboard is configured to automatically repeat keys when held down by default. This will make your mounts and characters running seem strange. You can disable this temporarily by going to System -> Preferences -> Keyboard and unchecking “Key presses repeat…”

I hope this quick guide has helped you get World of Warcraft installed and running beautifully in Ubuntu. If you have additional issues with your installation and need help please see the following sources for additional assistance.

Sources


Syncing Tomboy Notes Over SSH

Over the past couple of months I have started to really get into the habit of quickly dumping useful information or code snippets into Tomboy notes to save it for future use. I now use Tomboy for the majority of my note taking needs. I am very happy to get away from the notepad / gedit crutch. One issue that I faced is that I had some notes at home on my PC and other notes at work on my laptop. Thankfully, Tomboy notes has a nifty syncing feature that enables us to sync notes over SSH.

1. Create a directory on a server with SSH to host the notes

ssh tgeek@myserver.example
mkdir tomboy

2. Create an SSH key on each machine that you want to sync with and do necessary prep

ssh-keygen -t rsa
ssh-copy-id -i /path/to/keys/mynewkey tgeek@myserver.example

3. Download sshfs on each machine that you want to sync with

sudo apt-get install sshfs

4. Setup Tomboy to sync

Important: If Tomboy is already running make sure to kill it before attempting these steps. If you had Tomboy running while you installed sshfs then it will not recognize sshfs until you kill all Tomboy processes and start it again.

4.1 In Tomboy, goto Preferences.
4.2 Click on the Add-ins tab and ensure that Synchronization -> SSH Sync Service Add-in is Enabled (if it is grayed out then it is disabled).
4.3 Click on the Syncronization tab.
4.4 For Service, choose SSH (sshfs FUSE)
4.5 Enter the credentials for your server that you setup in step 1.
ex. Server: myserver.example
Username: tgeek
Folder Path: /home/tgeek/tomboy
4.6 Click Save

I have this working in Ubuntu 9.10 and it is beautiful!


Publish to WordPress from Droid

Download wpToGo from the market!


CakePHP eCommerce Done Right: Mocha Shopping Cart

Mocha Shopping Cart

Mocha Shopping Cart

A few months back I posted on CakePHP eCommerce and the lack of good solutions. Well that is now no longer the case. I would like to be one of the first people to introduce you to Mocha Shopping Cart. We have been working day and night (literally) to come up with a solution for the small and medium sized business owners to sell their products online easily. We also have geared Mocha to be extend-able and easy for CakePHP designers and developers to add in their own twists for clients.

Mocha is written entirely in CakePHP and jQuery and is certainly the best CakePHP eCommerce app out there. Why do I say that?

Mocha Shopping Cart is…

  • Fully hosted, secure, pre-installed
  • Very easy to set up and configure
  • Themable and Modular (Plug ins docs in the works)
  • Works with most popular payment and shipping apis (UPS, USPS, Authorize.net, Paypal, etc.)
  • Charges no transaction fees and no setup fees

If you still don’t believe me, Mocha is offering a limited time only Pre-Launch coupon code that gives you the first month FREE. You can try it for yourself and see how you like it. I think you will agree that it beats CakeCart and BakeSale, HANDS DOWN! And no, Mocha is not free (after the first 30 days). The costs help to speed up development, pay for server and hosting fees, and pay for that cup of coffee that us developers need when its 8 AM and we are having to talk with <insert_API_name_here> first thing in the morning.

Official Website: Mocha Shopping Cart
Blog with coupon code: Get a free trial of Mocha Shopping Cart


Selective RSS Plugin for WordPress

We had a client recently request that we embed an RSS feed from a different site inside their WordPress install. This would’ve been very easy considering there are 100′s of RSS feed plugins that will accomplish this task. However, they wanted to only display RSS items that had certain keywords in the title. My initial search found no WP plugins that currently were capable of this. I also tried one of the more popular ones, FeedList, but it used the get_rss() function in the WordPress API. For some reason, this function was not properly parsing the feed they wanted to use, most likely due to it not being a valid feed.

So to make a long story short: I decided to make a quick hack up solution and write my own WP plugin. My only hurdle-like requirement is that it had to work for PHP4 as well because the client is on one of our older servers. I ended up finding a really good example by Ryan Stemkoski. He wrote a perfect function for me to tweak a little and expand upon. I am currently waiting to get approved on WordPress extend so I can host my plugin there. For now, I have created a page here where you can download the plugin.

Note: I haven’t tested this in a more recent version of WP yet but I will be soon. Let me know if you find any bugs!

I also figured I would post the source code in case someone needed a quick and dirty solution with some examples.

rss_lib.php

<?php

/*
* RSS Parsing Function
*
* Original Author: Ryan Stemkoski
* http://www.stemkoski.com/how-to-easily-parse-a-rss-feed-with-php-4-or-php-5/
*
* Slight modifications by Jesse R. Adams (DualTech Services, Inc.)
*/ 

function parseRSS($url) { 

	//PARSE RSS FEED
        $feedeed = implode('', file($url));
        $parser = xml_parser_create();
        xml_parse_into_struct($parser, $feedeed, $valueals, $index);
        xml_parser_free($parser);

	//CONSTRUCT ARRAY
        foreach($valueals as $keyey => $valueal){
            if($valueal['type'] != 'cdata') {
                $item[$keyey] = $valueal;
			}
        }

        $i = 0;

        foreach($item as $key => $value){

            if($value['type'] == 'open') {

                $i++;
                $itemame[$i] = $value['tag'];

            } elseif($value['type'] == 'close') {

                $feed = $values[$i];
                $item = $itemame[$i];
                $i--;

                if(count($values[$i])>1){
                    $values[$i][strtolower($item)][] = $feed;
                } else {
                    $values[$i][strtolower($item)] = $feed;
                }

            } else {
                $values[$i][strtolower($value['tag'])] = $value['value'];
            }
        }

	//RETURN ARRAY VALUES
	return $values[0];
} 

/*
* Convert Raw RSS Parse into concise list of items
*
* Optionally pass in limit (on number of items)
* and/or array list of words to grab items by.
*
*/

function extractRSSItems($xmlArray, $limit = null, $filteredWords = array()) {
	$array = array();
	$regex = null;

	if (count($filteredWords) > 0) {
		$regex = implode('|', $filteredWords);
	}

	foreach($xmlArray['rss']['channel']['item'] as $item) {
		if (!$regex || ($regex && preg_match("/$regex/i", $item['title']))) {
			$array[] = $item;
		}
 	}

	if($limit) {
		array_splice($array, ($limit - 1), (count($array) - $limit));
	}

	return $array;
}
?>

selective_rss.php

<?php
/*
Plugin Name: Selective RSS
Plugin URI: http://techno-geeks.org/selective-rss
Description: Simple Plugin that allows you to embed RSS feed items into Pages or Posts. Optionally allows you to choose how many items to display and allows you to limit items to ones that contain certain words in the titles.
Version: 0.1.0b
Author: Jesse R. Adams (DualTech Services, Inc.)
Author URI: http://www.dual-tech.com/about-dualtech-services/
*/

require_once('rss_lib.php');

function filter_feeds($content) {
	$limit = null;
	$filter = array();
	$url = null;

	$inputTag = preg_match('/\[srss (.+)\]/', $content, $matches);
	$rawArgs = explode(',', $matches[1]);

	foreach($rawArgs as $input) {
                preg_match_all('/^(url|filter|limit)=(.+)$/i', $input, $matches);
                $key = $matches[1][0];
                $value = $matches[2][0]

		if ($key == 'filter') {
			$filter = explode(';', $value);
		} else {
			$$key = $value;
		}
	}

	if ($url) {
		$xml = parseRSS($url);
		$items = extractRSSItems($xml, $limit, $filter);

		$htmlToAdd = '';
		foreach ($items as $item) {
			$htmlToAdd .= '<a href="' . $item['link'] . '" target="new">' . $item['title'] . '</a>' . "<br/>\n";
			$htmlToAdd .= $item['description'] . "<br/><br/>\n";
		}

		$content = preg_replace('/\[srss .+\]/', $htmlToAdd, $content);
	}
	return $content;
}

add_filter('the_content', 'filter_feeds');
?>

Update 06/19: Fixed the way arguments are parsed to be less limiting on possibilities.


« Previous Entries Next Entries »

Powered by Wordpress | Designed by Elegant Themes