GoldenDict can not import stardict dictionaries

Bug #1198972 reported by Viktor Mileikovskyi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
goldendict (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Dear Developers!
I use a large StarDict dictionaries collection. After upgrading to Ubuntu 13.04 goldendict could not recognize it usual way.
There are two folders in dictionaries configuration (F3): /usr/share/goldendict-wordnet and /home/user/.goldendict/dic .
I copied the collection to /home/user/.goldendict/dic and started GoldenDict. No dictionaries.
Running sudo goldendict did not help.
I copied the collection to /use/share/goldendict-wordnet and started GoldenDict. No dictionaries.
Running sudo goldendict caused dictionary recognition process. But after a system restart rerunning sudo goldendict caused dictionary recognition process again.
With best regards.
Viktor.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: goldendict 1.0.2~git20120929-3
ProcVersionSignature: Ubuntu 3.8.0-26.38-generic 3.8.13.2
Uname: Linux 3.8.0-26-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Mon Jul 8 16:38:45 2013
InstallationDate: Installed on 2013-05-25 (43 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no username)
 XDG_RUNTIME_DIR=<set>
 LANG=uk_UA.UTF-8
 SHELL=/bin/bash
SourcePackage: goldendict
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :
Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :

The workaround is (risky)

sudo apt-get install gksu
gksu-properties

Set identification mode as sudo and close a window

Use only:

gksu goldendict

It causes the dictionaries recognition process only once and works normally.
The main disadvantage is an invisibility of the resident icon in the top panel (but the program stays resident in the memory!). If You close a dictionary window You may run gksu goldendict (or sudo goldendict until next reboot/logoff) again. Until next reboot goldendict can not be run as a user with the following error in backtrace (the program stays in the memory as root):

The program 'goldendict' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 395 error_code 10 request_code 33 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Also using Internet dictionaries as root possibly can be helpful for attackers.

Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :

Sorry but the workaround only appears to work.
Searching any word causes

From dictionary <Dictname>
Request error: basic_string::erase

From dictionary <Dictname>
Request error: basic_string::erase

...

Revision history for this message
Tvangeste (i-4m-l33t) wrote :

Victor, are you dictionaries in the subfolders? Is the recursive checkbox is checked in the settings for the dictionary paths?

Also, if you can't check that checkbox in Dictionaries -> Sources -> Files -> Recursive , try to run GoldenDict like this:
goldendict -style plastique

Does that help?

Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :

Yes, all dictionaries are in the subfolder, the recursive check box is checked. I try to uncheck it with the same result

Revision history for this message
Tvangeste (i-4m-l33t) wrote :

Victor, OK then, all I can say at the moment is that you'd better build GoldenDict from sources yourself, since the version in Ubuntu repository is rather old.

To build GoldenDict from sources is rather simple, a couple of commands, that's all. Follow this instructions:
https://github.com/goldendict/goldendict/#installing-external-deps-on-ubuntu-linux

Also, consider this workaround for the X11 error problem:
https://github.com/goldendict/goldendict/issues/359#issuecomment-20671154

Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :

Thanks. It works but:
If there is a qmake error it is required to erase goldendict folder with git clone and reinstall dependencies (adding --reinstall at first attempt may not cause a problem but can save time by eliminating retries):

sudo apt-get install --reinstall git pkg-config build-essential qt4-qmake \
     libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
     qt4-qmake libqt4-dev libqtwebkit-dev libxtst-dev liblzo2-dev libbz2-dev \
     libao-dev libavutil-dev libavformat-dev

After that performing standard cloning and making appears to be successful:

git clone git://github.com/goldendict/goldendict.git
cd goldendict
qmake-qt4
make

But the next step finishes with errors (goldendict.png: File format did not recognized; goldendict.desktop: File format did not recognized):

make install

The result is
- no menu item in the Unity bar
- the menu item without an image in classicmenu-indicator: <Ubuntu sign> - Learning - goldendict

Now I take ownership of "dic" folder in /usr/share/stardict/ and copy all dicts to /usr/share/stardict/dic,

And it works!!! The errors specified above are not belong to this bug.

So the problem is solved. Thanks to Tvangeste!

Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :

The new git version doesn't have a problem

Changed in goldendict (Ubuntu):
status: New → Fix Released
Revision history for this message
Tvangeste (i-4m-l33t) wrote :

In order to use the up-to-date GoldenDict version with all the latest bugfixes, you could either build GoldenDict from the official git repository or use my pre-built packages, courtesy of the awesome service from openSUSE:
http://software.opensuse.org/download.html?project=home%3ATvangeste&package=goldendict

Just select your distro (Ubuntu) and follow instructions for your Ubuntu version to add the new repository. Then just regular 'apt-get update' and 'apt-get install goldendict'.

Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :

Thanks! But I can not use a repository. Sorry for inaccurate translation from Ukrainian
...
user@Notebook:~$ sudo apt-get update
...
Reading packages list... Done
W: Error GPG: http://download.opensuse.org Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 3656D56FBA97ADB1
user@Notebook:~$ sudo gpg --keyserver pgpkeys.mit.edu --recv-key 3656D56FBA97ADB1
gpg: sending request about key BA97ADB1 to hkp server pgpkeys.mit.edu
gpgkeys: key 3656D56FBA97ADB1 not found on keyserver
gpg: Can't find correct data OpenPGP.
gpg: Total processed: 0
user@Notebook:~$ gpg -a --export 3656D56FBA97ADB1 | sudo apt-key add -
gpg: WARNING: nothing exported
gpg: Can't find correct data OpenPGP.
user@Notebook:~$

Revision history for this message
Tvangeste (i-4m-l33t) wrote :

Viktor, the information on the openSUSE build site states:

You can add the repository key to apt like this:

wget http://download.opensuse.org/repositories/home:Tvangeste/xUbuntu_13.04/Release.key
apt-key add - < Release.key

Revision history for this message
Viktor Mileikovskyi (v-mil) wrote :

Many thanks! It works fine.
With best regards.
Viktor.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.