2014-05-29 18:59

Here are the steps I used to upgrade the BIOS of my Lenovo Thinkpad X1 Carbon Gen 2.
You have to download the bootable ISO file from Lenovo support site, convert it and copy it to a usb flash drive.

You will need a USB key you can erase.

First Get the bootable ISO file from Lenovo support website. To get your product number:

sudo dmidecode -t system | grep Product

To check your BIOS version: sudo dmidecode -t bios

Get the geteltorito program from your packages or download it:

cd /tmp/
wget http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/geteltorito
chmod +x geteltorito

Extract the img from the ISO:

./geteltorito -o bios.img gruj09us.iso

Copy the img to the USB key (make sure sdb is you USB key!!):

sudo fdisk -l /dev/sdb #at least check that device size is right
sudo dd if=bios.img of=/dev/sdb

That’s it. Boot on USB stick and follow the instructions to update your BIOS.

2014-05-29 18:59 · Tags: , , , , ,
2010-11-30 21:11

I discovered Clementine some time ago.

There is not any package for Ubuntu or Debian, but the official site gives you a .deb for your favorite Ubuntu version.
And you’ll also find Mac OS X and Windows versions…

A small click on the good .deb file for your Ubuntu distro and it should install.

I tested tons of players (Amarok, Rythmbox, old XMMS, Exaile, Listen, Totem…).

Clementine is based on Amarok, it’s far simpler and integrates very well in Gnome desktop using Qt4 librairies.

I’m happy to know this software and I recommend it to you.

2010-11-30 21:11 · Tags: , , , ,
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: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-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-01-26 23:51

Under Ubuntu, or any distribution using Gnome, you can do almost anything without using the command line.

To configure some things, you still have to edit a configuration file. To configure your desktop, a lot of online documentation still requires you to to edit /etc config files.

To help non linux experts, you can try the nautilus-gksu package. It permits you to edit any file as administrator with a simple right-click on the file.

Personnaly, I prefer launching Nautilus as root, as it allows more than simple file edition power (permission change, deleting…).

I create a launcher for this task, a bit like the Administrator Terminal in Applications > System Tools:

  1. Right-click on the panel > Add to panel, Custom Application Launcher.
  2. Name: Nautilus superuser
  3. Command: gksu nautilus

Et voila.

2010-01-26 23:51 · Tags: , ,
2010-01-26 23:09

In some modern distributions like Ubuntu, there are preconfigured user directories like Desktop, Download, Documents, Images, Music, Vidéos.

ubuntu_user_dirs.png

You can remove some of the directories you don’t use, or rename some of them.

If you change their name, you can set their new place in your ~/.config/user-dirs.dirs file:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Bureau"
XDG_DOWNLOAD_DIR="$HOME/telech"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/public"
XDG_DOCUMENTS_DIR="$HOME/docs"
XDG_MUSIC_DIR="$HOME/zic"
XDG_PICTURES_DIR="$HOME/images"
XDG_VIDEOS_DIR="$HOME/cine"

Then restarting Nautilus should be sufficient. Otherwise restart your Gnome session.

References:

2010-01-26 23:09 · Tags: , ,