Beginner question - Error with app integration with Distrobox [dpscreenocr]

I’m having a hard time integrating apps installed in my ubuntu disrobox…

For example I installed dpscreenocr following this link and created a shortcut the way @Casserole97 explained with:
distrobox-export --app dpscreenocr
Now when I click the shortcut I get this error:
Can't create backend: Wayland is not supported. Please switch to the X11/Xorg session.

I would know how to do it with a login screen but how does it work in an ubuntu distrobox? thanks


tried the following (but no /etc/gdm3/custom.conf):

  • Edit the GDM Configuration File: Run the following command to edit the GDM configuration file:
sudo nano /etc/gdm3/custom.conf

Here, sudo gives you superuser privileges, nano is a text editor, and /etc/gdm3/custom.conf is the path to the GDM configuration file.

  • Modify the File: In the file, find the line that starts with #WaylandEnable=false. Remove the # symbol at the beginning of the line to uncomment it. This will disable Wayland and enable Xorg.
  • Save and Exit: Save the changes to the file by pressing Ctrl+O, then exit the editor by pressing Ctrl+X.
  • Restart Your Computer: For the changes to take effect, you will need to restart your computer.

It should not be necessary to edit the gdm configuration.

I would know how to do it with a login screen but how does it work in an ubuntu distrobox? thanks

If you pick a X11 session at the GDM login screen, then the dpscreenocr software will also work. At least that’s my experience when I tried it myself. The software needs an X11-server to work and spinning up a XWayland instance is not something you can easily do on Bluefin.

The following worked for me after I logged in to a X11 Gnome session:

distrobox create --name dpscreen --image ubuntu:latest

distrobox enter dpscreen

cd some/directory/where/I/can/write

wget "https://github.com/danpla/dpscreenocr/releases/download/v1.4.1/dpScreenOCR-1.4.1-linux-x86_64.tar.xz"

tar xf dpScreenOCR-1.4.1-linux-x86_64.tar.xz

cd dpScreenOCR-1.4.1-linux-x86_64/

./dpscreenocr