Saturday, January 19, 2013

Successful OALD8 installation on Fedora linux: libgtk-1.2, pronunciation, and Flash

This is the notes for a successful installation of Oxford Advanced Learner's English(OALD8/OALD7) on Fedora 16 GNU/Linux at Jan. 2013. The main issues covered are: libgtk-1.2.so.0 dependency, no sound/pronunciation, and missing flash plugin. The solutions applies to both OALD7 and OALD8.

Jump to the solutions ->

Issues:

1. Legacy libgtk dependency is the first problem came up, right after I mounted the iso, and tried to run . linux/steup.sh:

"error while loading shared libraries: libgtk-1.2.so.0: cannot open shared object file: no such file or directory"

2. If you have the libgtk dependency, the dictionary should install and start up without problem. However, if you run the ./oald8 directly, it will not play the word pronunciation / sound, and you may see the error messages complaining about libflashplayer.so could not load, like the one below:

"error while loading shared libraries: libnssutil3.so.1d: cannot open shared object file: no such file or directory"

While it the sound issue may seem to be caused of the broken Flash plugin, it is indeed related to the conflicts between OSS(Open Sound System, legacy system used by the dictionary) and PulseAudio(commonly installed on GNU/Linux nowadays).

3. The Flash plugin issue has 3 parts.

First, the libflashplayer.so came with the package is missing a few dependencies: libplc4.so.0d, libplds4.so.0d, libnspr4.so.0d, libnssutil3.so.1d. That is why you saw the error messages mentioned above.

Secondly, the version matters. The latest version of Flash plugin for GNU/Linux (11.2 r202) will crash if you try copying libflashplayer.so from /usr/lib/flash-plugin/ to the oald8/plugins/. The 10.2 and 10.0 version suggested by Mac users would not work on Fedora either.

Thirdly, copy instead of (soft) link. I can confirm that OALD8 failed even when ln -s the Flash plugin 9 library, which worked later when copied to the plugins folder.

Ideas:

It would be nice to port the OALD to a later version of XUL runner, so that the dictionary could be run in Firefox. Since the application was developed on an older version of Mozilla codebase, Seamonkey  1.8, most of the content can be reused directly. One issue, however, is the changed format of manifest file, which is required to register the chrome.

Solutions:

# legacy gtk dependency
yum install glib.i686 gtk+.i686

# pulseaudio oss wrapper, for pronunciation
padsp ./oald8

# link the missing libraries
ln -s /usr/lib/libnssutil3.so libnssutil3.so.1d
ln -s libplc4.so libplc4.so.0d
ln -s libplds4.so libplds4.so.0d
ln -s libnspr4.so  libnspr4.so.0d

# use flash player 9
http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp9r280_plus_archive.zip

# misc, debug
padsp ./oald8 -jsconsole

window.open("chrome://oald8/content/flash/main.xul","oo","chrome,width=600,height=300")

window.open("chrome://oald8/content/flash/main.xul","oo","menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes,width=600,height=300")

# icon, for launcher
chrome/icons/default/main.xpm

# unsolved issues
* Resources content can not display, as a result of broken built in PDF viewer.
* Practise your pronunciation part does not play/record your voice.

Tuesday, January 1, 2013

Change useragent for specific websites firefox - general.useragent.site_specific_overrides

*general.useragent.site_specific_overrides* To override useragent for one specific site, create a new String entry in about:config, like this:

general.useragent.override.aol.com

And, put in a useragent string, like this:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10

Reference:
https://bugzilla.mozilla.org/attachment.cgi?id=656817&action=edit

Happy New Year, to all the Firefox lovers! 

Thursday, November 3, 2011

Official Google Reader Blog: New in Reader: a fresh design, and Google+ sharing...

It sucks!

Official Google Reader Blog: New in Reader: a fresh design, and Google+ sharing...: Posted by Alan Green, Software Engineer Today we're rolling out the new Reader design, and the Google+ features that we mentioned just ove...

Thursday, December 31, 2009

Happy New Year! 2010

Happy New Year!

I wish...

Wednesday, December 9, 2009

authinfo.gpg caused Emacs error "Args out of range: "", 0

You may encounter the followinf error if you follow the instructions in
Emacs *info* auth-source, and generate an .authinfo.gpg file in your
home directory.

Passphrase for symmetric encryption: error in process filter: Args out
of range: "", 0

This didn't happen until recently when I ran gnus in daemon mode, and it
only happened if I start it with a sh script like this:

#! /bin/sh

# run gnus in background

gnus_server()
{
emacs --daemon=gnus \
-eval "(gnus)"
}

Everthing would work well if I start the Emacs daemon first, and M-x
gnus then.

The solution is simple, yet cost me over hours to find it out:

mv .authinfo.gpg .authinfo

or, rm .authinfo.gpg

if you did a cp in the past.

I think this maybe a bug included in the recent updates, as it didn't
happened when I ran that same sh script before I updated to Ubuntu 9.10.

Tuesday, November 24, 2009

firefox problem with wireless connection

I had problem visiting some websites with firefox. The pages could not
render, refresh didn't work either. How ever, I could see that the source
was loaded.

The most weird thing was that google-chrome could still work at the same
time, which made me think it was not a networking problem but a bug with
the newly upgraded firefox. I tried re-installing the firefox and all
its dependence, where aptitude worked as well as google-chrome, yet this
didn't help solve the problem.

The real cause for this problem turn out to be with the wireless
connection, and if replaced the TP-LINK wirelss card (TL-WN510G) with a
wired connection problems went away. This is found out using wireshark,
after captured a lot of TCP Retransmission packets.

I still can not understand why would things like this happen: no other
applications but firefox would have problems with the wireless connection
(apt-get and google-chrome works), and, the problems are limited to a
few websites (51job would fail while google.com works).

It maybe related to the tcp connections limitation at a same time, but
this is just my guess.

Monday, November 16, 2009

henu-cernet client for GNU/Linux

Visist here: http://bku.net.ru/henu-cernet to download the henu-cernet client for GNU/Linux.