application has conniptions when not run as X11 owner

Issues related to applications and software problems and general support
Post Reply
mathog
Posts: 211
Joined: 2008/07/09 23:52:06

application has conniptions when not run as X11 owner

Post by mathog » 2020/07/30 16:48:43

I like the "meld" program

https://meldmerge.org/

for doing graphical diffs (side by side display with differences marked). It isn't available on CentOS 8 (last I looked) so it was installed like this:

Code: Select all

#as root
cd /tmp
wget https://download.gnome.org/sources/meld/3.20/meld-3.20.2.tar.xz
unxz meld-3.20.2.tar.xz
tar -xf meld-3.20.2.tar.
cd meld-3.20.2
dnf install intltool  #if not already installed
python3 setup.py install --prefix=/usr
#3.20.2 is still the current version as this is posted
This system boots without X11 running, login as "root", then start X11 with "startxfce4". If meld is then run from one of root's terminals there are no obvious problems, no warnings in the terminal, no barrage of warnings in /var/log/messages, and no xdg processes start when meld runs.

However, most of the work on this system is not done as "root", instead account "modules" is used. All hell breaks loose when meld is run from that account when "root" owns X11. In the end it works but on the sidelines it is like a food fight in an elementary school cafeteria. Example:

Code: Select all

#starting in one of root's terminals
ssh -Y modules@localhost
#now as modules
meld one two
#emits:
(meld:2869): dbind-WARNING **: 09:18:29.352: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
#starts these (from ps -ef):
modules     2838    1683  0 09:17 ?        00:00:00 /usr/libexec/xdg-desktop-portal
modules     2842    1683  0 09:17 ?        00:00:00 /usr/libexec/xdg-document-portal
modules     2845    1683  0 09:17 ?        00:00:00 /usr/libexec/xdg-permission-store
#but xdg-desktop-portal soon times out (see below), while the other two continue
#running, and they stay there after meld exits.  They only go away when the ssh
#session ends.  
export NO_AT_BRIDGE=1
meld one two
#suppresses the dbind-WARNING but now in /var/log/messages these appear
Jul 30 09:23:52 poweredge systemd[2990]: Starting Mark boot as successful...
Jul 30 09:23:52 poweredge systemd[2990]: Started Mark boot as successful.
Jul 30 09:23:55 poweredge dbus-daemon[3059]: [session uid=3872 pid=3059] Activating via systemd: service name='org.freedesktop.portal.Desktop' unit='xdg-desktop-portal.service' requested by ':1.2' (uid=3872 pid=3114 comm="/usr/bin/python3 /usr/bin/meld one two " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jul 30 09:23:55 poweredge systemd[2990]: Starting Portal service...
Jul 30 09:23:55 poweredge dbus-daemon[3059]: [session uid=3872 pid=3059] Activating via systemd: service name='org.freedesktop.portal.Documents' unit='xdg-document-portal.service' requested by ':1.3' (uid=3872 pid=3118 comm="/usr/libexec/xdg-desktop-portal " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jul 30 09:23:55 poweredge systemd[2990]: Starting flatpak document portal service...
Jul 30 09:23:55 poweredge dbus-daemon[3059]: [session uid=3872 pid=3059] Activating via systemd: service name='org.freedesktop.impl.portal.PermissionStore' unit='xdg-permission-store.service' requested by ':1.4' (uid=3872 pid=3122 comm="/usr/libexec/xdg-document-portal " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jul 30 09:23:55 poweredge systemd[2990]: Starting sandboxed app permission store...
Jul 30 09:23:55 poweredge dbus-daemon[3059]: [session uid=3872 pid=3059] Successfully activated service 'org.freedesktop.impl.portal.PermissionStore'
Jul 30 09:23:55 poweredge systemd[2990]: Started sandboxed app permission store.
Jul 30 09:23:55 poweredge dbus-daemon[3059]: [session uid=3872 pid=3059] Successfully activated service 'org.freedesktop.portal.Documents'
Jul 30 09:23:55 poweredge systemd[2990]: Started flatpak document portal service.
Jul 30 09:23:55 poweredge dbus-daemon[3059]: [session uid=3872 pid=3059] Activating via systemd: service name='org.freedesktop.impl.portal.desktop.gtk' unit='xdg-desktop-portal-gtk.service' requested by ':1.3' (uid=3872 pid=3118 comm="/usr/libexec/xdg-desktop-portal " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jul 30 09:23:55 poweredge systemd[2990]: Starting Portal service (GTK+/GNOME implementation)...
Jul 30 09:23:55 poweredge xdg-desktop-portal-gtk[3135]: Unable to init server: Could not connect: Connection refused
Jul 30 09:23:55 poweredge journal[3135]: cannot open display: 
Jul 30 09:23:55 poweredge systemd[2990]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
Jul 30 09:23:55 poweredge systemd[2990]: xdg-desktop-portal-gtk.service: Failed with result 'exit-code'.
Jul 30 09:23:55 poweredge systemd[2990]: Failed to start Portal service (GTK+/GNOME implementation).
Jul 30 09:24:21 poweredge dbus-daemon[756]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.86' (uid=3872 pid=3114 comm="/usr/bin/python3 /usr/bin/meld one two " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jul 30 09:24:21 poweredge systemd[1]: Starting Hostname Service...
Jul 30 09:24:21 poweredge dbus-daemon[756]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jul 30 09:24:21 poweredge systemd[1]: Started Hostname Service.
What flatpak has to do with any of this is a mystery, but it happens each time meld is started (at least if no xdg processes are running). Sometimes it also gets into a state where this message is logged once a minute to /var/log/messages

Code: Select all

Jul 29 16:03:08 poweredge journal[11866]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: Cannot invoke method; proxy is for a well-known name without an owner and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag
Here:

https://github.com/flatpak/xdg-desktop- ... issues/215

it was suggested that the command:

Code: Select all

gsettings set org.gnome.shell introspect true
would suppress some of the messages. Perhaps it does, but there are still a torrent of them.

In short, this is a mess. Can somebody please see if the same thing happens on another XFCE4 CentOS 8 system? Specifically, A owns X11 and B (in a terminal) tries to start meld.

Thanks.

mathog
Posts: 211
Joined: 2008/07/09 23:52:06

Re: application has conniptions when not run as X11 owner

Post by mathog » 2020/07/30 17:35:26

More info. When "modules" runs startxfce4 and "root" runs meld in an ssh session things are slightly different.

Code: Select all

1. The warning sent to the terminal when meld starts does not appear.
2. These start and stay running (note, one extra process):
root        4618    1232  0 10:22 ?        00:00:00 /usr/libexec/xdg-desktop-portal
root        4622    1232  0 10:22 ?        00:00:00 /usr/libexec/xdg-document-portal
root        4625    1232  0 10:22 ?        00:00:00 /usr/libexec/xdg-permission-store
root        4634    1232  0 10:22 ?        00:00:00 /usr/libexec/xdg-desktop-portal-gtk
3. /var/log/messages immediately starts having:
Jul 30 10:26:56 poweredge journal[4618]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: Cannot invoke method; proxy is for a well-known name without an owner and proxy was constructed wit

mathog
Posts: 211
Joined: 2008/07/09 23:52:06

Re: application has conniptions when not run as X11 owner

Post by mathog » 2020/07/31 17:34:08

If instead of "ssh -Y modules@localhost" one uses "su - modules", and then sets DISPLAY this happens when "meld" runs:

Code: Select all

1.  meld warning message occurs
(meld:22468): dbind-WARNING **: 10:25:47.994: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
2.  all 4 xdg applications start
modules    22474       1  0 10:25 ?        00:00:00 /usr/libexec/xdg-desktop-portal
modules    22479       1  0 10:25 ?        00:00:00 /usr/libexec/xdg-document-portal
modules    22483       1  0 10:25 ?        00:00:00 /usr/libexec/xdg-permission-store
modules    22494       1  0 10:25 ?        00:00:00 /usr/libexec/xdg-desktop-portal-gtk
3.  every minute one of these appears in /var/log/messages
Jul 31 10:19:16 poweredge journal[22337]: Failed to get application states: GDBus.Error:org.freedesktop.portal.Error.Failed: Could not get window list: Cannot invoke method; proxy is for a well-known name without an owner and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag
If before meld is run this command is executed:

Code: Select all

gsettings set org.gnome.shell introspect true
then /usr/libexec/xdg-desktop-portal-gtk does not start and /usr/libexec/xdg-desktop-portal
times out.

Post Reply

Return to “CentOS 8 - General Support”