Category Archives: Video

Fun With xwinwrap in Compiz Fusion

I’ve been occasionally looking for something in Linux that would spruce up the place. Right now, my desktop is an minimalistic and functional solid black background. I’d like to do more with the space. Not just put up an image as a background – that’s straight from the late 80s.

The Mario desktop I would like to install on my Desktop is a perfect example of things that “just work” in Windows don’t seem to be possible in Linux. Until today, I didn’t know if there was a way to set my Ubuntu desktop with a HTML file with animation and graphics. In Windows, it’s a really simple operation… add the HTML location to your “Active Desktop,” place in on your desk where you’d like then lock down the widget.

For Linux there’s something far, far more powerful called xwinwrap. It allows you to run (most) any application as a desktop background. Really sweet, just check out some video:

Installation Instructions (on Hardy Heron Beta) – mind the possible wordwrap:
sudo apt-get install build-essential libx11-dev x11proto-xext-dev libxrender-dev libxext-dev cvs

cvs -d :pserver:[email protected]:/cvs/xapps co xwinwrap

cd xwinwrap

make

sudo cp xwinwrap /usr/bin
This last line is optional, but puts the command in your path for easy access.

Now you can do some really funky stuff… like run the glmatrix screensaver as your desktop background:
nice -n 15 ./xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- /usr/lib/xscreensaver/glmatrix -root -window-id WID

This is really cool, but what if you need to change settings for something else? Here’s the lowdown on what each command switch does – and there are a LOT of them. One wrong or missing switch will completely change the behavior of the program.

xwinwrap [-g] [-ni] [-argb] [-fs] [-s] [-st] [-sp] [-a] [-b] [-nf]
[-fl] [-o OPACITY] -- COMMAND ARG1...

-g geometry
-ni no input
-argb argb ?? Alpha, Red, Green, Blue ??
-fs fullscreen
-s sticky
-st skip taskbar
-sp skip pager
-a above
-b below
-nf noFocus
-o opacity=# Between 0 and 1

Want to help me write articles and receive credit where it’s due? (Thanks Oli for the heads up on xwinwrap! – Check out his blog, while you’re at it.) Anyways, the point I was trying to make is to follow me on Twitter, answer my occasional random questions, and get kudos. Oh, and njpatel also pointed it out to me. Check out his blog too. :)

Please don’t drink and use xwinwrap. With great power, comes great responsibility. fsckin w/ linux is not liable for damages caused by shopping carts. this message was approved by justf**kinggoogleit.

My Cat Bubba Posts Videos and Twitters using an EeePC and Ubuntu

MAKE blogged about plants that notify the owner via text message or Twitter status update that they need water, and even thank their owners when they’re watered.

This got me thinking – why not a cat who sends a tweet when he’s eating? While I’m at it, why not toss in a video stream? After all, everyone loves videos of their cat. My ASUS eeePC runs eeexubuntu and has a webcam – all I would need to do to get my cat twittering is setup some motion sensing software that detects movement from the webcam, records a video, and upload to my server and then notifies me.

First, a proper “cat studio” is required. I picked up a laundry basket, some thin anti-slip mat and a couple of new food bowls for under $15 total. The laundry basked got a side removed by my trusty Dremel tool, and the anti-slip mat was cut to fit and hot-glued in place. After that was done, I had a spare light fixture with a clamp lying around to add to the mix for better lighting.

Motion is a great webcam application that fits my needs exactly. More specifically, when it detects motion, it records a video – think like a security camera, but way, way smarter. When Motion no longer senses any movement after a defined period of time, it encodes the captured video, and then it can run a script or set of commands afterwards. Bingo!

Here’s how I did it, after hours of trial and error:
1. Installed Motion 3.2.9
2. Configured and tweaked /etc/motion/motion.conf (probably still some changes needed)
3. Setup SSH to allow logins to my web server without a password.
4. Added the following to execute when a recording is finished:
Upload the file (using cat, of course!):

cat /tmp/motion/video.swf | ssh [email protected] cat ">" /home/fsckin/fsckin.com/bubba/video.swf

Update Twitter Status:

curl --basic --user "junglecrawler:password" --data-ascii "status=Done eating, humans were nice to me today." "http://twitter.com/statuses/update.json"

Remove the video off the local machine:

rm /tmp/motion/video.swf

Here’s the end result:
First Video:
[flash http://www.fsckin.com/bubba/video3660-first.swf]

Latest Video (15MBish)

This videos loop over and over. Also – if a video is uploading at the same time that someone is loading the page, it might break. If you don’t see video, just count to 10 and refresh the page. If you still get nothing, bookmark this on del.icio.us and come back later.

Note: Audio is not yet supported by Motion, however, an experimental patch enables this already and should be be in the next version. This is a proof of concept, and it will probably be running for at least the next week – after that, who knows. All I know is after I’m long forgotten, Bubba will live in perpetuity as truly the first cat who uploaded videos of himself eating and sending tweets to his human slaves.

Follow Bubba on Twitter. Or, follow his slave, Wayne.

gOS Space and myMiniPC: Bling-Enabled Desktop for Myspace

The 100+ million “average joe” Myspace users are about to get mind blowing eye-gasm with the brand new myMiniPC with gOS Space 2.9 – and I’m not talking about some spicy profile pictures. Combining the Avant Window Navigator dock and Compiz Fusion 3D effects is going to provide a desktop experience generations beyond what Redmond’s latest offering in a slim form factor 1.5 inches tall and a mere two pounds.

When I spoke with David Liu about the product, he said, “I enjoy tackling these giant companies that I feel symbolize a huge population of average joes.” Six months after launching the gPC in Wal*Mart in front of 140+ million shoppers for a price the couldn’t refuse, now he’s leveraging freely available content on sites like YouTube, Flickr, Pandora and many others with the myMiniPC.

The icons on the left side of the dock are Myspace, News, Photos, Videos, Music, TV, Tools, and Fun. On the right side, four brand new Myspace Apps are featured: Mood, Clock, Graffiti, and Quotes – one app for each face of the desktop cube.

Myspace icons range from Blogs to Music and everything in between, for users to quickly navigate around the site or launch new instances of Firefox. Stuffy news agencies like BBC or CNN have been replaced with links to popular blogs such as Perez Hilton, TMZ and Valleywag.

Flickr and Photobucket populate the Photos icon along with three others. The videos icon has a whopping nine options: Daily Motion, Google Video, Meta Cafe, MyspaceTV, Revver, Veoh, Vimeo, and YouTube. I could go on all day about how much is a single click away – if you’re interested in more information, feel free to browse the screenshot gallery below, or simply watch my video about gOS on YouTube with a short demo.

The logic behind building an operating system out of web applications quickly becomes obvious as you go down the dock viewing each category. These companies have banked billions of dollars by using content created by their users. Making that content easily accessible is the key to providing a channel surfing experience for the web.

With tax refunds just around the corner, the $499 price on the myMiniPC is perfect. gOS Spaces 2.9 should be available soon, I urge you to test it out and tell your friends who are on Myspace about it. Got a suggestion, question or comment? Go ahead and Ask Dave yourself – I’m sure he’ll be happy to oblige your request. Here are some specs, screen shots and video of gOS Space 2.9 for your viewing pleasure.

myMiniPC specs:
• Intel® Pentium® Dual-Core Mobile Processor T2130 (1MB L2 Cache, 1.86GHz, 533MHz)
• 512MB DDR2 667 SDRAM
• 120GB Hard Disk Drive
• DVD+/-RW
• Intel® Graphics Media Accelerator GMA950
• Realtek ALC268 High-Definition Audio
• (4) USB 2.0 ports
• (1) IEEE 1394
• (1) 10/100/1000 Ethernet Port
• (1) DVI-I Port
• (1) S-Video Port
• (1) 4-in1 Media Card Reader
• (1) Headphone/Line-Out Port and (2) Microphone/Line-In Port

Screenshots:

Video:

What Happens When You Call Microsoft Support To Remove Linux?

This April Fools’ Day it needs to be special. And by special, I mean truly EPIC.

I’ve been brainstorming for weeks about what I would do, and I’ve had some real killer ideas that would unfortunately fall flat on their face during execution. One idea I had was to bridge the #emacs and #vim internet chat rooms with clones that relayed messages from one room into another, one clone per person. When I saw there was 250+ people in each room, I figured it would be nearly impossible to pull off without a lot of help – someone would notice all the clones and it would be over.

Then a stroke of genius struck me:  For this April Fools’ day, I’ll call Microsoft to help me uninstall Linux. Yes, that’s right. Microsoft would willingly help me uninstall Linux, they even have a Knowledgebase article on it, and all I would need to do is tell them I’m having some problems following the KB article, and they would helpfully guide me through it.

This prank would need PROOF that it happened, not just my word – and nothing is better to prove that something happened than video. But first there were some legalities to figure out… can I record the phone call?

I did some research, and sure enough, Utah is a one-party consent state. If at least one party (aka me) consents to recording, I’m in the clear. However, I’m calling a company based out of Washington – and they’re a two-party consent state (for the most part).

What happens when you’re calling across state lines? Federal law takes precedence as far as I can tell, and that my friends is where I get carte blanche – federal law states that at least one party needs to consent.

Wayne – 1, Microsoft – 0.

I got the camera ready, found my copy of Windows XP Professional Edition, printed out the KB article in case I needed it while my machine was down, and called their support number and drilled down through the voice menus to get to someone who would transfer me to the right person.

Silly youtube disabled embedding. My appologies! Can view the video at the below link.
I don’t want to spoil the fun, just watch the video and see what unfolded.

Toribash: The Video Game That Dismembers Players, Joint by Joint

Have you ever felt like ripping the arms off an annoying co-worker and beating them silly with their own limbs? I personally haven’t had the urge, but hey – if you have, you will love Toribash. It’s the most realistic fighting game I’ve ever played. Certainly not the prettiest – but I’m working a theme here this week, with Defcon and it’s wireframe graphics, Toribash has real 3D characters… stick figures with spherical joints – but nevermind that. It’s the gameplay that counts, right?

Toribash looks like a ton of fun. I say looks because the game is so complex, it’s really daunting for a first-time player. I’ll give a good example of how complex the game is, taken verbatim from a how to punch tutorial video on YouTube:

Press C
Left Rotate Chest
Contract Right Arm
Contract Right Pecs
Extend Left Leg
Extend Left Pecs
Contract Right Hip
Press Space

You want me to do what? I’ll explain with a visual aide, courtesy of IKEA – they sell these mannequin posing dolls made of wood that illustrate my point almost perfectly, just $5.99 plus tax. It’s a steal! I’m not quite sure what I would do with one of them, but it’s a real bargain. Ok, back to my point – how hard the game is:

That’s a little bit of a exaggeration, but not by that much. It’s like a stop-action IKEA wooden doll posing contest, and whoever happens to deal more damage before time runs out, wins. Part of the beauty is that no two games are exactly alike – it’s near impossible that two separate players would click the same muscles to flex and relax more than once. Now, imagine that you face two of these dolls in front of each other, with each person controlling the stick figure madly clicking away … wait… this reminds me of a childhood game I played…

For someone to have played regular fighting games all their lives and finally meet Toribash, it’s as if Rock ‘Em Sock ‘Em Robots Robots gained about 8 more buttons. It’s mind boggling. Now if you saw a bunch of people sitting around, playing with the 10-button Rock’em Sock’em, wouldn’t you be interested in learning how to play? It’s similar to the first impression I had of Guitar Hero – “That’s retarded, how can that be fun?” Hopefully now you know exactly what I’m talking about. I still can’t quite wrap my head around the complexity of actually moving a characters’ muscles one at a time, but it’s FUN.

And that’s what matters most when you’re playing a game.

One piece that is really key to building and maintaining the vast community that never sleeps is rewarding those who put in time and money into it. Yep, I said money. The game integrates into forums, allowing you to spend points gained on customizations for your character. Acid Blood. Custom skins you can upload, just like an avatar on a normal forum. The catch? If you win a game, you win 5 points. Acid Colored Blood costs 16,000 points. Yes, that is not a typo. You’ll need to win 3200 matches to buy Acid Colored Blood. You can buy points, or you can buy a psudo subscription to the game and gain anywhere from 50 to 1000 points per win – at a cost of $5 and up per month. The community is thriving.

Download Toribash for Linux or visit the Toribash website for more information.

This game might be something you’re interested in, it might not be. I guess the best bet is to watch this promotional video of a few versions ago. If it looks like fun to pull off a triple-gainer roundhouse kick to the face, you may want to invest the time required in learning how to actually do something like that. Or maybe you should just stick to the completely boring two-button-knock-their-block-off version. Your choice.

Would You Like to Play a Game of… DEFCON?

DEFCON is short for Defense Condition, on a numerical scale, with 1 being the highest level of alert or readiness. It also happens to be the name of a video game that lives up to the origins, the movie WarGames, which was released in 1983. The movie is based on the premise that an teenager war-dials every telephone number in his city trying to find the computer system of a video game publisher. One of the telephone numbers goes straight into a military computer, and he thinks it’s actually a computer of the video game company. He figures out the password to the system and starts a “game” of Global Thermonuclear War, which unbeknownst to him, triggers the computer into starting a not-so-video-game nuclear war military simulation.

A large portion of the film takes place in the most expensive movie set ever created at the time, a full-scale replica of the underground NORAD headquarters Command Center. After inflation, the set would have cost nearly 2.1 million dollars to create today.

What’s equally impressive is Introversion Games (or simply, IV Games), the developers of DEFCON (the real life video game) had about 18 months and something like 8 employees to present the world with their version of the movie set turned into a video game.

IV has definitely had it’s share of difficult times, as this forum post goes into detail. Not many independent game developers can say they’ve gone from spending tens of thousands of dollars on speedboats and cars to living on government benefits. Thankfully they kept making video games instead of giving up after going bankrupt. :)

The game seems ludicrously simple at the beginning. You’re automatically assigned a territory, and you place radar dishes, silos, carriers, battleships, subs, and much more around your territory as you see fit. The game proceeds at up to 20x normal speed (most games would take 8 hours in real time), meanwhile counting all the way up to DEFCON 1 where you can actually launch nukes. What starts out as simple ends up being a rather complex strategy game. The “winner” of each game depends on the mode being used, but the goal is to nuke other countries’ population centers while fending off nuclear attacks on your own cities.

Instead of going into more detail, here’s a video I made of three computers playing each other. It’s a pretty good introduction into the DEFCON stages – watch the white text and red countdown timers. I’ve dubbed the video over with some appropriate music to speed things along, but the actual game soundtrack is absolutely epic – just like the original movie. The graphics are wireframe based (much like Darwinia) and they look great, while helping the player focus on what is most important – the gameplay itself.

Each of their previous games, Uplink, and Darwinia have native Linux clients. I would imagine that their next title in development Multiwinia will also support Linux, as well as Windows and OSX. The Linux demo is pretty fantastic, it was simple to install and run. I’ve been reiterating over and over lately, supporting companies that support Linux is very important, and if you check out the demos and enjoy them, send some money their way. They can probably put it to good use getting their fast car polished or something. ;)

If you need instructions, to get all three games running, here they are:

1. Install a couple common files you might need from a vanilla Ubuntu 7.10 installation:
sudo apt-get install libgtk1.2 libstdc++5

2. Install Defcon
wget http://download.introversion.co.uk/defcon/linux/defcon-v1.42.tar.gz
tar xvfz defcon-v1.42.tar.gz && cd defcon-v1.42 && chmod a+x defcon
./defcon

3. Install Darwinia
wget http://www.introversion.co.uk/cgi-bin/countdowndarwinia.cgi?darwinia-demo2-1.3.0.sh
chmod a+x darwinia-demo2-1.3.0.sh && ./darwinia-demo2-1.3.0.sh
chmod a+x ~/darwinia-demo2/darwinia && cd ~/darwinia-demo2
./darwinia

4. Install Uplink
wget http://www.introversion.co.uk/cgi-bin/countdownmemset.cgi?uplink-demo-1.54.sh
chmod a+x uplink-demo-1.54.sh && ./uplink-demo-1.54.sh
chmod a+x ~/uplink-demo/uplink
./uplink

If you don’t need instructions, you should be doing one of two things: reading Linux Journal (see below), or downloading the demos. Both options are free (as in beer) to those of you in the USA, and that LJ promotion has been putting enough money in my pocket each week to buy a cup of joe coffee-flavored-milkshake from Starbucks, along with a muffin or other tasty treat.

If enough loyal readers out there check out the free LJ offer, I might be able to buy… speedboats or fast cars come to mind. Last but not least, I’ve received word that the interview with Ken VanDine of Foresight Linux is about halfway done. He’s apparently a rather busy guy, I’m REALLY looking forward to it. If you had subscribed to my Twitter feed you would already have that delivered to your cellphone.

How To: Run Call of Duty 4 (COD4): Modern Combat in Linux

Here in the city I affectionately call Salt Lake Shitty, Utah – it’s about as cold as a witch wearing an iron cupped bra doing push ups in the snow.

pretty-excellent-gun-wank.png

To offset this chilly weather, my best friend in the entire world* Yahtzee, who does a little piece for Escapist Magazine every Wednesday called Zero Punctuation warmed up to Call of Duty 4: Modern Combat, calling it a “Pretty Excellent Gun Wank” which in my book means it’s a 5-star title, and worth playing – but only if it runs in Wine.

*I am not actually friends with Yahtzee.

The Wine Application DB website says the compatibility rating of the game is Silver, which means it works excellently for ‘normal’ use. In less generalized color coded terms, this means that it works near perfectly after recompiling Wine.

I can hear the groaning and murmurs in the background – stop it!!! All this requires is a little bit of brainless copy and paste from this page into a terminal.

I spent a significant amount of time getting this to work on my own, and apparently I *did not* quote the source of most of what I posted here, for which I apologize. As far as I can recall, I had gone though the process of recompiling Wine with the 3dmark patch, downloading the D3D DLL and found a guide on Ubuntu Forums by ahaslam that had all my work plus more already posted.

Continue reading

How To: Run World Of Warcraft (WoW) in Linux Using Wine

intro.jpg

World Of Warcraft is one of the most successful games in history, with 9.3 million subscribers and counting. Believe it or not, the beta test of World of Warcraft actually had a Linux client. It’s true! When the game shipped, support for Linux was dropped and the game never shipped with a Linux client.

What a shame! The good news is, there’s been some positive collaboration between members of the Linux developer community who work on and contribute code to projects like Wine, Cedega and CrossOver. Because of this, installation and configuration of World of Warcraft is a snap for those of you who are interested in getting rid of your Windows partitions lying around if WoW is your game of choice.

We have 8 steps to complete to play the game:
1. Configure 3D drivers with Envy.
2. Install WINE and fonts.
3. Configure WINE.
4. Download (or install from media) the actual game.
5. Edit config.wtf
6. Create a Registry key
7. Install a Linux specific AddOn
8. Launch the game!

1. First, we need to check to see if we have correct and working video card drivers that will work with the game. Open a terminal and type in this command:
glxinfo | grep rendering

It should return with something like this:
direct rendering: Yes

If it says “no” then we have to install the right drivers.

If you have an ATI or nVidia card, the quickest way is to use Envy. Head on over to the website and snatch a copy of the script. Scroll about halfway down and you’ll see the link that ends in .deb – that’s what you want if you’re running Ubuntu or Debian.

Open up the Envy .deb file once it’s done downloading, and we should be prompted with an installer program, just hit the install button and follow the prompts. After it’s installed, we will need to start up the script by going into the Application Menu, then System Tools, then select Envy.

screenshot-envy.png

Select “Install the NVIDIA driver” (or ATI driver) and press Apply. This process takes about 5 minutes to complete, so go make a sandwich and reboot your computer when it prompts you to do so.

Don’t worry if it seems like it’s not making progress – just be patient. After rebooting, run the glxinfo | grep rendering command again, and this time it should respond “yes” this time.

2. Then, we are going to install two items before we can actually start installing the game.
a. WINE allows us to run Microsoft Windows executable files
b. To make things look pretty, we need to download two different font packs.

In Ubuntu 7.10, the following command will install all three items in short order. You can open a run dialog box by pressing Alt+F2 simultanously (or open a terminal), then paste in the following:

sudo apt-get install wine msttcorefonts ttf-xfree86-nonfree

Type in the password for your user account, and follow the prompts. After that command completes, we’re just about done preparing the system and can install the game *almost* as easily as in Windows.

3. Configuring Wine
By running the winecfg command, we can choose which sound driver to use (OSS or ALSA), and also switch compatibility modes – just like XP and Vista have done for quite some time, WINE allows us to switch between different operating systems to allow for better compatibility with various programs.

Some users have reported that switching WINE to use NT 4.0 compatibility, issues with patches or installations have been resolved. If you run into problems, you may want to try here first. I left it on Windows XP mode the entire time and had no problems, but your mileage may vary.

4. We need to download and/or install the game from media.

I personally have an old account that has been sitting dormant for approximately a year, and I’ve thrown away my installation media. The easiest way to install WoW and TBC is using the original CDs, but if you don’t have them, or have a pretty fat internet pipe, Blizzard helpfully provides online downloads via BitTorrent, so that’s the method I’ll document here today.

Since I’m showing how to install via download, here’s the two links you need. The first one is to download the original WoW game installation files, and the second link requires you to login to verify that you actually have The Burning Crusade expansion enabled on your account before you can get the BT download program for TBC from Blizzard.

http://www.worldofwarcraft.com/downloads/files/pc/wowclient-downloader.exe
https://www.worldofwarcraft.com/account/download/clients/pc/bc-downloader.html

Both of these files utilize BitTorrent technology to allow users to download the entire game, except for the latest patch. These files are updated pretty often, so you usually don’t need to install more than one patch after you’ve got the game installed.

To run them, just open them up just like you would on a Windows computer. They should automatically open up in WINE, and after you select a download destination, you’ll have a pretty familiar window staring you right in the mullet.

screenshot-browse-for-folder-1.png

screenshot-0percent-blizzard-downloader.png

NOTE: Your internet bandwidth is going to be sucked up completely by the download client. If you need to browse the web or anything in the meantime while you download over 4GB of data, select the View menu in the download program and select preferences, then uncheck download from peers.

When these are done downloading and installing, we can go and get a few tweaks setup so that everything will run smoothly once the game is downloaded.

5. We need to setup the config.wtf file inside your WoW folder, by default it is located in the ~/.wine/drive_c/Program\ Files/World\ of\ Warcraft/ directory. If it doesn’t exist, login to the game once, and just exit right out. The game will create a default one for you.

We need to append a few items to this file to use the OpenGL rendering engine (instead of DirectX or Software rendering) and make sure we have everything setup to run properly under WINE.

You can run this command to edit the file:
gedit ~/.wine/drive_c/Program\ Files/World\ of\ Warcraft/wtf/Config.wtf

Then paste these lines at the end:

SET gxApi "opengl"
SET ffxDeath "0"
SET ffxGlow "0"
SET SoundOutputSystem "1"
SET SoundBufferSize "150"

6. Next, we create a registry key and value.
The following instructions to modify the registry are taken directly from the Ubuntu wiki page and is licensed under CC-BY-SA.

a. Find this key HKEY_CURRENT_USER\Software\Wine\
b. Highlight the wine folder in the left hand pane by clicking left on it. The icon should change to an open folder
c. Right-click on the wine folder and select [NEW] then [KEY]
d. Replace the text New Key #1 with OpenGL
e. Right-click in the right hand pane and select [NEW] then [String Value]
f. Replace New Value #1 with DisabledExtensions (Notice it's case sensitive!)
g. Then double click anywhere on the line, a dialog box will open.
h. In the value field type GL_ARB_vertex_buffer_object

It should look like this:
regedit.png

7. Now we can install a Linux-specific AddOn for the game so that the graphics options are able to be modified in-game without crashing. Download this file and unzip it.
applytoforehead-4.zip

Copy the entire extracted ApplyToForehead-4 folder into the following location:
~/.wine/drive_c/Program\ Files/World\ of\ Warcraft/Interface/AddOns/

If the Interface or AddOns folder do not exist, go ahead and create them.

8. We can launch the game from the desktop shortcut, or create one pointing to the wow.exe file within the WoW folder.

You should end up with the launch executing flawlessly:
fonts-installed-screenshot-world-of-warcraft-v2006080.png

Now just hit the Play button and enjoy the most addicting game since slot machines. On the character selection screen, make sure to enable out of date AddOns so that ApplyToForehead is loaded properly.

That’s it! If you have problems with running the game, please leave a comment and I’ll attempt to answer it, or look for support channels via the following wikis:

Ubuntu: https://help.ubuntu.com/community/WorldofWarcraft
Anything else: http://www.wowwiki.com/Linux/Wine

And for your enjoyment, here’s a video. :)