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.