Author Archive

Extract video from MPEG

July 20, 2006

Extract video stream from a MPEG:

tcextract -i file.mpg -x mpeg2 > file.m1v

tcextract is part of ‘transcode‘ package.

Font problems in pdfs

July 20, 2006

for embedded font problems in pdf files (under Linux)
see *Download* options /var/lib/texmf/web2c/updmap.cfg
and /etc/texmf/updmap.d/00updmap.cfg
or the -Pdownload35 option to dvips
use dvipdfm instead of dvips

Unused dependencies in binaries

July 20, 2006

Unused libraries:
ldd -u -r BINARY

Speed up programs (GNOME)

July 20, 2006

Only link to needed libraries:
export CFLAGS = “-Os -s -Wl,–as-needed”

Change position of titlebar buttons in Metacity

July 20, 2006

If you want to have that authentic aqua look then you’re going to want to change the position of the buttons in your window titlebars from the right (in the Windows style) to the left (in the Apple style). This is quite easy to do in Gnome, here is how.First of all you’ll need to run “gconf-editor“, this can be done either from a terminal or from the actions menu which you may have on your title bar (under run program).

Next, you’ll need to go to apps > metacity > general in the left hand panel in the gconf-editor. In here you will need to find “button_layout”.

Finally, change “menu:minimize,maximize,close” to “close,minimize,maximize:menu” by double clicking and changing the text in the window that appears.

You should now have your buttons on the left hand side of all of your windows, with a decent theme, this will give your windows an authentic aqua look.


Windows – SVN and SSH with PuTTY

July 20, 2006

How to use SVN and SSH with PuTTY:

  • you need: putty, plink, pagent, puttygen
  • generate a key using puttygen and add it to the server’s authorized_keys
  • run putty, create a session for the SVN server host, with the username set in Connection -> Auto-login username
  • run pagent, import the private key generated above
  • in “Documents and Settings/user/Application Data/
    , set:

ssh = $SVN_SSH plink

  • make sure plink is in PATH
  • use SVN normally

Mouse wheel in X11

July 20, 2006

First off I am running Fedora Core 1, and 2.6 kernel

I used imwheel version 1.0.0.pre1. imwheel

/etc/X11/XFConfig Input Device section


Section “InputDevice”

# Modified by mouseconfig
# Modified by mouseconfig

Identifier “Mouse0”
Driver “mouse”
#2.6 kernel, device changed…if u run 2.4 leave “Device as is”
Option “Device” “/dev/input/mice”
Option “Protocol” “ExplorerPS/2”
Option “Emulate3Buttons” “no”
#Option “ZAxisMapping” “4 5”
Option “ZAxisMapping” “6 7”
Option “Buttons” “7”

create a script to start when x does to map the mouse


xmodmap -e “pointer = 1 2 3 6 7 4 5”

~/imwheelrc file


None, Up, Alt_L|Left
None, Down, Alt_L|Right

None, Up, Alt_L|Control_L|S
None, Down, Alt_L|Control_L|T

None, Up, Alt_L|Left
None, Down, Alt_L|Right

# this should be last
None, Up, Alt_L|Control_L|P
None, Down, Alt_L|Control_L|O

run this…or put in a script for startup
/usr/local/bin/imwheel -k -b “67”

Nicer Xaw3d widgets

July 20, 2006


How to replace the ugly Xaw3d widget with Xaw95d globally: download and install xaw95 and xaw95d from and insert /usr/X11R6/lib/Xaw95 before /usr/X11R6/lib in /etc/ld.conf. Run ldconfig as root and you’re done. Try running xterm and look at the nice scrollbars…

emacs – rectangles

July 20, 2006

Working with rectangles in emacs:

When you must specify a rectangle for a command to work on, you do it by putting the mark at one corner and point at the opposite corner (C-SPACE).

C-x r k : Kill the text of the region-rectangle, saving its contents as the “last killed rectangle” (kill-rectangle).

C-x r d : Delete the text of the region-rectangle (delete-rectangle).

C-x r y : Yank the last killed rectangle with its upper left corner at point (yank-rectangle).

C-x r o : Insert blank space to fill the space of the region-rectangle (open-rectangle). This pushes the previous contents of the region-rectangle rightward.

M-x clear-rectangle : Clear the region-rectangle by replacing its contents with spaces.

M-x delete-whitespace-rectangle : Delete whitespace in each of the lines on the specified rectangle, starting from the left edge column of the rectangle.

C-x r t string RET : Replace rectangle contents with string on each line. (string-rectangle).

M-x string-insert-rectangle RET string RET : Insert string on each line of the rectangle.

Mounting a jffs2 image

July 20, 2006

How to mount a jffs2 image:

# insmod mtdcore
# insmod mtdram total_size=16384 erase_size=256 (16meg flash Ipaqs )
# insmod mtdram total_size=32768 erase_size=256 (32meg flash Ipaqs )
# insmod mtdblock
# insmod jffs2
# dd if=rt.jffs2 of=/dev/mtdblock/0 (copy the root image to the device )
# mount -t jffs2 /dev/mtdblock/0 /x

If you don’t automatically have the device nodes /dev/mtdblock/0, /dev/mtdblock/1, and /dev/mtdblock/2, create them as follows (as root):
# mkdir /dev/mtdblock
# cd /dev/mtdblock
# mknod 0 b 31 0
# mknod 1 b 31 1
# mknod 2 b 31 2