2010-07-05 22:19

NetHack: one of the best games ever.

I find xnethack default tileset rather ugly. Under Debian/Ubuntu (nethack-x11 package), the tileset file must be in XPM format. It’s configuration is in the /etc/X11/app-defaults/NetHack file with the default xpm: /usr/share/pixmaps/nethack/x11tiles.

The file must be in XPM format, with a limited size and different color number, otherwise Nethack loading time explodes (several minutes).

Here is how to change it on Debian / Ubuntu:

  1. Example: on http://www.multifoliate.com/nh/, get the chozo32b.zip file (link: NetHack 3.4.2 (32×32) (modified by me)). Extract it to get chozo32b.bmp.
  2. Open it with Gimp, cut it to 1280×864 (to delete the black at the bottom). You can then convert it to 256 colors, then save it as XPM. It works but it’s ugly.
  3. To get a better result, save it to PNG.
  4. Install imagemagick package, then convert -depth 5 chozo32b.png chozo5.png
  5. Open chozo5.png with Gimp. Then save it to XPM format.
  6. Edit /etc/X11/app-defaults/NetHack and replace /usr/share/pixmaps/nethack/x11tiles with the path to chozo5.xpm.
  7. Then, reload X ressources: xrdb -merge /etc/X11/app-defaults/NetHack
  8. Start your favorite game: xnethack

The final gzipped file: chozo5.xpm.gz

Notes:

  • convert always saves xpms in 256 colors. I don’t know why.
  • head image.xpm gives you the first lines of the XPM file, with number of different colors.
  • Abigada tileset is by default in NetHack iPhone version.

Links:

2010-07-05 22:19 · Tags: , , ,
2010-06-20 23:48

This is how to open a SSH connexion to a serveur hidden behind a NAT gateway.

We use a reverse SSH tunnel:

nated-host$ ssh -R 2222:localhost:22 anyuser@public-host
anyuser@public-host$

This command opens 2222 port on public-host, forwarding it to local 22 port on nated-host.

Finally, from public-host we connect to 2222 local port with SSH, to end on nated-host:

public-host$ ssh -p2222 localhost
nated-host$

References:

2010-06-20 23:48 · Tags: ,
2010-06-20 23:12

A friend of mine has a PC with Windows XP / Ubuntu in dual boot. After the Lucid upgrade, Windox fails to boot (strange lines on the screen after Grub…).

TestDisk saved us:

sudo aptitude install testdisk
sudo testdisk
  1. Choose [ Create ] Create a new log file
  2. Choose windows physical disk, then [Proceed ]
  3. Choose [ Continue ] Continue even if there are hidden data
  4. Choose [Intel ] Intel/PC partition
  5. [ Advanced ] Filesystem Utils
  6. On Windows XP partition, boot sector is generally bad or non identical to backup sector (Sectors are not identical.).
  7. Choose [ Backup BS ] to copy the backup sector to the master sector.
  8. After that, quit, reboot and test.

Sources:

2010-06-20 23:12 · Tags: , , , ,
2010-06-03 13:48

With the last Ubuntu Lucid 10.04 come a new graphical module: KMS or Kernel-based Mode-Setting.

If you have performance problems in some games like Quake 3 or TCE / Enemy Territory, try to disable KMS.
The problem can also be with the mouse pointer (slowness, lag, delay or inacuracy).

Grub 2

Add nomodeset in /etc/default/grub then issue the command update-grub.

vi /etc/default/grub
GRUB_CMDLINE_LINUX="nomodeset"
update-grub

Grub 1

Add nomodeset at the end of the # kopt line, then issue command update-grub.

vi /boot/grub/menu.lst
# kopt=root=/dev/sda1 ro nomodeset
update-grub

Someone also told me that disabling KMS solved his Firefox javascript speed problem in Yahoo Mail.

2010-06-03 13:48 · Tags: , , , , ,
2010-05-24 23:52

The main idea is to have a set of anything@ads.mydomain.com addresses, all redirecting to a single mailbox. Then I can use any address @ads.mydomain.com as an alias to my primary mailbox.
This way, I give ebay@ads.mydomain.com to Ebay, amazon@ads.mydomain.com to Amazon and so on.

This solutions allows me to disable an alias if unsubscribing on the site doesn’t work. I can also use this to track sites selling my address to other sites.

First, Exim has to listen on the network, and accept mail to the ads.mydomain.com domain. Under Debian, put this in /etc/exim4/update-exim4.conf.conf:

dc_local_interfaces='0.0.0.0'
dc_relay_domains='ads.mydomain.com'

Note under Debian: each time Exim starts the /etc/exim4/exim4.conf.template file is filled with variables set in /etc/exim4/update-exim4.conf.conf, générating the /var/lib/exim4/config.autogenerated file. This is to ease Exim configuration in standard cases.

Then edit the /etc/exim4/exim4.conf.template file to add a new router, in first position just bellow begin routers:

catchall_pub:
  driver = redirect
  domains = ads.mydomain.com
  data = user@mydomain.com

The router will be called for any mail @ads.mydomain.com. It give all mails to the redirect transport sending them to the address set in data.

Finally, you can then use a /home/user/.forward file to disable aliases with a Sieve or Exim filter.

UPDATE 2010-11-10: another way of disabling aliases

References:

2010-05-24 23:52 · Tags: , , ,
2010-05-20 23:53

Audio CD copy is actually not possible with Brasero on Ubuntu Lucid. All details in the bug report.

As a workaround, you must install cdrdao version 1.2.3, which is not yet available as a package.

To install it, you can use CheckInstall which is a bit cleaner than the old make install:

tar -xjvf cdrdao-1.2.3.tar.bz2
cd cdrdao-1.2.3/
./configure
make
sudo checkinstall make install

Note: the make command can fail because of missing dev packages you’ll have to install.

CheckInstall builds and installs a nice Debian package.

You can also use cdrdao directly. ps axf shows us the command Brasero is using:

cdrdao read-cd --device /dev/sr0 --read-raw --datafile /home/dooblem/brasero.toc.bin -v 2 /home/dooblem/brasero.toc

Here we go!

Links :

2010-05-20 23:53 · Tags: , , , , , , ,
2010-05-20 23:34

It’s not possible to backup an audio CD as an iso image. This format is for data CDs.

You should use cdrdao.

Example:

cdrdao read-cd --read-raw --datafile FILE_NAME.bin --device /dev/cdrom --driver generic-mmc-raw FILE_NAME.toc

Under Ubuntu, you can use Brasero with “CD copy” mode. ps axf shows us the command Brasero is using:

cdrdao read-cd --device /dev/sr0 --read-raw --datafile /home/dooblem/brasero.toc.bin -v 2 /home/dooblem/brasero.toc

Note: there is a Brasero Bug in Ubuntu Lucid with cdrdao.

Links:

2010-05-20 23:34 · Tags: , , , ,
2010-05-06 06:31

If you like beautiful images, you certainly knows Featured Pictures on Wikimedia Commons project.

Magnus created a small tool to see all the last selected features pictures : Catfood.

Catfood works for any Wikimedia Commons category.

The RSS feed:

http://toolserver.org/~magnus/catfood.php?category=Featured_pictures_on_Wikimedia_Commons

Links:

2010-05-06 06:31 · Tags: ,