Showing posts with label compucrap. Show all posts
Showing posts with label compucrap. Show all posts

Tuesday, February 12, 2013

News: Smart Cats!



  • My cats do this to me, too, except they haven't figured out how to write a ransom note.


Thursday, February 7, 2013

Minecraft: Running a Server on FreeBSD

I'd previously posted about running Minecraft on FreeBSD, but that was a year ago, and I didn't give many details about the server. (I haven't even tried to run the client on FreeBSD in a long time, both because I just leave my desktop to the memory-hogging server process and because I haven't been playing recently.) So here's my server setup.

Note: I'm running a custom build of FreeBSD 9.0 (I haven't gotten around to upgrading to 9.1 yet). Mostly I just removed drivers for hardware I don't have. Also, I created a separate user account for running the server. As I don't run around as root most of the time, I set up sudo to allow my regular user login the ability to run commands as the minecraft user. (I called mine "mc".)

The Server JAR File: I just use the plain jar from minecraft.net.

The Java Port: There are a bunch of JVM ports in the FreeBSD Ports tree. I tried them all. The one that has provided the most stability is openjdk7.

CraftBukkit: I am running a Craftbukkit server with about 10 plugins.

Screen: GNU Screen is very, very helpful here. It will let you run on the console and be able to connect to the running session from a remote login to see what's going on, without interrupting the minecraft server process. (In the FreeBSD ports tree, it's sysutils/screen. RTFM if you've never used it before; it's a little complicated at first, but becomes second nature with use.)

I start the initial screen session as follows (I name the session "stuff" for the backup script, below): screen -S stuff. Then I name the first shell (window 0) by pressing Ctrl-a A (control+a keys together, release, then capital 'A') so it will prompt me to rename that window. I name it "mc", again for the backup script.

The Startup Script: (I named it run.sh, but it doesn't matter.)

#!/bin/sh
umask 0002
export JAVA_HOME=/usr/local/openjdk7
java -Xincgc -Xms1G -Xmx2816M -jar craftbukkit-1.4.7-R1.0.jar

Run it in the directory in which you have the server jar file and the craftbukkit jar file. Note that if you're not using craftbukkit, you can replace the java command line with the one on the minecraft.net download page. Note also you need to update the craftbukkit jar file name as you upgrade, or you could name them all craftbukkit.jar and leave the script alone. (The first method takes a little more effort, but makes it easier to see what you're running.)

If you're running the server as another user, execute as sudo -u $MINECRAFT_USER ./run.sh

The Backup Script: (I got the basics from somewhere that I've forgotten, and altered it to my needs.)

#!/bin/sh

export PATH=/bin:/usr/bin:/usr/local/bin

echo "Forcing save-all"
screen -x -p mc -X stuff `printf "save-off\r"`
sleep 5
screen -x -p mc -X stuff `printf "save-all\r"`
sleep 15
tar czvf /home/mc/backups/server.`date +%Y%m%d%H%M%S`.tgz /home/mc/server
screen -x -p mc -X stuff `printf "save-on\r"`
echo "Backup complete!"

You can then add a crontab to run it however often you want, but also make sure you add one to clean out old backup files, because they can eat up space fast. Make sure to change the directory names in the tar command, and make sure the target directory exists. Note that the screen ... 'printf ...' commands should actually get picked up by the server process. They pause disk writes so that you will get a clean backup.

Tuesday, January 29, 2013

News: IT Is Borked




  • GNU Info really has to die. Really. Actually, it already is dead, and Richard Stallman is the only person who doesn't realize it, but it's got a particular nasty ghost.

  • Objectivist C: a selfish programming language


  • I just hope they don't have any web servers...


Tuesday, January 8, 2013

News: Ethernet Vines in the Whiteboard Jungle



  • If the people in that office walk anything like the people in my business complex drive, they're going to need a stop sign... and a traffic camera... and a crossing guard...



  • These should be standard issue for network engineers....
  • ... especially if their network cabling looks like this:

Monday, September 24, 2012

News: Customer Disservice



  • Too bad that whack is backordered at the supplier.





  • When don't I feel this way?

Thursday, March 29, 2012

Whiteboard Jungle: The REAL IT Crowd

We decided that if pawn brokers and parking valets can get their own reality shows, we should get one, too.

Shot 1: RL stares at screen and pounds on keyboard.
Shot 2: Coffee break.
Shot 3: I start cursing at the screen. "What the *bleep*!? You *bleep*ing piece of *bleep*! What were those *bleep*ing monkey *bleep*ers thinking?"
Shot 4: RL stares at screen and pounds on keyboard.
Shot 5: KK mocks my knitting, again. I silently plot revenge.
Shot 6: Coffee break.
Shot 7: Minecraft discussion on IRC.
Shot 8: JP calls someone a moron.
Shot 9: Me again. "*bleep* *bleep* *bleep*ity *bleep* *bleeeeeeeeeep*"
Shot 10: Meeting. Everyone's playing with their smartphone, except me, because I'm knitting.
Shot 11: Closing credits over RL staring at screen and pounding on keyboard.

Wednesday, February 22, 2012

News: Apple Mush

SteveZ is probably running out of stuff to read at work, so I'm posting another news round-up. Unfortunately for him, most of the saved stuff I have is bashing Apple, but there you go.

Almost apropos lolcat:
funny pictures - choose carefully. which of these laptops do you prefer?
see more Lolcats and funny pictures, and check out our Socially Awkward Penguin lolz!

Lastly, I swear I didn't write this, but I could have, if I knew WTF limewire was.
funny facebook fails - Failbook: Mac vs PC
see more epicfails

Tuesday, February 7, 2012

Whiteboard Jungle: Shit My Coworkers Say

The guy a few cubicle rows over, who sounds like (and probably is) middle management, on a conference call from his desk: "You'll have to learn JavaScript, which is like an in-browser version of Java."

So wrong for so many reasons.

Tuesday, January 17, 2012

Minecraft: FreeBSD

I've been running a Minecraft SMP server on FreeBSD for the better part of a year now, initially on FreeBSD 8.2 and, for the past several weeks, on a custom build of FreeBSD 9-RC3 (named 9-FUZZYKERNEL), with only two process crashes. Getting the Minecraft client to run consistently on FreeBSD can be another story, though.

Now, Java on FreeBSD is a wonky thing. It was never officially supported by Sun and/or Oracle. There are two native ports, but neither works 100% of the time, and the official Linux JDK/JRE can be run in compat mode, but it's also problematic. Now, I seem to recall that when I started playing well over a year ago, I could play on my old FreeBSD 8.x desktop, even though it was graphically unpleasant, but I could be wrong. The client now won't work with either the diablo-jdk1.6, diablo-jre1.6, or jdk1.6 Java ports. The launcher will start, but after logging in, the window shows the error "Failed to launch / Fatal error occurred (2): null" and nothing further happens. (Someone running PC-BSD 9 has the same issue, so it's not just me and not just vanilla FreeBSD.) I don't know enough about Java to know if that's a bug on the FreeBSD JDK1.6 end or on the Minecraft end, but either way, there's no game-playing joy.

Now, I don't really care, since I mostly play Minecraft on my linux craptop, but that academic curiosity kicked in. There's still the Linux JDK, which is a bigger pain in the ass to set up, but I finally got around to it, and it seems to work.1

How to Run the Minecraft Client on FreeBSD

(This should also work on PC-BSD 9, although (a) I haven't tested it, but (b) you will need to take additional steps to set up the traditional FreeBSD ports tree.)

  1. Install the following ports. (Make sure you /usr/ports tree is up to date! You've run cvsup with a good ports config, right!?2) I'm hardcore and eschew installing the pre-compiled packages in general, but since Sun's Java has specific licensing terms, you can't install it as a package anyway, so just bite the bullet, set up the ports tree, and have at it.
    • linux_base-f10
    • linux-f10-dri -- May be optional in some environments, I'm not sure, but install it if you get libGL not found errors
    • linux-sun-jdk1.6.0
  2. Make sure the linux kernel module is loaded. As root: "kldload linux"
  3. Make sure the linux proc filesystem is mounted. As root: "mount -t linprocfs linprocfs /compat/linux/proc"
  4. Since you need to set up a couple environmental variables that you won't normally want set, I suggest making a dinky startup script:
    $ cat runmc
    #!/bin/sh
    export JAVA_HOME=/usr/local/linux-sun-jdk1.6.0
    export LD_LIBRARY_PATH=/compat/linux/lib:/compat/linux/usr/lib:/usr/local/linux-sun-jdk1.6.0/jre/lib/i386
    java -cp minecraft.jar net.minecraft.LauncherFrame
  5. Get the Linux minecraft client jar file from minecraft.net and then have at it.
P.S. The game does seem to crash whenever I quit (at least the timing is convenient), but it freezes instead of dying. It likes to leave around a lot of java processes, too, so you may want to check and kill them as necessary.


1When I tried to run the client on my FreeBSD 9 desk top, which I had logged into over ssh with X11 forwarding on from my linux laptop, the client started, but after I logged in (the point where it starts the game launcher), I'd get the error "org.lwjgl.LWJGLException: Could not choose GLX13 config" However, if I try to play Minecraft on the FreeBSD box's local display, it works, and since I can also run Minecraft locally on the linux craptop, I assume it's some issue with X11 forwarding. Since I don't plan on playing remotely normally, it's not an issue for me.
2This is the ports-supfile I use, sans comments:
*default host=cvsup6.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress
ports-all

News: January 18 Will Be National We R St00p1d Day

Don't ask me any questions outside of my normal expertise tomorrow, because Wikipedia is going to black out its English-language sites to protest the SOPA/PIPA bills working their way through Congress right now.



SOPA and PIPA (one is going through the House and the other through the Senate; if each passed their house they would have to be reconciled and then signed by President Obama, who has said he would not veto, to become law) would, according to pretty much all of the major Internet technology experts, break the Internet as we know it, requiring Internet service providers to blacklist websites accused (not legally convicted) of copyright infringement, and it could easily be abused beyond its prima facie purpose of restricting copyright infringement. The laws are technologically, constitutionally, commercially, and fundamentally dangerous and flawed, and could break the Internet not just philosophically, but technically.

Look, I respect copyright holders' rights. However, the main bill sponsors are the big media companies who still haven't figured out a way to deliver the content consumers want and, in the vast majority of cases, are willing to pay for if it could be delivered in a technically user-friendly, reliable, and affordable way. And the movie studios and music companies haven't figured out how to do that. These companies are literally acting like Luddites; trying to smash the technology they can't control, which they blame (in this case, wrongly) for lost revenues, by trying to stifle innovation since they can't find a business model that keeps up.

Plus, to me, the proposed government-maintained blacklist smacks of hypocrisy. We've seen revolutions in places like Egypt where the government responded by trying to block the Internet, and where our government said, and I'm quoting Secretary of State Hillary Clinton here, "For the United States, the choice is clear. On the spectrum of internet freedom, we place ourselves on the side of openness." It becomes much more difficult to condemn the Great Firewall of China when our own country starts altering basic Internet addressing and routing to block sites.

Now is a good time for Americans who are concerned about protecting the innovation and freedom of the Internet as we know it to let your elected officials know that you are concerned about SOPA and PIPA. An easy way to do so is by using the Electronic Frontier Foundation's Action Center.

I will now get off my non-partisan political soapbox and return this blog to its regularly-scheduled barrage of lolcats and bad knitting puns.

Wednesday, December 14, 2011

News: Geeky Kittehs

Wednesday, October 19, 2011

News: Compucrap... with Cats!



funny pictures - pleez to git yur own  heetid riclinur
see more Lolcats and funny pictures, and check out our Socially Awkward Penguin lolz!

Spoon can't even fit on a 17" MacBook anymore, but he was trying pretty hard yesterday:
WFH

Friday, July 15, 2011

You Know You're a Total Geek When...

... you see "Protect IP" and wonder who the hell is trying to mess with the Internet Protocol? (My first guess is always Microsoft. They generally have some proprietary standard they want to foist on us.)

Monday, May 2, 2011

Knittin' Crap: Spoon Invades Photo, Gets Forked, News at 11

The Camera Hog struck again, but this time he got a little freaked out by my latest FO:

Spoon gets a Fork in the eye

That's Beastie, the FreeBSD daemon.

Beastie

Wednesday, January 12, 2011

News: Geekfest '11

All those embarrassingly nerdy bits I'd been saving:

  • The first rule of Nerd Club!


  • Well That Ruins My Weekend Plans
    see more funny videos
  • I love this mainly for the gratuitous Star Trek: The Slow Motion Picture reference, I am ashamed to admit...
  • Bruce Campbell, who apparently has some kind of mail-order ordination, presided at a real-live undead zombie wedding ceremony.

    Funny Wedding Photos - Bruce Campbell Officiates Zombie Wedding!
    see more Wedinator

  • job fails - Explaining Things To Coworkers
    see more Monday Through Friday

    You are now qualified to be a storage engineer.


  • This comic suddenly made me realize what really made Star Wars unrealistic: you expect me to believe that in a galaxy where they have weird species and thousands of languages and lots of weird ship designs, the standards for digital media were completely consistent across all platforms? Seriously? I can't even get a damn Windows box to NFS-mount a filesystem from my FreeBSD desktop (running on the same basic chipset) without resorting to voodoo.

I wish I had dreams like that. Instead, I dream about executing CMRs. The only difference between being asleep and awake is I don't get paid to sleep.

Plus the lolcat you were all waiting for: funny pictures - Did you just hear a loud crash in the kitchen? Because I didn't. KTHXBAI see more Lolcats and funny pictures

Friday, June 18, 2010

News: Yup, Still Backlogged

Let's start out with the most cutiest things EVER: video from the world's only sloth orphanage, located in Costa Rica.

Meet the sloths from Amphibian Avenger on Vimeo.



Geeky:
  • Sony is introducing a gadget that tweets your cat's activities. Pay particular attention to the photo captions. (I'm sure a lot of cats might actually get confused. "I thought the human said I was going to get to eat Tweetie bird!")
  • IOGraph, a free, multi-OS program, tracks your mouse movements and allows you to save the image. Here's a day at work with me. The giant blob is when I left for lunch... looks like a bombing run map, doesn't it? Yeah, that'd be about right.
    IOGraphica - 5.7 hours (from 10-51 to 16-43)
  • Amigurumi spaceman angst. Check out the Underwater explorer angst link on that page, too.


funny pictures of cats with captions
see more Lolcats and funny pictures


Facepalm:
Well, let's leave that one on some double lolcat relief...
funny pictures of cats with captions
see more Lolcats and funny pictures

funny pictures of cats with captions
see more Lolcats and funny pictures


(You might also want to go back and watch the sloth video at the top of the post again. Soooo cute!)

Labels!