Minecraft Server on Linux using Screen

Recently I wrote a guide on how to install a Minecraft Server on Linux, check it out if you havn’t got your own Minecraft Server yet!

This post will teach you how to, in a very simple way, make your Minecraft Server run as a daemon in the background instead of consuming a terminal and making it hard to remotely control the server.

1. What you’ll need.
First off you need to set up a Minecraft Server, SSH, FTP and java environment. After that you’ll need to download and install GNU Screen. For me Screen was somehow already installed on Ubuntu, so I didn’t have to do that, but if you need to install it I think the code is “sudo apt-get install screen”. To check if you got screen installed, type “screen -v” (displays the version, if any).

2. What is Screen?
GNU Screen is a utility that lets you run “multiple terminal windows” (excuse my very bad tech jargon here) inside a single terminal. You can see it as being able to switch through multiple full-screen applications on your desktop.

“screen” will start the software and create a virtual terminal. CTRL+A C will create a new window, CTRL+A K will kill a window and CTRL+A D will detatch the window (essentially leaving screen). To enter screen you type “screen -r”. In case you got more than one screen session you’ll get a list with the ID and name of the session, and “screen -r ID” or “screen -r NAME” will enter that session.

3. How to use Minecraft and Screen.
The easiest way to run a Minecraft Server within Screen would be to run Screen and then start the server as usual, but we can do all of this using one line of code: “screen -dmS minecraft java -Xms1024M -Xmx1024M -jar minecraft_server.jar nogui”. This will start screen in the background and name the session minecraft and then run the command. If you need superuser you can put “sudo” just before “java”.

4. Creating a script to launch the server.
Everyone who use Linux is (or should be) lazy. You see, in Windows you have to do things yourself, but in Linux you have the ability to easily automate tasks. Open up nano and type the command you use to start your server (“screen -dmS minecraft java -Xms1024M -Xmx1024M -jar minecraft_server.jar nogui”), and save the file as “minecraft.sh”. When you want to start the minecraft server you only have to type “sh minecraft.sh”. Of cource you could spend more time and make it start on boot as well, but we’ll leave it here for now.

Blizzard store exploit?

Edit: This is an old post, and I won’t tell you how to do it. The bug is fixed as far as I know, and the people who exploited it had to pay for their games.

It seems like you can get free games from Blizzard by exploiting a bug in their payment system. This means that you can purchase and download any game in the Blizzard store without having to pay.

Besides obviously being illegal, Blizzard has the ability to null the purchase or ban your account. I’ve read a forum post saying you might have to pay for the “free” games before you can access your account again.

I won’t go into detail on how it works. Suffice to say the exploit has something to do with a bug in the Automatisch ingrosso bank payment option.

I wonder – will thinks like this happen more often? It’s not hardcore hacking, scripting or injection – it’s just an ordinary bug in Blizzard’s store. Or perhaps companies might start to do debugging before they release something.

Rökstopp – Dag 4-18+

Jag har skrivit om den första, andra och tredje dagen efter att ha fimpat ciggen och återvänt till de levandes domän – men hur gick det sen?

Bazinga. Rökare är lika levande som andra människor, och att jag pratar strunt hjälper inte ett dugg mot ”suget”. Om det är ett sug jag har, det vet jag inte, men det går inte en timme utan att jag vill ta en cigg. Känslan kan jämföras med en liten irriterande unge i bilens baksäte som ideligen frågar ”är vi framme snart?”. Nej, vi är inte framme i rökhosteland. Continue reading

HL2 Beta

HL2 Beta

Want to see some screenshots? Click here!

Yesterday I came across a leaked version of Half-Life 2 (called anon-hl2), and since I’m a real Half-Life freak I couldn’t resist trying it. There are a few mods using these files, so legally it shouldn’t be a problem downloading and playing the beta.

Before Valve released Half-life 2 they got hacked via a security hole in Microsoft Outlook and a working copy of HL2 got downloaded. It’s often referred to as the “Russian” version or beta, since it was on occasion sold on disks over there.

I don’t know how it works for other players, but on Windows 7 x64 it crashes instantly. The solution is to run it in compatibility mode with WinXP SP3, but even then it crashes sometimes. Although it only crashes on mapchange/mapload for me, it might work perfectly on other systems.

Enough about the bugs.. more about the content. What is the beta like, you might ask – well.. it’s an early draft. For example; after getting the car and changing level, you will find a house that you can only enter via the basement. In HL2 it’s destroyed internally, but in HL2 Beta it’s intact. There are hundreds of changes in map design, as well as models and textures. The most interesting part is, however, the left-out weaponry and conversations.

Example, normally (at Eli’s lab) Alyx states that Mossman talks about how she should’ve been in the test chamber that day. In Half-Life 2 Beta Eli tells you that it could have been Mossman. Some lines, i.e. “She’s the reason to why I spend so much time outside” are preserved in the official release, but re-used in a different context.

I don’t know what Valve’s take on this is, but as previously mentioned there are mods using the files and I’ve read that it’s okay to download and use as long as you’re not pushing the limits. Gary’s Mod is using some files from the beta (Phygun, mainly).

A few site modifications

This night I made a few site-wide modifications, not that it’s super-important, but I want to share them with you all.

Fist I used .htaccess to rewrite incoming links with http://www to http://, in order to get one set of content. As far as I can understand, crawlers/bots see http://www.example.com and http://example.com as two different sites. One problem I have with my current solution is the rewrite stops if Apache can find another .htaccess further down the path. In other words, my mod_rewrite in /folder1 doesn’t work in /folder1/folde2 if there is a .htaccess in folder2. I solved this by creating a similar rule to remove the WWW in those folders that I have .htaccess in.

I also have static links for my archive and my up-and-coming gallery (source will be released later on, as promised), but I think I’ve mentioned that before.

I’m sorry if my tinkering caused any problems (like a wrong redirect or a loop) during the implementation, but it’s done now, and won’t cause any more instability.

Var hittar man rätt onlinecasino?

Jag har inget problem att spela om pengar, men ibland kan det vara svårt att dra ihop vänner och ha en riktig spelkväll. Ett alternativ är att sticka till ett fysiskt casino, men det handlar väl mer om att vara där än vad det handlar om att verkligen spela. Nej, vill man få det mesta av sina pengar (och gärna vinna lite mer) så är det onlinecasino som gäller.

Men vilket casino ska man välja? Visserligen kan man vara medlem på mer än ett casino, men det blir ju lite jobbigt att hålla reda på var man har sina pengar. Utöver det så vill man ju gärna kunna lita på de som driver det så att allt går rätt till. Det är just det här som Svenskkasinoguide hjälper dig med.

De har gjort en lista med alla möjliga casinon och vad de har för spel att erbjuda. Förutom det så har de en hel drös med guider för hur de olika spelen fungerar, till exempel hur man spelar roulette eller black jack. Det är väldigt bekvämt att ha en sida som har samlat all information om hur saker och ting fungerar, och var man hittar de bästa casinona.

En annan smart grej är att de har information om hur skattefria vinster fungerar. Tilltalar det en inte så kan man ju alltid hoppa in och testa på deras gratisvarianter så man kan få en känsla för hur spelen är.

5 reasons why to host – and not to host – your own web site

Harddrives (2x500Gb) in my old PC.The Internet is huge, and as a result more and more people are getting their own domains and places on the web. One question to ask before subscribing to a hosting plan is: should I host this site myself?

In this post I’ll give you five pros and five cons why to – and not to – host your own web site.

Continue reading

Behind the scenes of this site

Last update was almost a week ago, so it’s time to brief the internets about what I’ve been up to.

First of all I’ve done some minor changes to the front page, like a new header. The old header was made by a friend of mine (cheers Daniel!), so it kinda hurt to change it. I felt like the new one matched where I was going better, though.

Except from that the Archive now got new colors (or none at all ;D), in order to match the main page. I also improved the inner workings and how content is loaded. Later on I’m going to configure static links for the archive, get some SEO going.

Welcome to the brand-new contacts page! It uses a new image for every day of the week in order to mess around with spammers, not that I think they read emails off images though.

However this week’s biggest project has been the Gallery. Last week I messed around with pictures of my friends in Photoshop, and it almost took longer to get the images online than it took to create them. My solution was to write a PHP-gallery that would load a series of images and their captions.

I’m going to release the source code for the image gallery later on, together with my sample album called “Italy” – which surprisingly is a set of images taken in Italy back in 2009 by me. Anyhow, for now it’s a generic site with no personal modifications or copyright notices. Expect integration in my site later on, and stay tuned for the source if you’d like to use it yourself.

Next feature I’d like to implement would be to dynamically change the copyright notices on each page load. Or perhaps use the <blink>-tag.. hmm

Cheers!