Urbackupclientgui GTK+ error in Debian 10

Hi!

I have followed instructions to compile and install urbackupclient in Debian 10, it looks like it runs fine, but when I try to access to “Add/Remove backups paths” or “Settings” I got this error in terminal (and no window opens):

Could not load password file!
gksudo: not found
kdesudo: not found
gksu: not found
kdesu: not found
No protocol specified
23:48:54: Error: Unable to initialize GTK+, is DISPLAY set properly?

I guess that since gksu and so on are deprecated it should be run with pkexec?

That or hack about with lxqt-sudo which can substitute for gksu et. al. pulls in various qt deps though, & you may need to manually create a sym-link to make it be triggered in place of one of the other items listed as “not found” if you go that route rather than pkexec.

It looks like lxqt doesn’t work either… maybe the issue is wayland?

Wayland you’ll need the pkexec route, or plain old sudo in a terminal, lxqt-sudo won’t work with that, only under X.

I have create this policy (/usr/share/polkit-1/actions/com.debian.urbackupclientgui.policy)

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE policyconfig PUBLIC “-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN” “http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd”>
<policyconfig><action id=”com.debian.urbackupclientgui“>
  <description xml:lang=”es”>Runr urBackup Client Gui as root</description>
  <message xml:lang=”es”>Authenticaiton needed to run urBackup Client Gui</message>
  <icon_name>evolution</icon_name>
  <defaults>
    <allow_any>no</allow_any>
    <allow_inactive>auth_admin</allow_inactive>
    <allow_active>auth_admin</allow_active>
  </defaults>
  <annotate key=”org.freedesktop.policykit.exec.path”>/usr/local/bin/urbackupclientgui</annotate>
  <annotate key=”org.freedesktop.policykit.exec.allow_gui”>true</annotate>
</action></policyconfig>

But I still get this error after entering the password:
Error: Unable to initialize GTK+, is DISPLAY set properly?

Am I missing something?

I don’t know tbh, it’s a couple of years since I last played with policykit & even then it usually took me nine attempts to make anything work, you’ll need someone more up to date with Linux than me I suspect.

Can you start the gui from a terminal?
What about using sudo there?

I’m rusty & somewhat out of my depth, it’s a miracle I remembered lxqt-sudo as a substitute for gksu :upside_down_face:

About all I can offer as out of date & practice as I am, is a link to the manpage for pkexec.
pkexec(1): Execute command as another user - Linux man page (die.net)
I’m really much more familiar with Windows, hopefully someone will happen along who can help more.

Hi there,
working in Ubuntu 21.10 (Ubuntu Default Gnome Desktop Environment) it seems not a to be a Wayland issue because in a Wayland session the tray icon does not show up instead a is thrown at me, see: Client GUI on Ubuntu 21.10 in a Wayland session shows GTK assertion error
With a Xorg session, I can reproduce the "Could not load password file! " error @joe mentioned in the top posting of this thread.

Hi there,
For Ubuntu 21.10 (Ubuntu default Gnome environment) I found a workaround for that daunting "Could not load password file! " error showing up when one tries to open Settings or Backup Paths in the Client GUI tray icon. The workaround is inspiured/based on the zensu package (https://github.com/Chrysostomus/zensu) which is a simple gksu replacement. The zensu package is available for installation on Manjaro or Arch Linux distros but I could not find it for Ubuntu/Debian. With zensu in place, it brings up a Zenity dialog box asking for the root password when selecting Settings or Backup Paths etc. in the tray icon. However, it is a rather straightforward:

  1. Create a file called “zensu” and paste the raw content of https://github.com/Chrysostomus/zensu/blob/master/zensu.sh to it:
    1a. sudo nano /usr/bin/zensu
    1b. Paste the raw content of zensu from GitHub to it
    1c. save and close zensu

  2. Maken zensu executable: sudo chmod +x /usr/bin/zensu

  3. Create a symlink: sudo ln -s /usr/bin/zensu /usr/bin/gksu

  4. reboot your system