Thursday, December 01, 2011

5.0 amd64 K43U: Firefox + gecko-mediaplayer + FlashVideoReplacer = watch streaming video inside Firefox!

Hi,

Maybe you guys knew about this far longer than me but this post is just a reminder for me. Anyway, here it is.

- Install Firefox
- Download and install gecko-mediaplayer from OpenBSD package.
- Search for FlashVideoReplacer plugin from Firefox's plugin website. Install that.

After FlashVideoReplacer plugin has been installed. There will be an icon on the top right side of Firefox. Click on it and go to Preferences. On the Replacement tab, I choose:

- Preferred method = embedded
- Plugin/MIME type = WMP (application/x-mplayer2)

Then enjoy streaming videos.

Just a while ago I managed to make a mess by configuring the mplayer plugin to use xv in "Right-click video > Preferences > Adjust Output Settings > Video Output". When I open videos after that, the screen is blank but there's sound. To make it worst, right-click does nothing so I can't go to the Preferences again. The solution? go to ~/.mplayer/ and delete the config. Opening another video will reset the settings. Later.

5.0 amd64 K43U: Current status.

Hey,

So far, this is my experience on running 5.0 amd64 using this K43U laptop. The list is what I consider as interesting and somewhat important.

Hardware:
1) Atheros (athn0) wireless works. Using kismet to scan for AP but I didn't test to connect to any yet.
2) Realtek (re0) LAN works like a charm.
3) Haven't tested suspend/resume yet. Soon I hope.
4) Sound works out of the box. Yum!
5) AMD Radeon HD 6310 is not yet supported. My widescreen LCD panel is on 1024x768 on vesa although it should be 1366x768. Still searching for tips on this.

Software:
1) Davmail 64-bit (using FreeBSD's package). Currently still testing as there's issue with java memory error.
2) Firefox works and now I can watch streaming video (youtube etc) inside Firefox! Using gecko-mediaplayer plugin and FlashVideoReplacer extension.
3) Thunderbird + enigmail works.
4) scrotwm using the source (0.9.34). Works great. No crashing on Thunderbird anymore.
5) conky have problem with ${addr} and multicore processor. Read about patch to fix it but I installed from package, not from port so no hope for me yet. Maybe in -current?

Later then.

5.0 amd64 K43U: Davmail crash with java dumping core, FreeBSD's package might be the saviour.

Hey,

As some of you know, I'm using OpenBSD primarily for work and I use my company's email address which uses MS OWA. So I use davmail so Thunderbird can retrieve my emails properly. You can search my blog for davmail settings.

I downloaded davmail-3.9.6 and I noticed that less than an 1, davmail will crash and there's java.core dumping. I have a hint that this might be due to 64 version of davmail is not available for OpenBSD and there's only linux's version which has 64-bit.

As this issue is critical, I need to make sure I resolve this as soon as possible. Downloading linux's 64-bit version is out of the question because I don't want any more mess. So I thought of doing an experiment.

I noticed that FreeBSD have amd64 version of davmail in their package system. FreeBSD, which used to be i386 system only have broaden their supported architecture by releasing amd64 version of their OS a few years back. Good news indeed.

I found davmail-3.8.4 package (*.tgz) for FreeBSD 8.2 which is ok as long as it will work. I do some comparison and found that this is what's needed for davmail to work. No installation needed.

lib/
davmail.sh
davmail.jar


There's some files inside the lib folder and only 1-2 files has changed since 3.8.4 to 3.9.6. So I extracted the *.tgz and copied that files into ~/davmail/. Using my previous davmail configuration, I'm now using the amd64 version of davmail meant for FreeBSD.

I'm just using it today, starting in just 1 hour and so far it seems to be working fine. It davmail can survive working hours today then it's great. For the package, you can download from FreeBSD or I can provide mine if needed.

Update!: Just as I published this post, the davmail crashed again. Here's the header of the error message:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 4361696 bytes for Chunk::new. Out of swap space?
#
# Internal Error (allocation.cpp:272), pid=11064, tid=8626964480
# Error: Chunk::new
#
# JRE version: 7.0
# Java VM: OpenJDK 64-Bit Server VM (20.0-b03 mixed mode bsd-amd64 compressed oops)
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#


Maybe it's java's issue. Hmm. I'll need to search for answers. Maybe install another version of jre or jdk. Anyone else have this issue?

Update 02/12/11 09:40:
I found that there's already a few 5.0 users which posted question regarding this java.lang.OutOfMemoryError issue and it affected different java based program like eclipse and netbeans.

Rewinding a bit, DavMail is run using davmail.sh script which resides in DavMail folder. Normally by default, the script contains:

# davmail.sh Ahmad Zulkarnain 2011
BASE=`dirname $0`
for i in $BASE/lib/*; do export CLASSPATH=$CLASSPATH:$i; done
java -cp $BASE/davmail.jar:$CLASSPATH davmail.DavGateway $1


The last line tells the script to run DavMail. I tried to change the command to:

java -Xms512m -Xmx512m -cp $BASE/davmail.jar:$CLASSPATH davmail.DavGateway $1

Note the bold text are the changes I made. But then I have this error:

/home/karl/davmail/davmail.sh /home/karl/davmail/davmail.conf
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


I even tried using only -Xms512m or -Xmx512m with the same error. So then after reading the java man page, I experiment with adding -d64 to force DavMail to run in 64-bit environment. So now the last line of davmail.sh looks like this:

java -d64 -cp $BASE/davmail.jar:$CLASSPATH davmail.DavGateway $1

Now I tested that one invoking sh ~/davmail/davmail.sh ~/davmail/davmail.conf without making it a background process so I can see the output in xterm. I tested that since my last post on the java.lang.OutOfMemoryError until the end of my working hour and there's no crash. *Maybe* DavMail is not stressed enough by then because mails are less in the evening. So today I'm testing the altered davmail.sh to see if it can survive until the end of my working hours. I will keep you guys posted on that.

Thanks to Daniel M for your comment, sorry I have to answer your question in here instead of the comment box but I'm still interested to know any java tips from you.

Update 02/12/11 11:49:
Ok it crashed again. Still have the java.lang.OutOfMemoryError and java.core dump. But at least it's not as fast as yesterday. I managed to get more than an hour of emailing done. So I need to search for more answers. Later.

6.5 amd64: Modify existing certbot certificates.

Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...