Score:0

I want to run an old GNOME app

cn flag
raj

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

enter image description here

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.

Nmath avatar
ng flag
Bad idea. You will break your system because the dependencies are not going to work out. I suggest doing this in a VM container so that it won't damage your system installation. If you are using an EOL version of Ubuntu in the container, make sure that networking is disabled in the VM.
Nmath avatar
ng flag
This also seems like an [XY Problem](https://meta.stackexchange.com/a/66378). Why do you think you need a ten year old image viewer? What is the *actual* problem that you are experiencing?
N0rbert avatar
zw flag
Do you realize that normal modern precompiled deb-package exists at https://packages.ubuntu.com/focal/gthumb ? What is your final idea with running software from Ubuntu Lucid Lynx (2010 year)?
raj avatar
cn flag
raj
@Nmath I used a lot the gThumb slideshow option in 10.04 and there are several features that current gThumb does **not** provide in slideshow mode (an option "fit to screen only for larger images" can be used; GIF animations are played in slideshow mode; the "I" key works); shortly speaking, the current version of gThumb is far worse than the old one. Therefore I want to run the old one.
raj avatar
cn flag
raj
@Nmath Also, as I already wrote, I was able to fulfill the dependencies, the application runs and does not complain about any missing library (I just put all the required libraries into the same dir as the `gthumb` binary and run it with `LD_LIBRARY_PATH` set to that directory). It "only" can't communicate with the recent GNOME backend. I am interested if this can be soved somehow.
us flag
GNOME devs have been removing a lot of useful features lately. Try Eye of MATE. `sudo apt install eom-common`
Score:0
cn flag
raj

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 :))

  1. create a directory for the old gThumb application, for example /opt/gthumb_old.
  2. from working installation of 64-bit Ubuntu 10.04, copy the following files to /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):
/usr/bin/gthumb
/usr/lib/gthumb/libgthumb.so
/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so
/usr/lib/glade/2.0/libbonobo.so
/usr/lib/glade/2.0/libcanvas.so
/usr/lib/glade/2.0/libgnome.so
/usr/lib/gnome-vfs-2.0/gnome-vfs-daemon
/usr/lib/libart_lgpl_2.so.2
/usr/lib/libaudiofile.so.0
/usr/lib/libbonobo-2.so.0
/usr/lib/libbonobo-activation.so.4
/usr/lib/libbonoboui-2.so.0
/usr/lib/libcanberra-gtk.so.0
/usr/lib/libcanberra.so.0
/usr/lib/libesd.so.0
/usr/lib/libfam.so.0
/lib/libgcrypt.so.11
/usr/lib/libglade-2.0.so.0
/usr/lib/libgnome-2.so.0
/usr/lib/libgnomecanvas-2.so.0
/usr/lib/libgnome-keyring.so.0
/usr/lib/libgnomeui-2.so.0
/usr/lib/libgnomevfs-2.so.0
/usr/lib/libgnutls.so.26
/usr/lib/libhal-storage.so.1
/usr/lib/libhal.so.1
/usr/lib/libiptcdata.so.0
/usr/lib/libopenrawgnome.so.1
/usr/lib/libopenraw.so.1
/usr/lib/libORBit-2.so.0
/usr/lib/libORBitCosNaming-2.so.0
/lib/libpng12.so.0
/usr/lib/libtasn1.so.3
/usr/lib/libtiff.so.4

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 use cp or scp 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 to libjpeg.so.62 in /opt/gthumb_old. The application expects to link to libjpeg.so.62 but the original libjpeg.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.

  1. create a directory /opt/gthumb_old/glade and copy contents of /usr/share/gthumb/glade from Ubuntu 10.04 installation to this directory.

  2. create a directory /opt/gthumb_old/modules and copy contents of /usr/lib/gthumb/modules from Ubuntu 10.04 installation to this directory.

  3. 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.

  4. 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.

  5. 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 intermediate x86_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 file libmurrine.so, which should be located in .gtk-2.0/i686-pc-linux-gnu/engines, therefore it is better to use the "longer" version.

  6. create a symlink /usr/share/gthumb/glade pointing to /opt/gthumb_old/glade.

  7. 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)

  8. 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)

  9. 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)

  10. create a script /opt/gthumb_old/gvfsd_wrapper with the following contents (the file must be executable):

#!/bin/sh
GVFSD_DIR=`/usr/bin/dirname $0`
LD_LIBRARY_PATH=${GVFSD_DIR} ${GVFSD_DIR}/gnome-vfs-daemon
  1. copy the file /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:
[D-BUS Service]
Name=org.gnome.GnomeVFS.Daemon
Exec=/usr/lib/gnome-vfs-2.0/gnome-vfs-daemon

Change it to:

[D-BUS Service]
Name=org.gnome.GnomeVFS.Daemon
Exec=/opt/gthumb_old/gvfsd_wrapper
  1. Finally, create a script /usr/local/bin/gthumb_old to run the application:
#!/bin/sh
LD_LIBRARY_PATH=/opt/gthumb_old /opt/gthumb_old/gthumb

(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:

enter image description here

Score:0
de flag

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.

raj avatar
cn flag
raj
You are wrong, as - as I already wrote - I was able to fulfill all dependencies and the application **does run** and **does not complain about any missing library**. It only fails on interaction with current GNOME backend. I am interested if this can be solved somehow.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.