How to set up a Tremulous server on Ubuntu Linux

I did this on Feisty, but it should work for other versions:

1. Download the .run file from sourceforge:

sudo wget http://prdownloads.sourceforge.net/tremulous/tremulous-q3-1.0.2-installer.x86.run?download


2. Run the install:

sudo sh ./tremulous-1.1.0-installer.x86.run

Take all the defaults, except also install the dedicated server option. I installed to /usr/local/games/tremulous.


3. Modify the server name in the config file:

cd /usr/local/games/tremulous
sudo vi base/server.cfg


4. Copy the patched version of tremded from tjw's site (contains important admin improvements). Assuming that you are still in /usr/local/games/tremulous, type:

sudo wget http://tjw.org/tremulous/linux/tremded.x86
chmod 755 tremded.x86


5. Copy the game.qvm file from tjw's site:

sudo wget -O ~/.tremulous/base/vm/game.qvm http://tjw.org/tremulous/game.qvm

NOTE: The instructions for these two steps can be found at tjw's site here:

NOTE: The qvm file (Quake Virtual Machine) and tremded files must match or the server will not run!


6. Run the server in test mode with:

sudo ./tremded.x86 +set dedicated 1 +exec server.cfg

NOTE: "dedicated 1" does not send a heartbeat to the master server.
You will see the game console. Type "status" to ensure the game is running.

Use the 'dedicated 2' option if you want your server to appear in the master server list. Otherwise the server will only appear in your local network list what you run the client.

To make a public server, make sure to assign a static IP address to your server, and set up your router to forward port 30720 traffic to that address.

See this discussion for the details.

8. Get a list of console commands with:

cmdlist

For example, change the map by issuing the command: map ; example: map atcs


9. To shutdown the game, type:

killserver

10. To exit the game console, type:

quit

GMail hack: How to identify messages without an attachment

I send email to my own GMail account all the time, both to back up files, and as a to-do list of things I need to take care of later. As a general rule, if the message has an attachment, I'm probably trying to back up a file. If there is no attachment, the message should go to my to do list for later action.

I wanted to set up a filter to be able to distinguish between the two types of messages. The filter should apply a label based on whether or not the message has an attachment. For messages with an attachment, the filter should apply a "backup" label, and for those without an attachment, it should apply a "to do" label.

It turns out that GMail search cannot find just messages that do not have an attachment. It does a good job at finding messages with attachments, but otherwise returns a mixed set of messages with and without attachments. For example, negating the "has" operator with "-has:attachment", does not return the expected result.

The solution is to apply a label to messages having an attachment, then search and filter with the "-label" operator. Here's how:

STEP 1: LABEL MESSAGES THAT HAVE ATTACHMENTS

Search for messages having an attachment by using the "has:attachment" operator, then apply the "backup" label to the result set.
You can also create a filter for messages having an attachment, then apply the "backup" label in the next step.

STEP 2: SEARCH FOR MESSAGES WITHOUT THE LABEL

Now you can search for messages without attachments by using the "-label:hasAttachment" operator. GMail will return only the messages that do not have an attachment.

MAKING IT AUTOMATIC.

You can set up a filter to apply the the "backup" label automatically. Enter (from:me to:me has:attachment) as the filter criteria in the "Has the words" field. Then in the next step, apply the "backup" label.

All incoming messages having an attachment will receive the "backup" label, and you can now search your messages for your backed up files with "(from:me to:me label:backup)".

However, this only solves part of the problem. What if you want a filter to apply your "to do" label to messages that do not have attachments? In that case, you set up a second filter to with "(from:me to:me -label:backup)". Negating the label operator will give you only the messages without attachments.

Notice that it's important that the previous filter run first, so that the "backup" label is applied. Otherwise the "-label:backup" operator will not work.

MySQL server has gone away

Handling error 2006: MySQL server has gone away on a windows xampp installation.

Summary: xampp installation on Windows XP, error encountered by a PHP script while uploading large files to a mysql database server.

This is caused by a mysql max_allowed_packet setting, which by default is set to 1M.

You can confirm the setting by
  • checking the value in sql by issuing a show variables command, or
  • by checking the system variables in phpmyadmin.
To change the setting, you need to edit the my.cnf file in your c:\...\xampp\sql\bin directory and change the default value of 1M to something larger, for example 16M. NOTE: Change the directory path to its actual value.

You may see the file named simply as "my", and it may also look like a shortcut. In this case, you cannot click on the file icon to open it. Instead, go start --> run and issue the command: notepad.exe c:\...\xampp\mysql\bin\my.cnf. Again, change the directory path to its actual value.