Smokes your problems, coughs fresh air.

Category: Technology (Page 29 of 47)

Creating an Unreal Tournament 99 server in Linux

(Post edited to reflect the steps required for the 451 version of the server, which has some crucial bug fixes, among which a working webadmin.)

I created an Unreal Tournament 99 server using this page as a guide (I may update that page myself soon, to help out others). However, I had to do a lot more, so here is the info:

First get and unpack the UT server, the 451 patch and the server utility script:

wget http://ut-files.com/Entire_Server_Download/ut-server-436.tar.gz
tar -zxf ut-server-436.tar.gz ut-server
wget http://www.ut-files.com/Patches/UTPGPatch451LINUX.tar.tar # May be changed to .tar.bz2 by the admins soon
tar xfj UTPGPatch451LINUX.tar.tar
wget http://ut-files.com/Entire_Server_Download/server_scripts/asu-0.6.tar.gz
tar -zxf asu-0.6.tar.gz
chmod +x asu.sh System
ln -s libSDL-1.1.so.0 libSDL-1.2.so.0

Because of some error (as described), map names with ][ in them, like DM-Deck16][, are 0 bytes. So, you have to copy them from some other UT installation. 2399Skillz on the forums said he’ll fix it, so it might be fixed at some point.

Next, you can run the asu.sh script. Choose option “I”, to install. Most important thing is to choose the username it will run under (not nobody as it suggests). The rest is obvious.

The script will have made an ucc.init file. Important to know is, that the path of the server is set in it. So, if you want to move the server to another dir, you have to change that file. The path name is mentioned several times.

Next you want to enable the webadmin. You can do that by opening UnrealTournament.ini, going to the [UWeb.WebServer] section and setting bEnabled=True and choose a port (5080 is standard):

[UWeb.WebServer]
Applications[0]=UTServerAdmin.UTServerAdmin
ApplicationPaths[0]=/ServerAdmin
Applications[1]=UTServerAdmin.UTImageServer
ApplicationPaths[1]=/images
DefaultApplication=0
bEnabled=True
ListenPort=5080 

When going to the webadmin, be sure to include /ServerAdmin/ in your address bar, because otherwise it will try to redirect you to that, using a HTTP redirect, but that will fail because the server has no idea you’re using an internet hostname and therefore it will redirect you to it’s LAN-IP, which obviously won’t work if the server is not in your LAN. Apache has config parameters to set the redirect hostname, but this webadmin doesn’t.

As a security precaution, patch 451 adds brute force protection to the admin login. See the file Releasenotes.htm in the Help dir for more info. In the Engine.Gameinfo section, a few rules should be added/modified (depending on whether they’re already there or not):

[Engine.GameInfo]
(snip)
...
LoginDelaySeconds=1.000000
MaxLoginAttempts=50
ActionToTake=DO_KickBanPlayer

The server (at moment of writing) has special net-textures, to reduce the size of the installation. Problems my occur when clients are using the high-res textures (see aforementioned topic). To solve this, copy the normal CD1 textures to the server dir.

I was under the impression that the asu stuff would take care of setting the environment properly so the files can be found, but when trying to start the server, it complained about not being able to find it’s data directory. It started doing that after applying the 451 patch, so that might be the cause. To fix it, I added this line below MYUSER=User.ini in ucc.init:

UT_DATA_PATH="$MYDIR/System/"

However, it might not be necessary when you apply the patch before you extract the asu scripts. I applied the patch after, so that may have been the difference. Try without this modification first.

You can start the server by “./ucc.init start”. Or stop by “./ucc.init stop”. Or restart by “./ucc.init restart”.

Default e-mail addresses for domains

Sometimes automated services or people need to contact some domain administrator for a certain domain. There are a couple of addresses that should be present by default. Google uses these addresses to notify you when they put you on their malware blocklist:

  1. abuse@
  2. admin@
  3. administrator@
  4. contact@
  5. info@
  6. postmaster@
  7. support@
  8. webmaster@

I think I need these for my domains to be present by default:

  1. abuse@
  2. postmaster@
  3. hostmaster@
  4. webmaster@
  5. root@

Learning PC assembly language

Over the years, I’ve made a few half-hearted stabs at learning assembly language. In doing so I’ve discovered this great PC Assembly Language textbook by Paul Carter. Last October, Halfgaar and me took this free book as a starting point to rediscover the joy of programming.

Bareboot with ugly colors

Bareboot with ugly colors

Today, I’m getting reacquainted with what we did last fall. I’m also looking at some stuff that Halfgaar added without me. After fetching and merging his latest changes, I’m now greeted by the image of a nude person of the female persuasion with a somewhat psychedelic color palette.

The first goal of our assembly learning project was to have a bootable beauty, a simple disk-image of sorts which we can boot with Bochs or another emulator to display an image of a girl. Halfgaar has the lead because he crafted an 8-bit BMP image (with what he thought to be a proper color index), and he modified our code to traverse and display the image pixel by pixel.

Now I want to find out why the color palette of the image doesn’t quite match the BIOS’ palette, but, while I know the latter must be somewhere on Wikipedia, I’m having trouble finding it again… I can’t even find the nicely organized list of all the BIOS interrupts and arguments which we used to learn how to draw colored pixels. I’m left wishing that I wrote this post while I still knew where to find all this information.

Can you save me some googling, Halfgaar?

Very, very old homepage

Today, in the images-that-I-stumble-upon-somewhere category: an image of a very old homepage that I hosted at my ISP back in the day:

Old bigsmoke @Home homepage

I’m not even entirely sure if I was already pulling this stuff together with XSLT. Probably I was, because I vaguely remember that this was one of the alternate CSS styles and I can’t imagine myself adding more than one <link> tag to every source file. 😉 (Unlike a sense of esthetics, laziness is deeply ingrained in every somewhat decent programmer.)

Blog competition

Wiebe’s posting of the two-hundred-and-first post, made me think of this image of the front page I made a short while after the new design went life. The image clearly shows that we have a little competition thing going on in that we both seem to be pretty determined to have our face dominate the home-page. 😛

Preventing syntax errors with old shell scripts

I was trying to install Unreal Tournament GOTY on one of my Linux machines. I downloaded and ran the script ut-install-436-GOTY.run but I got this error:

cannot open `+6' for reading: No such file or directory 

This line caused it:

sum1=`tail +6 $0 | cksum | sed -e 's/ /Z/' -e 's/   /Z/' | cut -dZ -f1`

To fix it, I set this environment variable:

export _POSIX2_VERSION=199209

Apparently, this makes programs behave differently. Research is required to find out exactly what it does…

WordPress pretty pagination plugin

During the recent redesign of my blog, I decided that I wanted to have pretty pagination with numbers instead of the WordPress default Older/Newer Posts links. The plugin I decided to use was WP Page Numbers by Jens Törnell.

This is how the pagination for page one of my home looks now:

WP Page Numbers on page 1

For page six you can see more of what the plugin can do:

WP Page Numbers on page 6

And finally…

WP Page Numbers on page 20

Do I have twenty pages of posts already?

Exemplary web design: Qt

Often, I come across websites that have a beautiful design or even just interesting design elements. Instead of continuing to spread these URLs all over my $HOME and my (del.icio.us) bookmarks, I thought I’d start adding them here. Today, I want to start with an entry from ~/jot/exemplary-web-design.txt: Qt

Qt homepage

Qt homepage

I’ve actually programmed in Qt a bit in a dark past. Even though I’m not too fond of it (or C++ in general), it’s a very decent toolkit as far as toolkits go. What’s really great, though, is their website (now at qt.nokia.com).

The website logo with integrated slogan is perfectly clear. At the top right, there’s a nice and clear Google Custom Search, below which there’s a language switcher and a cleverly placed contact link.

Then comes the horizontal navigation bar with the tabs. It clearly shows which section you’re in. The homepage has an icon instead of a text, which is a nice touch. Also, the Developer Zone tab has a distinct layout with a big icon. I like this; it makes it clear that Nokia (formerly Trolltech) appreciates its developers (insert Ballmer monkey dance here).

The content area starts with a clear h1 heading text and a one-sentence-introductory paragraph. Then, four of the sections are highlighted again, with a short summation below of what can be expected in that section.

Below that, is another visually distinct area which highlights the latest news-items, events and other recently featured items.

Testimonies by two high-profile projects are used to interrupt the flow of information at this point, before Qt in 2 minutes is presented. Qt in 2 minutes is clearly made to quickly help people who are new to Qt along to the right information. This takes up 7 headings and they use JavaScript to show only one subsection at the time, allowing you to switch subsection by clicking the headings in the menu at the left.

At the end of the content area, there’s a subtle reference to the KDE project and a list of the biggest-name customer logos.

The content area is closed by another horizontal navigation bar. This one has a link to the sitemap, an accessibility statement, and to the contact page again. At the right, it also contains a Nokia logo.

Then in almost invisible print (because it isn’t interesting), there’s the copyright statement and a link to the privacy policy.

jQuery plugin for auto-growing textareas

With my big blog redesign, I wanted a auto-growing comment box. In the past, I’ve written a nice auto-resize textarea JavaScript function which does just that, but with jQuery belonging to the standard equipment of WordPress these days, I thought it would be cooler to find a nice jQuery plugin to do this.

I added the Auto Growing Textareas plugin by Chrys Bader to my theme. In my header.php:

<?php wp_enqueue_script('jqueryautogrow', get_bloginfo('template_directory').'/jquery.autogrow.js', array('jquery'), '1.2.2') ?>
<script type="text/javascript">
$ = jQuery; /* FIXME: Ugly hack */
jQuery(document).ready(function(){
  jQuery('textarea[name=comment]').autogrow();
});
</script>

However, I noticed that the <textarea> shrunk beyond the original number of rows defined in the rows attribute. (My own function used this attribute as the minimum number of rows.)

While looking for documentation on Chrys Bader’s plugin, I noticed that all the links on the plugin page now redirect to crysbader.com. (Sometimes, I really hate these catch-all redirects! :-x) I also found the Auto Growing Textareas Update plugin by daaz, which is the same with a few updates because the former project has not been updated since January 12, 2008, and had some issues that needed to be resolved. Sounds like a good idea to install the update.

Back to the minimum height problem: the plugin’s source file proved a good source of documentation. I learned that it has a minHeight option. I didn’t manage to actually pass that option in JavaScript, though; doing the following didn’t work:

jQuery('textarea[name=comment]').autogrow({minHeight: 8});

Luckily, it defaults to the min-height defined in the element’s CSS, so I could add the following to my stylesheet to stop the auto-shrinkage madness:

#comments textarea
{
  min: 8em;
 : 8em;
}
« Older posts Newer posts »

© 2024 BigSmoke

Theme by Anders NorenUp ↑