romka@linux

May 27, 2009

DVD decrypter

Filed under: Status — romka @ 7:26 pm

Not to forget to do:

cd ~/.wine/dosdevices
rm d:
ln -s /media/cdrom d:

Later versions of wine, like the one shipped in Dapper Drake (0.9.9) ignore settings in ~/.wine/config
You have to use the “winecfg” program to set windows version to NT 4.0 (thanks to Phil B. July 2006)

Change wine to Windows NT 4.0 version

May 22, 2009

WMA to MP3 convert Nautilus script

Filed under: Status — romka @ 8:48 am

Thanks to mtron from ubuntu forums:

#! /bin/sh
# wma to mp3 script by mtron
zenity --info \
--text="this script converts all wma files in the current folder
to mp3s and puts them in the folder output

all lame command line options can be set in the next step.

usage:
lame -m s: for stereo mp3 output
lame -m s V 3-4-5: for stereo mp3 output with VBR"

# Dialog box to choose output quality
FORMAT=`zenity --list --title="Choose mp3 output quality" --radiolist --column="Check" --column="Quality (editable)" --editable "" "lame -m s" "" "lame -m s -V 3" "" "lame -m s -V " "" "lame -m s -V 5"`

if [ $FORMAT -eq ""]; then
zenity --error --text="mp3 output quality not defined or no wma file found

usage:
lame -m s: for stereo mp3 output
lame -m s V 3-4-5: for stereo mp3 output with VBR

type: lame --longhelp
for all command line options "
exit 1
fi

mkdir -p output
cp *.wma output
cd output

# How many files to make the progress bar
PROGRESS=0
NUMBER_OF_FILES=`find -iname "*.wma"`
let "INCREMENT=100/$NUMBER_OF_FILES"

#remove spaces
(for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done

#remove uppercase
for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done

#Rip with Mplayer / encode with LAME
for i in *.wma ; do
echo "$PROGRESS";
echo "# Re-Coding $i";
mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader $i && $FORMAT audiodump.wav -o $i;
let "PROGRESS+=$INCREMENT"
done

#convert file names
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3";
done

rm audiodump.wav
let "PROGRESS+=$INCREMENT"
) | zenity --progress --title "$Recoding...encoding..." --percentage=0

May 20, 2009

Large size print to split over several pages

Filed under: Status — romka @ 7:02 pm

I’ve created a large file in gimp (compilation of several well logs if anyone is interested) which I wanted to print out on several sheets of A3 size. To do this I saved the file in ps format and used a little command line tool:

poster -v -mA3 -p4×1A3 infile.ps > outfile.ps

man poster gives detailed overview of the command.
As a result outfile.ps contains 4 pages of A3 size with peaces of long image in it – ready to print and glue or to be reopened in gimp.

VMWARE again…

Filed under: Status — romka @ 8:57 am

I have a “simulation server” with same Hardy 64bit LTS as my laptop running WinXP 64bit under vmware.. After a while trying to bit XP would cause enormous I/O activity on harddisk effectively bringing the whole system almost to a complete stop.

Thanks to cyberred on http://communities.vmware.com/thread/106917 adding
mainMem.useNamedFile = “FALSE”
sched.mem.pshare.enable = “FALSE”
MemTrimRate = “0″
to Virtual machine vmx file completely solved the problem

May 18, 2009

Frequency scaling monitor in Ubuntu below 8.10 requires:

Filed under: Status — romka @ 11:54 am

sudo dpkg-reconfigure gnome-applets

to allow changing frequency scaling

May 6, 2009

VMWARE guest keyboard issue

Filed under: Status — romka @ 9:52 am

From VMWARE Knowledge Database:
If you have a Linux distribution that uses the evdev driver for keyboard input, add the following lines to the /etc/vmware/config file on the host:

xkeymap.noKeycodeMap = “TRUE”

Powered by WordPress