Cannot install a usable version of Paperwork on KDE Kubuntu 20.04 by any means [SOLVED]

In a very unexpected situation, I cannot install a usable paperwork by any available means:

  1. From the Ubuntu repository version 1.3.1 - installs, but does not run; error is:

Unable to init server: Could not connect: Connection refused
(work.openpaper.Paperwork:911301): Gtk-WARNING **: 14:44:27.097: cannot open display:


  1. Flatpak installs (following directions here: doc/install.flatpak.markdown · master · World / OpenPaperwork / paperwork · GitLab), but fails to successfully run. Link to log: Dropbox Link to Log file(s)

  2. Building from master git source (following directions here: doc/install.devel.markdown · master · World / OpenPaperwork / paperwork · GitLab) appears to install, but also fails to run. I’ve used cli redirects to capture all output from each install command. Link to these logs: Dropbox Link to Log file(s)

When I try to run this built-from-git I see:

(venv) √ paperwork >
zsh: permission denied: ./paperwork-gtk
(venv) ?126 paperwork > sudo
[sudo] password for guyst:
sudo: ./paperwork-gtk: command not found


  1. Installing via pip produces much the same kind of error output as above (log file also at linked Dropbox folder).

I’m a bit stymied why nothing works on this kubuntu 20.04 installation which a standard accept-all-prompts install. I’ve not done anything odd, just installed apps using the package manager. And both v1.3.1 and the dev version from git source worked fine on this hardware when it was a xubuntu 20.04 install several days ago (I reinstalled kubuntu because of xubuntu sound issues I could not resolve), and work fine when I boot into Windows 10 under WSL2!

At present only the pip version is currently installed (removed each as I tried the others).

Jerome? Any ideas?




cannot open display:

For some reason, it’s trying to connect to your X server using TCP/IP instead of the local Unix socket (I’m guessing your environment variable DISPLAY is probably set to some weird value like instead of :0 or :1).
I’m unsure what caused this problem in a first place, but I think the following may help you: command line - Can't launch graphical apps from terminal after updating to 15.10 - Ask Ubuntu
Can you start any other graphical applications from your terminal ?

  1. Flatpak installs (…)

The logs in your Flatpak installation start with:

Unable to init server: Could not connect: Connection refused

This is likely to be the very same problem.

  1. Building from master git source

TL;DR: Just remove the ./ (it’s not in the instructions … :slight_smile: )

When you run source ./, it modifies your environment variable PATH. By doing so it, your shell can find the commands paperwork-gtk and paperwork-cli wherever make install installed them.
If you specify ./, you force your shell to ignore the variable PATH and look in the current directory only instead. If you run ls, you will see that there is a directory paperwork-gtk in the current directory → You basically told your shell to run the directory paperwork-gtk, and that’s why it replied with permission denied (not the most explicit error in this case …).
Running sudo probably changed your current work directory (probably cd $HOME), that’s why you got command not found instead permission denied.

Best regards,

Jerome - excellent analysis. It was indeed my .zshrc file that had some explicit entries related to my environment ond of which set the DISPLAY env var. I re-ran the zsh reconfigure and edited my .zshrc to include only necessary alias lines, etc.

  1. The pip install did not find my installed Brother scanner, so I ditched it.
  2. The repository install of v1.3.1 failed to run with a paperwork-backend-commons error, so I ditched it as well
  3. I have a working version following the guide for building and running the development branch!

Much thanks.