The every day things from Thalamus' life.

Thalamus' Blog

14 July, 2006

TVAnywhere running on Wine

Filed under: ComputerStuff_en — Thalamus @ 03:17

Yesterday I came upon a cool program that enables me to have more control over whats on the TV, named TVAnywere. There are several such programs floating around on the internet. But, this one had all the norwegian channels ready and I liked the way it informed me of the events. So, my my dilemma. I run linux on both my laptops as default. So, I wanted to see if it was possible to get it to run under wine.

So, I downloaded the program from this location– and installed it by opening a x-term window, running “wine $HOME/Desktop/TVA20-v219.exe”. The default download is a *.msi file wich you need the parameter “/msiexec” – in order to make wine install it. But, well – I downloaded it from their forum link instead. As you see here, default download location was my desktop.

Ok, so now the program was installed, and I should be able to run it … no, unfortunately it wasn’t a stright ahead kind of deal. It gave me an ugly MS Visual C++ runtime error once I tried to access the internet. I knew that my wine installation is working quite well since I have other applications that are able to use the tcp/ip stack – so I ruled out that as the main reason.

The fortunate thing is that not all my machines are dedicated linuxs, in fact, the computer I use most nowadays is a multiboot winxp/fedora core5 installation so, I installed the application after booting into windows – fired it up and went ahead to sysinternal website, where I downloaded one of their excellent programs – listdlls. Running that revealed what dll files the application had opened on my windows installation. So, back again to linux. I mounted the nfs file system under linux and copied all the dll files the application had opened before into ~/.wine/drive_c/windows/system/all (I made that last folder myself).

Now I opened three x-term windows. In the first one I went to the folder where the application was installed, by doing a “cd ~/.wine/drive_c/Program Files/xxxx/ etc etc”. I then wipped up a small debug start script “debug.sh” that contained only this line “WINEDEBUG=+loaddll wine TVA20.exe > log.txt 2>&1”. What is does, is simply sending loading of dll files information into a textfile named log.txt for evaluation.

In the next one I simply started “winecfg”, the main program for setting options for the different wine programs. I here choose the program itself, put it to emulate as “Win XP” and went to the “Libraries” pane, makeing me ready to put in values I wanted wine to load native instead of the builtin.

In the last window I did a cd to ~/.wine/drive_c/windows/system where I did a “mv all/msvcrt.dll .” – By this method, using move I could easy move things in and out of the system folder itself, quickly between the tests. In the end I ended up with that the file “msxml3.dll” and “msxml3r.dll” located in ~/.wine/drive_c/windows/system was all that was needed. I could now delete the “all” folder.

While doing this testing, I also said in my winecfg that wine should try to load the dlls natively, and I was also able to verify it by checking the log.txt file between the tests.

So, ok – Now I had the program running, downloading updates and stuff. But, unfortunately – the programmer had one more – big problem. I could not use the GUI to change eg. the channel names. The checkbox button simply wansn’t there. Back again into Windows. I checked the registry and found as I expected that it used the registry to hold the information about what channels I did subscribe to in there. I took out the entries in question to a small one lined textfile and once again booted into linux. Then by editing the “wine registry” – ~/.wine/user.reg, I was able to get the list in.

So, ok – in the end, I ended up with the program running on Linux/Wine, and by editing user.reg I’m able to subscribe/unsubscribe the channels. I know, it ain’t a 100% full hack – but who knows. Maybe a newer version of wine renders the editing of user.reg un-needed.

Anyway, I hope some of you maybe get some tip of how you can debug programs under wine. There is alot of cool parameters you can put into the debugging parameters – but, thats not the scope of this article anway. Please head over to winhq for more info on that šŸ™‚

• • •
 

6 July, 2006

Multiple Java Runtimes – on a Fedora Core 5 installation

Filed under: ComputerStuff_en — Thalamus @ 11:24

Hi again !

Guess its time for a small note under the computer related section again. This time, a quick note about how you can use multiple versions of java on your machine.

First of all, the machine will require you to have installed compat-gcc on your machine, if you want to run older versions of jre.

So, first off – I go and get the latest version of jre. I prefer to download the standalone archive (binary), not the rpm. Since I prefer to install the jre in another location etc. I prefer /opt.

Also – I feel it is nice to mention that sun has all older versions available from this link. It took me awhile to find, so I’m making a note of it here for everyone to find.

After you download the jre – do a chmod 755 on it in order to make it runable. Then do a ./jre-xxxx.bin, the archive will then be extracted. After this – simply move the jre-xxx folder that is created to /opt so that the path will be something like this /opt/jre-1.4.1/.

If for some reason you do get some error messages saying something like ‘tail +XXX’ – you’ll have to set an environment before starting the extraction process. This is as simple writing the following – before you start the extration prosedyre. “export _POSIX2_VERSION=199209” – followed by the ./jre-xxxx.bin

If you try to install a sun jre older than 1.4.2, then you’ll probably notice that the java itself will work – but firefox plugin will fail. The reason is that the older sun jre’ are compiled with version 2 of gcc – the solution is the go and get the blackdown.org release that is compiled with gcc3 instead of suns release. The prosedyre described above still apply.

So, now – we have several jre folders in the /opt – right ?

Normally, I run with the latest version of java – as default. So, I’ve made a script that makes a few softlinks and moves a softlink /opt/java to the java version I prefer. An example of such a script comes here.

This enables the jre 1.5.0_06 …

  1. #!/bin/bash
  2. #
  3. rm /usr/lib/mozilla/plugins/libjavaplugin_oji.so
  4. rm /usr/share/firefox/plugins/libjavaplugin_oji.so
  5. ln -s /opt/jre1.5.0_06/plugin/i386/ns7/libjavaplugin_oji.so /usr/share/firefox/plugins/libjavaplugin_oji.so
  6. ln -s /opt/jre1.5.0_06/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so
  7. rm /opt/java
  8. ln -s /opt/jre1.5.0_06 /opt/java
  9. export J2RE_HOME=/opt/java
  10. export JAVA_HOME=/opt/java
  11. PATH=/opt/java/bin:$PATH
  12. if [ -e $HOME/.mozilla/firefox/pluginreg ]; then
  13. rm $HOME/.mozilla/firefox/pluginreg.dat
  14. fi

And this one … the blackdown 1.4.1

  1. #!/bin/bash
  2. #
  3. rm /usr/lib/mozilla/plugins/libjavaplugin_oji.so
  4. rm /usr/share/firefox/plugins/libjavaplugin_oji.so
  5. ln -s /opt/j2re1.4.1/plugin/i386/netscape7/javaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so
  6. ln -s /opt/j2re1.4.1/plugin/i386/netscape7/javaplugin_oji.so /usr/share/firefox/plugins/libjavaplugin_oji.so
  7. rm /opt/java
  8. ln -s /opt/j2re1.4.1/ /opt/java
  9. export J2RE_HOME=/opt/java
  10. export JAVA_HOME=/opt/java
  11. PATH=/opt/java/bin:$PATH
  12. if [ -e $HOME/.mozilla/firefox/pluginreg.dat ]; then
  13. rm $HOME/.mozilla/firefox/pluginreg.dat
  14. fi

As you may have noticed, these scripts are pretty much the same – I guess, sufficient to give you a pointer on how you can implement something like this yourself if needed.

Oh, and yes, running the scripts above normally is done by the ‘root’ user.

• • •
 

1 July, 2006

Not the best of days ;)

Filed under: Private_en — Thalamus @ 22:00

Damn, England out of the world cup once again by penalties. Why, why – can’t they friggin train on it before going to the cup. They have lost on penalties as far back in time as I can remember almost. Damn !

That was the first rant, now for the second. Moon – once again beat me in fishing. We went to Alderssundet once again. And again – I lost. She managed to get more, and even the kind of fish we where aiming for. Not only that … I broke my fishing rod šŸ˜®
As I said – not a good day, not a good day at all šŸ˜‰

• • •