I know that what I want to do is a bit unusual, but I have a need to run a quite old version of gThumb (2.10.11, coming from Ubuntu 10.04) on Ubuntu 20.04.
(Someone asked me in the comments why, so here's the explanation: that old version has a very good slideshow mode, which provides several features that the current version of gThumb present in Ubuntu 20.04 does not provide. Among them are: 1) option "fit to screen only for larger images" works in slideshow mode; 2) GIF animations are played in slideshow mode; 3) the shortcut key "I" - display information about the current image - works in slideshow mode. All this does NOT work in current gThumb).
Until now, I managed to collect all the old libraries needed to run this app into a single directory (so all dependencies are satisfied), the app starts and the GUI appears (screenshot below). However, the app is unable to communicate with current GNOME VFS daemon and therefore does not load the folder contents, so it is in fact unusable. The following error message appears in the terminal:
(gthumb:13485): libgnomevfs-WARNING **: 13:34:54.800: Failed to activate daemon: The name org.gnome.GnomeVFS.Daemon was not provided by any .service files
There is definitely some incompatibility between the old and new GNOME VFS daemon and the app cannot communicate with it. Is there any way to fix this and make the app run on my system - for example, by making the app don't use VFS but just directly read from disk instead? (except of having to rebuild the app myself, as I don't see this feasible)
As the issue is related to VFS, I tried to replace the libgnomevfs-2.so.0
library that I copied from Ubuntu 10.04 with the newest one I could find, that is from Ubuntu 18.04 (there is no libgnomevfs-2.so.0
library available for 20.04). However, the effect is the same. So the change to VFS must have occurred between 18.04 and 20.04.
You will break the operating system due to dependencies issues. Hence I suggest to: Download Ubuntu 10.04 from here. Install it in VM container and run the app in it.
I was able to solve the issue. The problem was that in addition to regular GNOME VFS daemon (
/usr/libexec/gvfsd
, or/usr/lib/gvfs/gvfsd
in older versions of Ubuntu), there was another daemon used by gThumb up to Ubuntu 18.04 -/usr/lib/gnome-vfs-2.0/gnome-vfs-daemon
. This daemon is not present anymore in Ubuntu 20.04, so the old gThumb is not able to access files/folders on disk. It was needed to copy the daemon to Ubuntu 20.04, so that the application can use it.The full solution to make the application run is as follows (this is long and probably nobody except me is interested in this, but as I solved the problem I post an answer, maybe somebody in the future can use it :)):
(BTW. I suppose that all this can be made into an AppImage package, if I only knew how to do it :))
/opt/gthumb_old
./opt/gthumb_old
(I had such an installation available; in case it isn't available, you need to identify packages containing these files, download them and extract the files, which requires more work):The above
/usr/lib/*.so.*
or/lib/*.so.*
files are symlinks to other files, so you have of course to copy the file the link points to, but the target name should be the one of the link. (If you usecp
orscp
to copy the above names, you don't have to worry about this, as this happens automatically.)You need also to symlink
/usr/lib/x86_64-linux-gnu/libjpeg.so.8
tolibjpeg.so.62
in/opt/gthumb_old
. The application expects to link tolibjpeg.so.62
but the originallibjpeg.so.62
library copied from Ubuntu 10.04 does not work properly and JPEG files are not displayed; so we will use the present system library instead.create a directory
/opt/gthumb_old/glade
and copy contents of/usr/share/gthumb/glade
from Ubuntu 10.04 installation to this directory.create a directory
/opt/gthumb_old/modules
and copy contents of/usr/lib/gthumb/modules
from Ubuntu 10.04 installation to this directory.create a directory
/opt/gthumb_old/vfs_modules
and copy contents of/usr/lib/gnome-vfs-2.0/modules
from Ubuntu 10.04 installation to this directory.create a directory
/opt/gthumb_old/modules_conf
and copy contents of/etc/gnome-vfs-2.0/modules
from Ubuntu 10.04 installation to this directory.create a subdirectory
.gtk-2.0/x86_64-pc-linux-gnu/engines
in your/home/username
directory and copy the file/usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so
from Ubuntu 10.04 to this directory. This is needed for menus and other UI gadgets to be displayed correctly (the application will work without this file, but the UI will be distorted a bit). If you don't have Adobe Reader 9 installed (the last available version for Linux), you can skip the intermediatex86_64-pc-linux-gnu
subdirectory and put the file just in.gtk-2.0/engines
. But if you have Adobe Reader installed (like I do), it needs a 32-bit version of the filelibmurrine.so
, which should be located in.gtk-2.0/i686-pc-linux-gnu/engines
, therefore it is better to use the "longer" version.create a symlink
/usr/share/gthumb/glade
pointing to/opt/gthumb_old/glade
.create a symlink
/usr/lib/gthumb/modules
pointing to/opt/gthumb_old/modules
(the directory/usr/lib/gthumb
does not exist in standard installation of Ubuntu 20.04, so you have to create it first)create a symlink
/usr/lib/gnome-vfs-2.0/modules
pointing to/opt/gthumb_old/vfs_modules
(the directory/usr/lib/gnome-vfs-2.0
does not exist in standard installation of Ubuntu 20.04, so you have to create it first)create a symlink
/etc/gnome-vfs-2.0/modules
pointing to/opt/gthumb_old/modules_conf
(the directory/etc/gnome-vfs-2.0
does not exist in standard installation of Ubuntu 20.04, so you have to create it first)create a script
/opt/gthumb_old/gvfsd_wrapper
with the following contents (the file must be executable):/usr/share/dbus-1/services/gnome-vfs-daemon.service
from Ubuntu 10.04 to the same directory on Ubuntu 20.04 (/usr/share/dbus-1/services
), then edit it as follows. The original file has the following contents:Change it to:
/usr/local/bin/gthumb_old
to run the application:(you can also create a launcher in menu or GNOME panel referring to this script).
The application does not conflict with the existing gThumb 3.8.0 from Ubuntu 20.04 as it stores its configuration data in a different place. Both can be used independently, but there is one possible problem described below.
Note that the application crashes in an image directory that has a
.comments
subdirectory containing comments created by newer version of gThumb. So in case when the application crashes after entering some directory, you should delete the.comments
subdir.I also found a strange case with two particular image files (out of several thousand I have). The application crashed in a directory that contained symlinks to these two files that were in another directory (when I replaced the symlinks with copies of the files or hard links, there was no crash - it happened on those two files only). If you don't have any symlinks in your image dirs, this problem should not appear.
Final screenshot of the working application: