April 08, 2008

Exporting vids form iMovieHDD

Here's how to get those stop motion pictures out of iMovie HDD. Feels like a fun thing to play with don't you??

Sony Ericsson mobile emulator on linux

As a mobile developer using Slackware I often stumble over the fact that most of the major Mobile providers like Nokia, samsung, Motorola and Sony Ericsson only support the Windows platform with their development tools?? I hate this fact!

It must be possible for any of these companies to hire some one who could handle their development tools on other platfroms like Mac or Linux!

Luckily, the Sony Ericsson emulator is based on the Sun ME emulator. So I decided to get the emulator running wit my netbeans setup. So here's how to get the SonyEricsson (SE) mobile phone emulator running on a linux
box.

1. Install wine!
If you don't have a windows box with the SE installed you'll need to be
able to install the windows version of the SE emulator so you can hack the
files. This can be done using wine.

2. Install the recomended jdk and jre for the latest SE emulator in
wine You'll need jdk and jre to install the SE Emulator. Just
follow the online instalations.

3. Install the SE emulator in wine.
Point to the recently instaled jdk and jre if needed. Just
follow the online instalations.

4. Go to the SE PC_emulation directory typically placed at:
$HOME/.wine/drive_c/SonyEricsson/JavaME_SDK_CLDC/PC_Emulation

5. backup the WTK2 directory to keep the windows files just in case tar -czvf
se.tar.gz WTK2/

6. Merge the Linux kvem.jar into the Windows kvem.jar file

In the WTK2 directory with the one from the netbeans Linux
emulator. Depending on the Netbeans installation on your Linux box you'll
have to find the emulator/WTK2 directory.

My directory for the sun emulator is:
$HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/

Then find you SE installation, mine is:
$HOME/.wine/drive_c/SonyEricsson/JavaME_SDK_CLDC/PC_Emulation

If you have Midnight commander (MC) installed. You can open the zipped jar
files directly and copy all the linux class files into the Windows version
of the jar file.

This is done by opening the kvem.jar files in their own window in MC. Each
of the kvem.jar files should be opened to the first level, having the
META_INF and com directory avaialble. Then press 'F5' in the linux version
at the com directory, remember to mark the "dive into sub directories" tap
in the copy dialog to get everythign copyed from the Linux kvem.jar file
to the windows kvem.jar file. That's it

Now if you don't have MC installed unzip both kvem.jar files into the same
directory. Firs the windows kvem.jar file should be unzipped. Then unzip
the Linux kvem.jar file into the windows kvem.jar directory and zip the
whole thing again.

It is crutial that the linux version is written ontop of the windows
version. This is for the Linux version. This is because the linux version
needs to overwrite the non platform independend java classes in the
windows file.

7. Copy all the executables from the Linux version to the Windows
version. This is done by copying every executable from the Linux netbeans
WTK2/bin/ to the PC_Emuation/WTK2/bin/

find .netbeans/5.5.1/emulators/wtk251-lin/emulator/bin/ -perm -u+x | xargs
cp -t bin

copy the file from 6.0 if you're using this netbeans version.

8. Copy all the library files from the Linux version to the Windows version
this is done by copying all the *.so files from the WTK2/bin to the
PC_Emuation/WTK2/bin/

cp $HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/bin/*.so bin

copy the file from 6.0 if you're using this netbeans version.

9. Copy the Linux wtklib subdirectory to the windows version

if you're not there allready goto the SE windows PC_Emuation/WTK2/wtklib/
then copy the Linux directory to thisdirectory.

cp -R $HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/wtklib/Linux .

copy the file from 6.0 if you're using this netbeans version.

10. Copy the Linux sound support library to the windows. This is done by
copying the soundbank.dsl from the WTK2/lib/ to the PC_Emuation/WTK2/lib
directory.

cp
$HOME/.netbeans/5.5.1/emulators/wtk251-lin/emulator/wtklib/lib/soundbank.dls
lib

11. Import the emulator into netbeans. See the netbeans documentation on how
to do this.

12. If you're a nice guy like me create a tarball for so everyone can use the
emulator.

mkdir se_emulator_wtklib-2.5.1
cp -R WTK2 se_emulator_wtklib-2.5.1
tar -czvf se_emulator_wtklib-2.5.1.tar.gz se_emulator_wtklib-2.5.1/

Gnome slackbuild

I miss gnome on my slackbox! I really do. Good thing I finally came across a *kewl thang* The gnome slackbuild. It was the easiest thing to install. All you have to do is follow the instruction and the configuration and you're good to go ;)

September 06, 2007

Linux on a usb drive

Today I decided to play around with Linux on a usb drive. I want slackware but could not find zip slack. So I googled a bit and found wowarea and damn small linux these boch lead me to Slax. Slax is based on slackware. So I figured I better Download it.

I installed the Slax image on my usb stick, a 4GB pleomax, unfortunately I had to use window$ for this installation :( Nevertheless, the installation went smoothely and Slax booted smothely on my first usb boot.

I then attempted to create a specific package for Slax, namely netbeans IDE as I'll have to use this in my new job. I installed netbeans on a redhat machine, yawm, and used the slackware package approach.

I installed the netbeans IDE, the profiler, the c/c++ support and the CLDC packages. I also had to install the latest JDK to get the darn thing running. See previous posts for this. Then, I created the packages from this installation. I grouped all the netbeans packages into one huge slackware package, but I'll divide these into a package each later.

Once the package was done I searched for the tgz2mo program, but couldn't find it anywhere for redhat. So I booted with the pendrive and mounted /tmp to a place on the stick with enough space, 1-2 GB.

Then, then I used tgz2mo and the package was created, I inserted the package with uselivemod and fired up the netbeans IDE. This did not start directly since it could not find JDK. I then installed the JDK module and activated netbeans with --jdk-path pointing to the JDK installation.

That fired it up, everything but the emulator worked, this was due to the same GLIBC problem as I met earlier on the redhat installation. I installed the Slax module containing the GLIBC library but that completely broke the Slax installation.

It seems like the boot attempts to install the 2.5 files so I cant boot slax now. I'll see if I can remove the GLIBC 2.5 files and boot teh darn thing again. Then I'll do a proper GLIBC package for Slax created from my fresh slackware distro.

I'll let ya know once I have it running again.

September 04, 2007

Upgrading to openoffice 2.0

Since the Linux box updating has now started I also decided to update the open office package. First I had to rid the old installation:
rpm -e openoffice.org-i18n openoffice.org-kde openoffice.org-libs openoffice.org

The above removed all openoffice 1.1 dependencies. Then the latest open office package needs to be installed:
tar -zxvf OOo_2.2.1_LinuxIntel_install_da_rpm.tar.gz

Since the installation script did not seem to work for me, I decided to use RPM to get the packages in manually. To avoid dependency problems here a one liner:
ls *.rpm |xargs rpm -ivh

Yes I like to know what is going on ;)
Now all you have to do is create the links you need for the old open office desktop links to work,
ln -s /opt/openoffice.org2.2/program/swriter /usr/bin/oowriter
ln -s /opt/openoffice.org2.2/program/scalc /usr/bin/oocalc
ln -s /opt/openoffice.org2.2/program/sdraw /usr/bin/oodraw

Finally a link to the openoffice common program:
ln -s /opt/openoffice.org2.2/program/soffice /usr/bin/soffice

That's it you're now ready for the open document standard. Have phun!? Notice, that my OO could not import the old user settings? Seems there was an error in a script file. This may very well be because my installation was way to old!

September 03, 2007

Firefox and thunderbird upgrade

Today I updated to firefox and thinderbird version 2.0. I also decided to get rid of the redhat packages as the firefox and thunderbird updates are usually distributed in tarballs . Change to superuser and then issue:
rpm -e firefox thunderbird

While you're at it remove the whole old mozilla stuff as well since it's nolonger needed. On my system I had to do:
rpm -e mozilla-devel mozilla-js-debugger mozilla-dom-inspector mozilla-mail devhelp mplayerplug-in mozilla

Notice: You can get the dependencies by issuing just rpm -e mozilla, since the dependencies will keep the rpm manager from removing the package.

To remove the rpm's, Next, get rid of the old version's entries in /usr/lib/firefox-xx and /usr/lib/thunderbird-xx by:
su -c "rm -rf /usr/lib/firefox-xxx /usr/lib/thunderbird-xx"

Now extract the latest firefox and thunderbird to the preferred location by:
tar -zxvf thunderbird-2.0.tar.gz --directory /usr/lib
tar -zxvf firefox-2.0.tar.gz --directory /usr/lib

create the links to the installed applications in the /usr/bin/ directory by:
ln -s /usr/lib/thunderbird-2.0/thunderbird /usr/bin/thunderbird
ln -s /usr/lib/firefox-2.0/firefox /usr/bin/firefox

Testing the installation:
firefox --version
Should produce something like:
Mozilla Firefox 2.0.0.6, Copyright (c) 1998 - 2007 mozilla.org

Edit:- 03 September 2007:
Just after the installation I wanted to add the new calendar support to Thunderbird, and the local weather should be viewable in my new Firefox :) I just love these small application addons

August 27, 2007

Netbeans mobility pack installation

Phew, it took a great deal of try and error before it finally managed to get installed, this was mainly because my Linux system was very outdated. I'm running on an old redhat ETP 3.0 and netbeans 5.5.1 is very new in comparison.

I had to update the glibc library to 2.4 (or above) on my system because the netbeans mobility pack emulator depend on this library. On most new distributions, like slackware 12, debian , and ubuntu this is no problem since they all use glibc version > 2.4

To install the netbeans SW on an updated system just follow these steps:

1. Change to root
su -

2. Check that you have everything
ls *.bin

jdk-1_5_0_12-nb-5_5_1-linux-ml.bin
jdk-6u2-linux-i586.bin
jdk-6u2-nb-5_5_1-linux-ml.bin
netbeans-5_5_1-linux.bin
netbeans-c++-5_5_1-linux.bin
netbeans_mobility-5_5_1-linux.bin
netbeans-profiler-5_5_1-linux.bin
sjsas_pe-9_0_01-nb-5_5_1-ml-fcs-bin-linux.bin
sun_java_wireless_toolkit-2_5_1-linux.bin


3. chmod all the binaries
ls *.bin|xargs chmod u+x

4. Install the jdk
./jdk-6u2-linux-i586-rpm.bin

The reason for using this file and not the tarball is that it actually contains rpm's. These rpm's will ensure that the netbeans installer(s) can see the new jdk you just installed.

5. Install netbeans 5.5.1 package
./netbeans-5_5_1-linux.bin

6. Install the c/c++ add on
./netbeans-c++-5_5_1-linux.bin

7. Install the profiler
./netbeans-profiler-5_5_1-linux.bin

8. Install the Mobility package The actual CLDC sdk :)
./netbeans_mobility-5_5_1-linux.bin

This way all netbean components are placed in:
/opt/netbeans/

To try netbeans IDE create a link/symlink/set the path/ or execute the file: /opt/netbeans-5.5.1/bin/netbeans

This is the final result of a generated test midlet running in the netbeans simulation environment:

My system was a modified redhat ETP, but I guess that it'll run on most rpm based machines. Perhaps I should try a slackware installation to verify everything.

Problems:
Installion went fine, so did creating a project test midlet. If you could execute the midlet and simulate it youre done. But if executing the emulator failed due to wrong GLIBC version, follow the step below as well.

I had to update glibc on my instalation to 2.4. This is not a trivial task as it may break your entire system. And yikes, the glibc 2.4 installation failed, some issues with one og the gcc compilers libraries :( So I installed the latest gcc as well. And yes it takes a while!
Read the following howto carefully.

The fast way to do this is to find the appropriate rpm's somewhere and then install these using the --nodeps option. This is because the rpm's have interdependencies that cannot be resolved.

The full expressing looks something like this:
rpm -Uvh --nodeps binutils-2.16.91.0.6-5.i386.rpm glibc-common-2.4-11.i386.rpm glibc-2.4-11.i686.rpm glibc-headers-2.4-11.i386.rpm glibc-utils-2.4-11.i386.rpm glibc-devel-2.4-11.i386.rpm gdb-6.3.0.0-1.134.fc5.i386.rpm gcc-4.1.1-51.fc5.i386.rpm gcc-c++-4.1.1-51.fc5.i386.rpm

Notice the above is quite rough on your system.! You can actually break the systems stability if you do not resolve all the dependencies for all the packages.

August 22, 2007

Grep

I sometimes forget the syntax, so in order not to forget heres a link to one of the best Linux blogs available: Grep magic

PS3 the wonderfull new toy

Just in, PS3, damn what a fine piece of machinery. After spending many evening as a lego starwars character or as a Member of the Corleone family I decided to get the PS3 to run as a Multimedia center. Here's how get the PS3 running as a Hd recorder with a small USB TV input device.

February 06, 2007

DVD, AVI and the rest of the video world

A long time ago when I bought my first DVD player here in Denmark I didn't need to worry about regions. Since the law of my contry did not bother about these things. We simply allowed all regions as we where a free country.

On a vacatin to the US of A I bought a number of DVD's that I found interesting , good and could not get as region 1 movies. Besides most European movies has been rated differently and are therefore not the original movie once they are released in Europe.

Then I bought a new DVD player, but something had changed! We where no longer a free country, the regions on our players where locked! So all my movies could now lolonger be played on my new DVD player. Why????

I decided to start converting them to something I could watch on my mac and my new player. For this I needed a good tool. The darwinport's Handbrake seemed like the answer to my call. I then changed the region on my mac for 1 and started ripping all my dvd's from the US one by one.

Then I needed a good player that handled all videoformats. I found the VLC player. This player took all my troubles away. It plays AVI, VOB and what ever you could imagine.

Why WMA files for gods sake?

This Xmas I bought a song on the web. The hit of this Xmas. But I cannot play it om my mac because the file is in WMA format.

How stupid! Why cant these distribution sites use a regular format like mp3???

I wanted to listen to my new song, so I started looking for some converter tools so I could listen to my newly bought song. I found switch.

Apparently I wasen't the only one with the problem, since Dave taylor knew. Thanks Dave.

August 21, 2006

TOR

I got sick and tiered of internet commercials!!! I hate those commercials. I got tiered of internet statistics and server traffic. So I decided to install TOR.

This beautiful distributed network tool is no less than fantastic. Ok my bandwidth is reduced a bit, but the reduction is worth it, since you rid all the crap.

After the installation in Firefox and Thunderbird the world has become much more anomymous ..... Ahhhh the commercial free life.

February 18, 2006

ScummVW

Speaking of good clean family entertainment you can trust!

Need I say more?

Well ok DOTT and of course the world known game comic Day After the Day of the Tentacle. Most of the world famous Lucas Art Games are now known as Abandonware. This means that you can get them for free.

I downloaded a couple of Monkey Island from this place www.downloadcentral.dk. They have most of the famous ones. Problem is though they are all packed in the ACE format.

Luckily this is ported with darwinports, so sudo install grace will dump the much appreciated unpacker on your box.

When it's done you should be able to unpack you ownloaded game by:
unace e monkey.ace I created a directory for each game I downloaded, and extracted the game in there. Then I added the game to scumVM.

Subversion & mail man

A long forgotten tool is the command line mail, I decided to start using it again for sending attachments. As this is much neater.

Then I decided to write a block entry here but someone bet me to it: 'SHELLdorado - Sending files as mail attachments'. SHELLdorado is a great resource for shell stuff.

With nothing better to do I decided to read the latest Linux Journal, especially the Subversion article. Rumor has it that subversion will be replacing cvs.

I'm not that big a user of cvs but I decided to have a look at subversion and use for handling my general set up on both my powerbook and my office linux box.

sudo port install subversion ...... Did I mention I'm in love with Darwinports? Then simply follow the article to create repository, or just read the Subversion documentation.

February 09, 2006

The Gimp Deux

I need the gimp, luckily darwinports.org has a resent port of gimp2, and you can install it by typing:
sudo port install gimp2
Wait .......... Once the installation is done typing:
gimp
in a shell'll launch the application. Now you want to set your own splash screen. I choose mine from the GIMP 10th Anniversary Splash Contest. Just dump the splash image as
~/.gimp2.2/gimp-splash.png
There's loats more configuration for the gimp where that came from check the Gimp man page for details.

I found, however, that my XDarwin application needed a good window manager instead of 'just' using TVM, which it is born with. So, I installed Oroborus for Mac. This gives the nice transparent frames just like Tiger.... Grrrr...

All I had to do was to change to my preferred key mapping from the USA.xmodmap to DK.xmodmap. Then Orobrus was good to go. With all the work related issues ready I guess I'm ready to go else where, it's entertainment time: scumVM

January 31, 2006

Emacs revisited

I already installed auqa emacs but that application did not copy an paste at all :( So I decided to install GnuEmacs.

First, I tried the binary package but that didn't work ;( So, I attempted to build the latest version for mac. In the instructions the cvs commando has been replaced. So do a
cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs co emacs
Cause the cvs ssh has been replaced with the pserver.

To build enacs for mac use the carbon app framework
cd emacs
./configure --enable-carbon-app --without-x
make bootstrap
sudo make install
According to the ./emacs/mac/INSTALL file, The application is installed in /Application/Emacs.app/Contents/MacOS/Emacs

I found mine in /Applications/Emacs.app. I don't know is this application is the one mentioned in the INSTALL file, I think it is, but that doesen't really matter.

I simply dragged the Emacs.app to the Dock for fast and easy execution. There's a great reference for setting up your mac for programming

January 30, 2006

MagicPoint

Well, once the text processing progam of the office suite was installed I found that I was now lacking my favorite presentation tool.

I hate Powerpoint and most of its humongous cusins. That's why I setteled once again for MagicPoint. Editable from Emacs!

Documentation can be found at http://www.freeos.com/articles/3648/ and the SYNTAX file from the tarball.

January 12, 2006

Getting an office suite

On my old slack box I used to run OpenOffice. On my Mac box I want to run OpenOffice as well. So I started looking around to find the mac compatible version. Notice the X11 at the end of the filename.

This means that X11 is needed to run the darn thing! But phear not, here's how to install open office and x11 and even the official apples guide. This was my starting point! I spend some time looking at instalation results and comments before I decided to go else where.

After googling about I choose NeoOffice and XDarwin. Both installed from binary images with no setup, the easy way. First I installed XDarwin, then NeoOffice. This was really easy all you have to do is follow the instructions for both items.

Once you're done two application icon are added to the /Applications/ directory, namely: neooffice and xdarwin. Started NeoOffice and it was like my old slack box! I can start documenting my work for work ;)

One thing happened though, this was after installing the XDarwin application X11 server. My dock changed to the default values? I guess that this came from startig the xservices in Tiger but I'm just guessing here.

I could change the dock back to my prefered setting, and it is still keeping them so I'm a still a happy guy.