Debian Squeeze – .xinitrc .xsession and .xprofile (X startup script)

Comments Off

Annoyed that tapping my trackpad was no longer being recognised as a mouse click after an upgrade to Debian Squeeze, I sought to have “synclient TapButton1=1″ executed after login.

It would appear that both ~/.xinitrc and ~/.xsession are not used. Placing the above command in the file ~/.xprofile resolved the issue and I am now happily tapping my trackpad.
(tested when using GDM for logging in and Enlightenment for the Window Manager)

fsck on encrypted (AES-256) Linux (ext3) partitions

Comments Off

As AES-256 partitions using either a block file device or a physical partition cannot be mounted automatically at boot, they will not be automatically checked.

To manually run a fsck:

  • Unmount the partition
  • Setup loop device: losetup -e aes-256 /dev/loop0 /dev/sdaX
    (use loop1, loop2 etc if the others are being used)
  • Enter encryption password

The losetup will not give an error if the password was incorrect. Therefore a test is needed to confirm that the password was entered correctly – mount then umount the loop device:

  • mkdir /tmp/test
  • mount /dev/loop0 /tmp/test
  • ls /tmp/test
  • umount /dev/loop0

If the device could not be mounted, run: losetup -d /dev/loop0 and try again.

Execute the fsck:
fsck.ext3 -f /dev/loop0

After running the fsck, delete the loop device: losetup -d /dev/loop0 and mount the partition like usual.

Kernel Build – Traditional output

Comments Off

Linux 2.6 looks nice and clean when it compiles, however sometimes it is useful to see what is actually happening. This is as simple as running:

make V=1

and there will be plenty of build debugging output.

VMWare 7.1 – no /dev/vmnet0

Comments Off

A frustrating error with VMWare:
“Ethernet0: can’t open vmnet device /dev/vmnet0″

Solution is to run ‘vmware-netcfg’ and save, then the problem is fixed until next reboot.

View ‘dd’ progress

Comments Off

When reading/writing a disk image using Linux tool ‘dd’ launch as follows:
dd if=/dev/sdb of=filename.img & pid=$!
this will run ‘dd’ in the background.

To see the progress:
kill -USR1 $pid

Notes:

  1. If you are doing it as a non-root user you’ll need to prefix those commands with sudo
  2. If you do that do ‘sudo ls’ first, otherwise the ‘sudo dd’ will fail waiting on the password which it’ll never get as its backgrounded.

Thanks to Cian.

Older Entries Newer Entries