Ubuntu – How to install LDOCE5 Viewer on Ubuntu 20.04 64 bit

20.04software installation

I have installed ldoce5 viewer on Ubuntu 18.04 and Ubuntu 16.04 following this guide before with no problem at all, but now I have installed Ubuntu 20.04.

And so I wanted to install ldoce5 viewer following the same guide, but I it seems that some required packages for installing ldoce5 viewer, are missing or deleted from Ubuntu 20.04 repository, and therefor I can not install ldoce5 viewer.

So now that Ubuntu 20.04 has been released, How can we install this dictionary on it, without using Wine?

EDIT:
and my output is

mustafa@T440p:~$ export | grep SESSION
declare -x DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
declare -x DESKTOP_SESSION="ubuntu"
declare -x GDMSESSION="ubuntu"
declare -x GNOME_DESKTOP_SESSION_ID="this-is-deprecated"
declare -x GNOME_SHELL_SESSION_MODE="ubuntu"
declare -x SESSION_MANAGER="local/T440p:@/tmp/.ICE-unix/8283,unix/T440p:/tmp/.ICE-unix/8283"
declare -x XDG_SESSION_CLASS="user"
declare -x XDG_SESSION_DESKTOP="ubuntu"
declare -x XDG_SESSION_TYPE="x11"

Best Answer

  • The Qt4 library is obsolete, so it was removed from Ubuntu 20.04 LTS. Its manual installation is very difficult and long process.

    So I would recommend to use schroot in this case.
    We will install Ubuntu 18.04 LTS into it and follow my previous method.

    We need to create and configure schroot first:

    sudo apt-get install schroot debootstrap -y
    
    cat <<EOF | sudo tee /etc/schroot/chroot.d/bionic.conf
    [bionic]
    description=Ubuntu 18.04 bionic
    directory=/srv/chroot/bionic
    root-users=$USER
    type=directory
    users=$USER
    EOF
    
    sudo mkdir -p /srv/chroot/bionic
    sudo debootstrap bionic /srv/chroot/bionic
    
    cat <<EOF | sudo tee /srv/chroot/bionic/etc/apt/sources.list
    deb http://archive.ubuntu.com/ubuntu bionic main universe multiverse
    deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
    EOF
    
    schroot -c bionic -u root apt-get update
    schroot -c bionic -u root apt-get install git make pyqt4-dev-tools python-lxml \
    python-whoosh libqt4-opengl python-gst-1.0 wget sudo \
    libcanberra-gtk3-module libcanberra-gtk-module desktop-file-utils
    
    cd ~/Downloads
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-qt4/pyqt4-dev-tools_4.11.4+dfsg-1build4_amd64.deb
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-qt4/python-qt4_4.11.4+dfsg-1build4_amd64.deb
    wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sip4/python-sip_4.17+dfsg-1build1_amd64.deb
    wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qtwebkit-source/libqtwebkit4_2.3.2-0ubuntu11_amd64.deb
    wget http://security.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb
    wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-qt4/python-qt4-phonon_4.11.4+dfsg-1build4_amd64.deb
    
    schroot -c bionic -u root apt-get install ./*.deb
    

    Then download source code of Ldoce:

    schroot -c bionic -u root git clone https://github.com/ciscorn/ldoce5viewer.git /usr/local/ldoce5viewer
    schroot -c bionic -u root -d /usr/local/ldoce5viewer/ make
    schroot -c bionic -u root -d /usr/local/ldoce5viewer/ make install
    

    To run LDOCE 5 Viewer use

    schroot -c bionic -u $USER env DISPLAY=$DISPLAY ldoce5viewer
    

    Optionally you can create desktop application shortcut with this command inside.

  • Related Question