Converting caffeine to code, shooting pics, and cruising the roads of life.

Archive for the ‘Linux’ Category

Jayant lives again!

Monday, March 6th, 2006

I must say I’m proud of the progress with Jayant. It can now serve basic html pages and handle 404’s. Each connection is processed via a pthread as I said the in the previous post. I fixed two buffer overflows in it today as well.

Tomorrow I’m going to try to get a mime type system up. I want to the /etc/mime.types file if possible, this means I’m going to need a custom parser for it. I’m debating whether to write one, or go the easy route and find a public domain one. I guess it just depends on how much time school gives me.

As of today, Jayant also runs on two platforms with no modifications, FreeBSD and linux. So I can only assume it will run on any other unix. I’ll be trying BeOS within the next few days, as well as a native SkyOS compile.

cody@devnulled:/home/cody/jayant>./jhttpd
Server Port: 8181
Server Log Dir: /home/cody/jayant
Server Signature: JayantHTTP (FreeBSD) 1.0.0
Adding callback for fd 3
Realloc’ing fd_tasks
No callback for 1
No callback for 2
Listening on port 8181 fd 3

cody@laptop:~/jayant$ ./jhttpd
Server Port: 8181
Server Log Dir: /home/cody/jayant
Server Signature: JayantHTTP (Linux) 1.0.0
Adding callback for fd 3
Realloc’ing fd_tasks
No callback for 1
No callback for 2
Listening on port 8182 fd 3

Here is a little bite to chew on, the first page served by it:
jhttpd
Click for larger image

Debian GNU/kFreeBSD

Wednesday, February 15th, 2006

I have been extremely busy with school this week, but tonight I had about an hour to do something. So I decided to try out Debian GNU/kFreeBSD. This is a very interesting OS to me because of my love of both Debian and FreeBSD.

Many people ask about the name. It stands for GNU userland and kernel of FreeBSD. Not only does it come with glibc and the rest of the GNU userland, but it also has most of the Debian packages ported over for use with the apt-get port.

I highly recommend people try it that may want to use BSD as a server, but can’t leave their linux setup. They are extremely similar with this setup. Only problem I noticed was that you need to manually run dhclient and reboot on the first bootup to get it to setup your nic correctly. Other than that, I’ll be looking forward to getting a working gnome or KDE port on this system. :)

Apache Apache Apache…why aren’t you working working?

Tuesday, January 24th, 2006

I’ve just spent a good two to three hours of my time screwing with the Apache 2.0.54 Ubuntu Linux package, just to get mod_rewrite to work properly. So if you have an Error 500 when adding “RewriteEngine On” to your .htaccess, this is the fix for you.

  1. cd /etc/apache2
  2. sudo nano apache2.conf
  3. Add Options +FollowSymLinks
  4. sudo /etc/init.d/apache2 force-restart

and you should be up and running. Hope that assists you people out there. I know I spent too much time on that. :)

KVM Review

Friday, December 16th, 2005

Well, after a week of waiting, my KVM came. This is the model I bought. It features rack mounts, 8 ports, hot key switching, manual switching, keyboard/mouse/monitor reset without power down, and auto scan.

After spending an hour and a half rewiring my room to get one extra plug, I discovered I had an empty plug right next to where I wanted the KVM…so I ended up unrewiring. So now I had it installed and I was dying to test it out. So I hooked devnulled(this server) and sputneek(my athlon64 gaming box) to the kvm. The keyboard I used was a Logitech Cordless Desktop Express.

After powering on the KVM it auto scanned for connected computers and changed the light color for the port to green. Since I was testing it on sputneek first, I pressed the first button to put us on that computer. Now I’m going to pause and say a few things I found odd before I got to this point. When I was flipping through the instruction paper, it had warnings about how the device can cause some radio interference. I still to this day have no clue why, but it did. When gnome came up on the computer, my mouse would just go psycho when I would move it and my screen was a bit blurry.

To fix this wonderful problem was fairly simple. I booted ubuntu backup, and since my keyboard worked, switched to tty1 and ran a sudo dpkg-reconfigure -y xserver-xorg && sudo killall gdm && gdm && exit. That fixed it as it basically recreated my xorg.conf with the new hardware that it detected, as the mouse and keyboard identify as different devices from my Logitech ones. That also fixed the blurriness issues I had.

On devnulled, there was no problem at all. It worked beautifully.

Pictures:
kvm1

kvm2

kvm3

kvm back

test

Friday, December 9th, 2005
#include 

int main()
{
        printf("BBBBBBBB\n");
        return 0;
}