New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

GoldenDict Portable Linux available - Early Access Builds

General discussion

GoldenDict Portable Linux available - Early Access Builds

Postby chulai » Sun Jun 17, 2012 11:26 pm

Hi everybody,

I've been working for some time in a portable Linux version of GoldenDict. I created binaries for both 32 and 64-bit Linux distributions:

GoldenDict 1.0.1-313-g83bdb1d-i386.tar.gz - Last updated: 2012-09-24 (Outdated. Check Github link)
GoldenDict 1.0.1-313-g83bdb1d-x86_64.tar.gz - Last updated: 2012-09-24 (Outdated. Check Github link)

Check the Latest Early Access Build in Github: https://github.com/goldendict/goldendic ... x-Portable

New info added on 2 September 2013: I strongly recommend you to try first the Linux packages available for Debian, Ubuntu, Fedora, openSUSE and other distributions at viewtopic.php?f=4&t=2333#p10362. This portable version only targets users of old Linux distributions.

If you want to give it a try, just download the right binary for your operating system and follow the Quick Start steps.
Read item #2 below to know how to check if you have a 32 or 64-bit system. A 32-bit binary won't work in a 64-bit Linux (Well, unless you have ia32-libs and all the 32-bit shared libraries installed for your binary and that's looking for troubles!)

Quick Start steps

  • Make sure that you are using one of the supported distributions. See item #1.
  • Download the GoldenDict tar archive for your specific architecture. See item #3.
  • Uncompress the tar archive. From a terminal window type:
    Code: Select all
    $ tar -xvzf GoldenDict\ 1.0.1-313-g83bdb1d-i386.tar.gz

  • Right-click the resulting uncompressed application, select "Properties".
  • Click the tab titled "Permissions".
  • Check "Execute file as application".
  • Press "Close".
  • Or you can open a terminal window and set the executable bit instead:
    Code: Select all
    $ chmod a+x GoldenDict\ 1.0.1-313-g83bdb1d-i386

  • Double-click GoldenDict application to run it. It should display the main program window. If not, please continue reading items #A and #B from the Troubleshooting section.


If GoldenDict runs fine you can stop right here. Otherwise, please read the Troubleshooting section below. Finally, for more information about these builds keep reading the More Info section.


More Info about the builds


1. What are the supported distributions?

GoldenDict portable linux version has been created with the AppImageKit tools. AppImageKit officially support Ubuntu 10.04 (Lucid Lynx) 32-bit, OpenSUSE 11.3 (GNOME) 32-bit , and Fedora 12 (GNOME) 32-bit, and later. That said, I have tested GoldenDict portable in other distributions too including 64-bit flavours. In some cases, you can probably run the portable version in an unsupported distribution just fine if you install minimal dependencies, such as FUSE (see item G).


2. Which Linux distributions have been tested?

  • Arch Linux 2010.05 Gnome 3.2.1 32-bit
  • Fedora 12 Gnome 2.28 32-bit
  • Fedora 16 Gnome 3.2.1 32-bit
  • Fedora 17 Gnome 3.4.1 64-bit
  • Mint 12 LXDE 32-bit
  • OpenSUSE 11.3 Gnome 2.30 32-bit
  • OpenSUSE 11.3 Gnome 2.30 64-bit
  • OpenSUSE 12.1 KDE 4.7.2 32-bit -> need to install FUSE libraries before (see item G).
  • Ubuntu 10.04 Gnome 2.30 32-bit
  • Ubuntu 10.04 Gnome 2.30 64-bit
  • Ubuntu 11.10 Gnome 3.2.1 32-bit
  • Ubuntu 12.04 Gnome 3.2.1 32-bit

3. How can I check if I have a 32-bit or 64-bit Linux distribution?

From a terminal window type:
Code: Select all
$ arch

If you read 'x86_64' you have a 64-bit Linux. Otherwise, is 32-bit.


4. Which systems were used to compile GoldenDict source code?

To achieve maximum binary compatibility I used the following base systems to compile on:
  • Ubuntu 10.04 Gnome 2.30 32-bit with Qt 4.7.4.
  • Ubuntu 10.04 Gnome 2.30 64-bit with Qt 4.7.4 -> Have tried Qt 4.8.x but it required some extra shared libraries because of some new HTML 5 video features introduced in recent Qt versions. And I couldn't find those libraries in Ubuntu 10.04.


5. How the self-contained portable version was created?

After compiling the source code, the binaries have been created with the AppImageKit tools. These tools package applications using the AppImage format. Note: These are not statically linked binaries.


6. What is the AppImage format?

AppImages are not built statically. They are simply bundled with the libraries and files that are needed to run but that are not part of the supported distributions. AppImage should contain the dependencies that are not part of the base system.
From the AppImageKit documentation: An AppImage is an ISO 9660 file with zisofs compression containing a minimal AppDir (a directory that contains the application and all the files that it requires to run which are not part of the targeted base operating systems) and a tiny runtime executable embedded into its header. Hence, an AppImage is both an ISO
9660 file (that you can mount and examine) and an ELF executable (that you can execute). When you execute an AppImage, the tiny embedded runtime mounts the ISO file, and executes the application contained therein.


7. What were the motivations to create a portable Linux version of GoldenDict?

I have seen with increasing frequency that people request more recent GoldenDict builds for their own Linux distribution. Windows users have been enjoying Early Access Builds for a while so I would expect the same experience for Linux too.

Also, the portable version try to deal with some common issues in the Linux world:
  • Lack of recent applications on mature (old) OS. If you are running Fedora 12, for example, you probably get stuck forever with GoldenDict 0.9!
  • No way to use multiple versions in parallel. Most package managers do not allow you to have more than one version of the application installed in parallel. So if you want to try one development version of GoldenDict you probably need to uninstall first the release version of GoldenDict from your machine. Then you cannot easily try before making a choice.
  • Not easy to move an application from one machine to another. If you download GoldenDict in Ubuntu (deb package system) you probably cannot copy it to a Linux Fedora (rpm package system). And if you do, your shared libraries might vary from one distribution to another. Then you cannot have a real portable GoldenDict.
Finally, some advantages of the portable version are:
  • No need to compile from source to get last GoldenDict updates. Some users just don't have the experience or time to deal with compiling from source. This way we can have more beta testers.
  • Package maintainers will always be behind in term of program updates. To deliver beta updates we can eliminate the middle-man.
  • Avoid to need root access for installation. You don't need to install any package (well, ideally!). Just run with user permissions.
  • Reallocate GoldenDict portable wherever you want. You can even keep one copy of the program in a usb pen driver along with your diccionaries to have it available wherever you go.


Troubleshooting


Unless a note to the contrary, any issue or solution explained here is specific to the portable Linux version. This version is among other reasons (see item #7) for those that can not wait until an official GoldenDict release is distributed in their favorite Linux distribution to try new features or want to help beta-testing the program. If you find further issues, please do not report them as GoldenDict bugs, report them here, at least until we figure it out the problem.


A. I run GoldenDict portable and nothing appears.

Please run GoldenDict from a console to see any output that could help to diagnostic issues:
Code: Select all
$ ./GoldenDict\ 1.0.1-313-g83bdb1d-i386


Then keep reading the troubleshooting section to find if the issue and solution are listed here.


B. I run GoldenDict from a console and, although the application seems to run fine, no window is displayed.

I have experienced this issue with Fedora 17 Gnome 3.4.1 64-bit, Ubuntu 11.10 Gnome 3.2.1 32-bit and basically any distribution using either Gnome 3.x or Unity. The application is running just fine but there is no application icon in the notification area. This is because GoldenDict is not (yet) compatible with recent changes in Gnome 3 and Ubuntu Unity. Not a specific issue of the Linux portable version but GoldenDict in general. There is ticket here:

You just can bring to front GoldenDict main window by pressing Ctrl + F11 + F11 (or whatever hotkey you have chose in Edit > Preferences > Hotkeys).

To fix this issue, and show all icons in the notification area, in Ubuntu Unity follow the instructions here:
http://ubuntugenius.wordpress.com/2011/06/25/ubuntu-11-04-fix-show-all-iconsindicators-in-unity-panels-notification-area/

To show the notification area in Gnome 3 just press the "Windows" key or move the mouse cursor to the right-bottom corner. You should see GoldenDict application icon appears in the right-bottom corner.


C. I run GoldenDict from a console and, although the application seems to run fine, a message is output: QGtkStyle was unable to detect the current GTK+ theme.

I have experienced this issue with Fedora 17 Gnome 3.4.1 64-bit. So far I couldn't find the root cause. Probably some missing dependency or environmental variables. Because of this issue, GoldenDict might display a default theme which is not the native theme of your GUI.


D. GoldenDict does not show certain images in online Wikipedia or offline dictionaries.

I have experienced this issue with OpenSUSE 11.3 Gnome 2.30 32-bit and Ubuntu 12.04 Gnome 3.2.1 32-bit. This is some incompatibility with the bundled imageformat plugins. I have to do some research to fix this issue but, for the time being, you can, instead of using the GoldenDict binaries in AppImage format, do the following:
  • Download the AppDir versions first (see item E).
  • Then download qt-plugins.tar.gz, uncompress and replace the existing plugin folders (codecs, imageformats, phonon_backend) in "GoldenDict 1.0.1-313-g83bdb1d-i386.AppDir/usr/bin" with these newer versions.
  • Run from a console:
    Code: Select all
       $ cd GoldenDict\ 1.0.1-313-g83bdb1d-i386.AppDir
       $ ./AppRun


E. How can I modify the AppImage binaries here?

An AppImages is not more than an ISO 9660 file with zisofs compression. So you have several alternatives to check the content files:

  1. Rename the file to add a .iso file extension: GoldenDict 1.0.1-313-g83bdb1d-i386.iso. Then you can open the ISO image with such programs as Archive Manager or mount it with Archive Mounter.
  2. Uncompress the AppImage with 7z:
    Code: Select all
       # Install 7z:
       sudo apt-get install p7zip-full
       
       # To list the contents of GoldenDict portable:
       7z l GoldenDict\ 1.0.1-313-g83bdb1d-i386

       # To extract all files:
       7z x GoldenDict\ 1.0.1-313-g83bdb1d-i386

  3. Use AppImageExtract.

Alternatively, you can download:

GoldenDict 1.0.1-313-g83bdb1d-i386.AppDir.tar.gz - Last updated: 2012-09-24
GoldenDict 1.0.1-313-g83bdb1d-x86_64.AppDir.tar.gz - Last updated: 2012-09-24


F. I run GoldenDict from a console and a message is output: Cannot open $HOME/.thumbnails/normal/random_number.png for writing.

I have experienced this issue with OpenSUSE 11.3 Gnome 2.30 64-bit and basically any 64-bit Linux distribution. GoldenDict portable cannot create the thumbnail file for the application icon because the target path does not exist. Just create the path .thumbnails/normal in your $HOME path and try again. Run from a console:
Code: Select all
$ cd $HOME
$ mkdir .thumbnails
$ mkdir .thumbnails/normal


I think the root cause of the issue is that I used old buggy AppImageKit tools to create the 64-bit binaries. I will do some research.


G. I run GoldenDict from a console and a message is output: fuse: failed to exec fusermount: Permission denied. open dir error: : No such file or directory.

GoldenDict portable linux version has been created with the AppImageKit tools. AppImages require a working FUSE installation: libfuse, fusermount, /dev/fuse with proper permissions, etc.
First check you are running one of the supported Linux distributions (see item #1). If your distribution is not in the list, it's not guaranteed that the application will work. You can try to install libfuse and fuse (fusermount) with your package manager.
Also check you have proper permissions. Open a terminal window and type:

Code: Select all
$ ls -la /usr/bin/fusermount
-rwsr-xr--  1 root   fuse         /usr/bin/fusermount
# chmod a+x /usr/bin/fusermount
$ ls -la /usr/bin/fusermount
-rwsr-xr-x 1 root fuse         /usr/bin/fusermount

Alternatively, you can add your user to fuse group.


H. I run GoldenDict from a console and a message is output: fuse: failed to open /dev/fuse: Permission denied. open dir error: : No such file or directory.

See item G. Also check you have proper permissions. Open a terminal window and type:

Code: Select all
$ ls -la /dev | grep fuse
crw-rw----   1 root fuse         fuse
# chmod a+rw /dev/fuse
$ ls -la /dev/ | grep fuse
crw-rw-rw-   1 root fuse         fuse

Alternatively, you can add your user to fuse group.


I. I run GoldenDict from a console and a message is output: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory.

Either you don't have libfuse installed (See item G) or you are trying to run the 64-bit GoldenDict binary in a 32-bit Linux distribution (or the other way around).


J. I run GoldenDict from a console and some fuse errors are output. On top of that, I don't have rights to change file permissions or install packages.

Your system administrator does not allow you to use fuse, so you can't use GoldenDict binaries in AppImage format. However, you can unpack the AppImage on another computer, and take its content, the AppDir, to the machine you want. Or you just can download the AppDir available here (see item E). Then you might be able to run the GoldenDict application by executing the AppRun file.


K. I run GoldenDict from a console and, although the application seems to run fine, a message is output whenever I try to listen to an audio: phonon backend plugin could not be loaded.

I have experienced this issue in several Linux distributions. In some of them I could fix it by installing GStreamer shared libs. But the best workaround I found (that worked all the times) was to install Mplayer and then configure GoldenDict to use it as external player (Edit > Preferences > Audio > Use external program).


L. How to achieve a true portable GoldenDict (Portable configuration).

By design, AppImages are read-only so that GoldenDict portable cannot modify itself. This prevents to have a portable folder with the configuration files bundled in the AppImage binary. If you want to have a 100% portable GoldenDict for Linux you should choose to download the AppDir version instead (see item E). Then create a portable folder inside "GoldenDict 1.0.1-313-g83bdb1d-i386.AppDir/usr/bin". Finally, you can run the GoldenDict application by executing the AppRun file.


M. Unable to run GoldenDict portable from a FAT drive.

If you try to run GoldenDict from a usb pen drive formatted as FAT you might find that it doesn't work. Recently the hardware abstaction layer (HAL) was changed so that FAT volumes are mounted with the "showexec" mount option. This is not specific to AppImages or GoldenDict, it effectively prevents any executable from being executed on FAT partitions (even shell scripts). You can find out if you are affected by this by opening a terminal and typing:
Code: Select all
$ mount

If you see "showexec" in the output, then that is the likely reason.
You can format your usb with ext2/3 filesystems or create a second partition formatted that way. These filesystems are native to Linux so they support proper file system permissions.
A second option is to copy the GoldenDict portable binary to your $HOME folder and then set the executable bit as explained in Quick Start steps.


N. noexec - Not permission to run GoldenDict portable or any other binary from $HOME.

One chance is that your administrator forgot to set /tmp to "noexec", so that you might be able to copy GoldenDict portable to /tmp and run it from there. Don't forget to set the executable bit as explained in Quick Start steps.



Ok, this was a long post. I will update these sections as needed. Please report any issue you find here.

Thanks,

Chulai
Last edited by chulai on Mon Sep 02, 2013 3:56 pm, edited 9 times in total.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: GoldenDict Portable Linux available - Early Access Build

Postby Tvangeste » Mon Jun 18, 2012 7:09 am

WHOA!!!! What a post! 8-)

And great job too!
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: GoldenDict Portable Linux available - Early Access Build

Postby agrothendieck » Mon Jun 18, 2012 3:27 pm

@chulai,

Thanks for your great job!

in this post, I confirmed the ctrl+c pops up the scan window. It still persists with this portable version which is up to date. I am using OpenSUSE 12.1 x86_64 and have already disabled hotkey to translate a word from clipboard by unchecking ctrl + t + t. Could you give me further ideas?

update: I rebind hotkey for popscan to win/meta then the above issue disappears.

AG.
agrothendieck
 
Posts: 10
Joined: Sun May 29, 2011 5:45 am

Re: GoldenDict Portable Linux available - Early Access Build

Postby vjjustin » Mon Jun 25, 2012 7:26 am

Thanks chulai.

Though I don't care much about the portable version, now I have access to the early access build within linux distros. I hope you keep updating this early access build often.
vjjustin
 
Posts: 45
Joined: Wed Feb 08, 2012 7:59 pm

Re: GoldenDict Portable Linux available - Early Access Build

Postby agrothendieck » Sat Jul 07, 2012 7:17 pm

@chulai,

I recently tried this early access build on debian unstable. I follow part G and H in the troubleshooting section to get goldendict run; however after reboot, I have to do part G & H again to get it run. Is there a way to get a permanent setting for part G & H? Thanks.

AG
agrothendieck
 
Posts: 10
Joined: Sun May 29, 2011 5:45 am

Re: GoldenDict Portable Linux available - Early Access Build

Postby chulai » Sat Jul 07, 2012 8:33 pm

agrothendieck wrote:@chulai,

I recently tried this early access build on debian unstable. I follow part G and H in the troubleshooting section to get goldendict run; however after reboot, I have to do part G & H again to get it run. Is there a way to get a permanent setting for part G & H? Thanks.

AG


Honestly I don't know. If you have installed libfuse, fusermount, /dev/fuse and you have given /usr/bin/fusermount and /dev/fuse right permission to all users with the command chmod, I don't understand why these permissions are reset after a reboot.
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: GoldenDict Portable Linux available - Early Access Build

Postby agrothendieck » Sun Jul 08, 2012 4:56 am

chulai wrote:
agrothendieck wrote:@chulai,

I recently tried this early access build on debian unstable. I follow part G and H in the troubleshooting section to get goldendict run; however after reboot, I have to do part G & H again to get it run. Is there a way to get a permanent setting for part G & H? Thanks.

AG


Honestly I don't know. If you have installed libfuse, fusermount, /dev/fuse and you have given /usr/bin/fusermount and /dev/fuse right permission to all users with the command chmod, I don't understand why these permissions are reset after a reboot.


Thanks. I can give more details on that. Actually, this is what I see after 'list' command to '/dev/fuse',

Code: Select all
$ls -la /dev/ |grep fuse
crw-rw---T   1 root fuse     10, 229 Jul  7 23:42 fuse


and I add read and write privileges to '/dev/fuse'

Code: Select all
#chmod a+rw /dev/fuse


then I got goldendict run,

Code: Select all
$ls -la /dev/ |grep fuse
crw-rw-rwT   1 root fuse     10, 229 Jul  7 23:42 fuse


note that 1) I don't know what "T" is in the result of 'ls' in the first part; and 2) there is no '/usr/bin/fusermount', instead, 'fusermount' is in '/bin/'. But still, I need do this every time I reboot my machine. Any further ideas? Thanks.

AG
agrothendieck
 
Posts: 10
Joined: Sun May 29, 2011 5:45 am

Re: GoldenDict Portable Linux available - Early Access Build

Postby chulai » Sun Jul 08, 2012 2:41 pm

agrothendieck wrote:
Thanks. I can give more details on that. Actually, this is what I see after 'list' command to '/dev/fuse',

Code: Select all
$ls -la /dev/ |grep fuse
crw-rw---T   1 root fuse     10, 229 Jul  7 23:42 fuse


and I add read and write privileges to '/dev/fuse'

Code: Select all
#chmod a+rw /dev/fuse


then I got goldendict run,

Code: Select all
$ls -la /dev/ |grep fuse
crw-rw-rwT   1 root fuse     10, 229 Jul  7 23:42 fuse


note that 1) I don't know what "T" is in the result of 'ls' in the first part; and 2) there is no '/usr/bin/fusermount', instead, 'fusermount' is in '/bin/'. But still, I need do this every time I reboot my machine. Any further ideas? Thanks.

AG


I found that "T" is the sticky bit.

The Posix standard says that if the sticky bit is set on a directory, mere write permission on the directory is no longer enough to allow files to be removed. You must additionally own the file or own the directory. root continues to be able to delete from any directory regardless of permissions.


I would recommend to try to remove the sticky bit and see what happens:
Code: Select all
$ chmod -t /dev/fuse


More info: http://www.thegeekstuff.com/2011/02/sti ... tory-file/
chulai
 
Posts: 464
Joined: Sat Jan 08, 2011 10:11 pm

Re: GoldenDict Portable Linux available - Early Access Build

Postby agrothendieck » Sun Jul 08, 2012 6:19 pm

chulai wrote:
I found that "T" is the sticky bit.

The Posix standard says that if the sticky bit is set on a directory, mere write permission on the directory is no longer enough to allow files to be removed. You must additionally own the file or own the directory. root continues to be able to delete from any directory regardless of permissions.


I would recommend to try to remove the sticky bit and see what happens:
Code: Select all
$ chmod -t /dev/fuse


More info: http://www.thegeekstuff.com/2011/02/sti ... tory-file/


Thanks. I tried removing the sticky bit. But it would be restored to "T" after reboot. Would it be a problem there is no /usr/bin/fusermount but a /bin/fusermount?
agrothendieck
 
Posts: 10
Joined: Sun May 29, 2011 5:45 am

Re: GoldenDict Portable Linux available - Early Access Build

Postby vjjustin » Mon Jul 09, 2012 11:24 am

Hi,
I am using Fedora 17 64 bit with this portable access build. I also have latest version (1.0.1) from the repo installed.

When I run the portable version, the sound files do not get played. The same sound files do get played using the installed version.
Please see the console outputs below. (I am using mplayer backend for the examples.)

GoldenDict portable version:
Code: Select all
====reading 16384 bytes
getResource: gico://3fd879e79122c2bbcbb3e799b4f71f56/
scheme: gico
host: 3fd879e79122c2bbcbb3e799b4f71f56
In-place finish.
====reading 16384 bytes
====reading 16384 bytes
====reading 16384 bytes
clicked  QUrl( "gdau://839fea436927cfc96deff7176a47fdd3/bre_preference0205.wav" ) 
getResource: gdau://839fea436927cfc96deff7176a47fdd3/bre_preference0205.wav
scheme: gdau
host: 839fea436927cfc96deff7176a47fdd3
n is /mnt/Media/Dictionary/En-En Longman DOCE5 03-06-2009/bre_preference0205.wav
/tmp/gd-wXF11469.wav


GoldenDict repo version:
Code: Select all
====reading 31724 bytes
clicked gdau://839fea436927cfc96deff7176a47fdd3/bre_preference0205.wav
getResource: gdau://839fea436927cfc96deff7176a47fdd3/bre_preference0205.wav
scheme: gdau
host: 839fea436927cfc96deff7176a47fdd3
n is /mnt/Media/Dictionary/En-En Longman DOCE5 03-06-2009/bre_preference0205.wav
/tmp/gd-XMT11504.wav
Deleting external viewer


I don't see any differences except the temp (wav) file name differences (which I believe is usual) and the 'deleting external viewer' bit in the repo version which is missing in the portable version. Any idea why it do not play the sound file in the portable version?
vjjustin
 
Posts: 45
Joined: Wed Feb 08, 2012 7:59 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 20 guests

cron