Archive for 2009

Linux remote screen lock

Tuesday, December 29th, 2009

You can activate your linux screen saver or screen lock by running this command:

gnome-screensaver-command --lock

or

xlock

But if you ssh into your linux machine to activate the screen lock or screen saver, you might run into this error:

** Message: Failed to connect to the D-BUS daemon: dbus-launch failed to
autolaunch D-Bus session: Autolaunch error: X11 initialization failed.

or

No protocol specified
xscreensaver: Can't open display: :0.0

You have to set the DBUS_SESSION_BUS_ADDRESS environment variable in order the command to work.  You can find the current running DBUS address by first getting the process id of the running screen saver.  Then grepping for the address in the environ file.  The following script will lock your linux terminal:

#!/bin/sh

PID=`pgrep -u $USER -f "gnome-screensaver"`
DBUS_SESSION_BUS_ADDRESS=`grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ`
DBUS_SESSION_BUS_ADDRESS=`echo $DBUS_SESSION_BUS_ADDRESS | sed -e 's/DBUS_SESSION_BUS_ADDRESS=//'`
export DBUS_SESSION_BUS_ADDRESS

gnome-screensaver-command --lock

Holy remote locking Batman!

Modern Warfare 2: Released but not recommended

Tuesday, November 10th, 2009

I have been urging to get my hands on a new FPS (first person shooter) game for a while now since my main FPS is the super old Battlefield 2 game! I thought about getting Modern Warfare 1 but I noticed both Modern Warfare 2 and Bad Company 2 were coming out soon. I decided to wait and see.

mw2logoWell today Modern Warfare 2 has been released! So I decided to poke around the internet to see what the word is. And my verdict is… not recommended.  I have decided that I will not buy Modern Warfare 2 based on two main deal breakers.

Deal breaker #1: 18 player limit

Say what!  That’s right, it appears that Modern Warfare 2 is limited to 18 players.  Not 18 players on each side, but 18 players total, that’s 9v9 tops.  Personally, I love playing with a huge number of players because it just feels more like the scenes from the movie Saving Private Ryan.  And I think that’s awesome.  I love the concept of organized chaos which is what you get from 32 or 64 players duking it out while sub-dividing into miniature rambo teams.  With a maximum of 9 players on your side, half of them may be dead at any one time so that really leaves you 4 guys running around at a time.

If you’re a console guy, then you’re probably saying what’s the big deal?  And I would say it’s not a big deal to you.  For console games, this is pretty much the norm and this is what you expect.  More power to you.  But I am personally a PC guy and I am accustom to games that support up to 64 players.

Deal breaker #2: no dedicated servers

Initially I didn’t even know what this meant.  This basically means Infinity Ward, the creators of the game, will not have any game servers setup for people to play on.  The game is designed to be hosted directly on one of the client’s or player’s machines.  So yes, one lucky player in a given game will be hosting the game.  Based on my experience with FPS games and ping, this may give an unfair advantage to the player hosting the game as his ping will be virtually zero.  I have on many occassions, when my ping was super low, been able to defy death, almost in an omni-potent way, seen hoards of enemy shooting at me but always missing, as if they were targeting thin air.

Conclusion

A good summary is the title I have been seeing around the internet… Modern Warfare 2, DOA.  For those who are unfamiliar with that acronym, it stands for dead on arrival and is a common phrase seen when purchasing computer hardware.

Check out the funny ratings from GameSpot and IGN.

Ratings from GameSpot and IGN

Ratings from GameSpot and IGN

For now, I will be waiting for Bad Company 2.  While I have read that it can support a maximum of 40 players, the game is still to a bit too far from release to know for sure.  So hopefully it won’t let me down.  If it does, well there is always Modern Warfare 1.

Finally, here are some direct quotes that made me laugh (disclaimer: quotes do not necessarily represent the author’s opinions):

  • Take $60 out and burn it…least you get warm -zippythezip (GameSpot)
  • it’s like mw but then crippled -ATFNeOpHyTe (GameSpot)
  • Screw you consoles!!!!!!! -ZeppelinE6 (GameSpot)
  • outside of consoles this game is already DOA -doorules (IGN)
  • If I wanted to play 9 vrs 9 on small maps I would just reinstall my old Doom disks. -jdwksu (IGN)
  • Complete and utter failure, a 10 year step back in PC gaming -Liksecken (GameSpot)

Holy bad PR, Batman!

Wordpress: No Page comments

Tuesday, July 21st, 2009

It seems like the “Allow Comments” option on the “Add new page” screen does not work in wordpress.  Specifically, it does not work for the default theme Kubrick.

Allow comments option

Allow comments option

Seeing this option, it’s easy to assume this enables comments on your wordpress Pages, especially for the default theme. But unfortunately, this particular option in the admin page has no affect on the default Kubrick theme. To enable comments on your Page(s), you have to select a theme which includes them or modify your default Kubrick theme.

Default theme with page comments

To change your default theme, add the following line to /wp-content/themes/default/page.php

<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

get_header(); ?>

    <div id="content" class="narrowcolumn">

        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div class="post" id="post-<?php the_ID(); ?>">
        <h2><?php the_title(); ?></h2>
            <div class="entry">
                <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>

                <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

            </div>
        </div>
        <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>

    <?php comments_template(); ?>
    </div>

<?php get_footer(); ?>

Additional References

http://wordpress.org/support/topic/246879

http://wordpress.org/support/topic/196788