Posts tagged with debian

making Asus eeePC work for Ubuntu LTSP

The Asus eeePC has become an extremely popular linux based laptop, and it works great with the preinstalled OS Xandros. It is, however, a desirable thin terminal in that its small, already has a monitor and is cheap. The smaller model's screen might be a bit too small, but one can always add an external monitor, keyboard and mouse and make it a full thin terminal. In order to do that, one must fix the atl2 kernel panic bug. The instructions that follow are not mine, I found them elsewhere on the net and adapted a little:

sudo chroot /opt/ltsp/i386
nano /etc/initramfs-tools/modules

add atl2 to the modules list.
Next update your initramfs with (where kernel-version is version number of your kernel [ie. 2.6.27-6-386):

update-initramfs -k kernel-version-number -c 
exit

This will update the kernel and create the initramfs that is in /boot/ under a name something like initrd.img-2.6.27-6-386. The file must now be copied from /opt/ltsp/i386/boot to /var/lib/tftpboot/ltsp/i386 after having renamed the existing one, for backup :

mv /var/lib/tftpboot/ltsp/i386/kernel-version-number /var/lib/tftpboot/ltsp/i386/kernel-version-number.bak
cp /opt/ltsp/i386/boot/kernel-version-number /var/lib/tftpboot/ltsp/i386/

You should now restart the asus eeePC and it should just work.

Rate It! (Average 0, 0 votes)



eggdrop IRC bot with logging to website

After playing around a bit with the php bot logging to mysql, I turned to a little more industrial solution, which involved installing an eggdrop bot and a script which lives inside the bot to convert its log files to html. This turned out to be the easiest solution, albeit a time consuming one. First it was necessary to install an eggdrop bot, which on Debian and Ubuntu can be done like so:

apt-get install eggdrop

This installs the eggdrop to its global area, and if like me you want to run it from a specific user's home you need to copy the configuration file (eggdrop.conf) to the home dir of your choice (example: /home/logbotuser/eggdrop.conf) You must thoroughly go through the configuration file, and uncomment various locations that stop you from executing the bot without reading through ALL the configuration options. The important stuff is at the top, like the botnick, the channel, etc, but there is also important stuff further down, like which irc servers to connect to and the like. When you are done, you should start the bot doing:

eggdrop -m eggdrop.conf

you use the -m option only the first time, as this tells it to create a new user list, after which you can msg the bot hello from irc, or telnet into it and type NEW as the username. The bot should now be happily running on the channel of your choice. One other thing you can do is setup a cron job that makes sure your bot is running always. Basically the crontab checks every 10 minutes to see that the bot is still active, if it isn't it relaunches it. To set it up, move the botchk script from /usr/share/eggdrop/scripts/ to your user directory:

mv /usr/share/eggdrop/scripts/botchk /home/user/eggdrop/

Then you need to edit the bothck script which has some self explanatory settings corresponding to what you already configured in eggdrop.conf, but something that is not mentioned is the need to replace the 3 entries that have the string ./ $botdir to:

/path/to/eggdrop/dir/ $botdir

In the example above that would be /home/username/eggdrop/ $botdir

You then need to do the final part which is add the crontab entry like so:

crontab -e

Here you add the following line:

0,10,20,30,40,50 * * * *   /path/to/botchk

Now you can now download the logs2html script from here.

To install it, unzip it and follow the readme instructions. One thing not mentioned is that the actual compiled module is in the precompiled/eggdrop 3/ directory.You need to move this to /usr/lib/eggdrop/modules/

Then you must edit the logs2html.conf script and the chan.list file. You must also re-edit the eggdrop.conf file and add a line in the end that contains:

source logs2html.conf

When you are done, you should be able to view your irc logs on a website as defined in chan.list. There is an example here: www.nubae.com/logs


Rate It! (Average 0, 0 votes)