Score:0

Snap apps can't connect to VNC display

it flag

I have several snap apps running nicely in Ubuntu 20.04 (using the default Gnome Desktop). However, on a TigerVNC-Server on that PC (that uses XFCE4), most of the snap apps don't even launch. According to the error messages, at least one problem seems to be the connection to the VNC-server display (:37 for my server). Does anyone have suggestions how to make snaps work on the VNC display?

Here some information:

The VNC server is startet using vncserver -localhost no :37

Snaps installed are:

$ snap list
Name                Version                     Rev    Tracking         Publisher       Notes
cherrytree          0.99.36                     40     latest/stable    hellsworth      -
chromium            91.0.4472.106               1637   latest/stable    canonical✓      -
core                16-2.51                     11187  latest/stable    canonical✓      core
core18              20210507                    2066   latest/stable    canonical✓      base
eclipse             2019-12                     48     latest/stable    snapcrafters    classic
gnome-3-28-1804     3.28.0-19-g98f9e67.98f9e67  145    latest/stable    canonical✓      -
gnome-3-34-1804     0+git.3556cb3               72     latest/stable/…  canonical✓      -
gtk-common-themes   0.1-52-gb92ac40             1515   latest/stable/…  canonical✓      -
gtk2-common-themes  0.1                         13     latest/stable    canonical✓      -
jabref              5.2.60000                   1021   latest/stable    koppor          -
keepassxc           2.6.6                       1522   latest/stable    keepassxreboot  -
pdftk               2.02-4                      9      latest/stable    smoser          -
snap-store          3.38.0-64-g23c4c77          547    latest/stable/…  canonical✓      -
snapd               2.51                        12159  latest/stable    canonical✓      snapd

pdftk, chromium and eclipse work, so it doesn't seem to be a general problem with snaps. However, I got the following errors for other snaps which run without any problem on the host system.

$ keepassxc
No protocol specified
qt.qpa.screen: QXcbConnection: Could not connect to display :37.0
Could not connect to any X display.
$ jabref
Picked up _JAVA_OPTIONS: -Duser.home=/home/ludwig/snap/jabref/1021
ERROR StatusLogger Unrecognized format specifier [d]
ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [thread]
ERROR StatusLogger Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [level]
ERROR StatusLogger Unrecognized conversion specifier [level] starting at position 35 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [logger]
ERROR StatusLogger Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [msg]
ERROR StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [n]
ERROR StatusLogger Unrecognized conversion specifier [n] starting at position 56 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [d]
ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [thread]
ERROR StatusLogger Unrecognized conversion specifier [thread] starting at position 25 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [level]
ERROR StatusLogger Unrecognized conversion specifier [level] starting at position 35 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [logger]
ERROR StatusLogger Unrecognized conversion specifier [logger] starting at position 47 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [msg]
ERROR StatusLogger Unrecognized conversion specifier [msg] starting at position 54 in conversion pattern.
ERROR StatusLogger Unrecognized format specifier [n]
ERROR StatusLogger Unrecognized conversion specifier [n] starting at position 56 in conversion pattern.
No protocol specified
No protocol specified
Exception in thread "main" java.lang.UnsupportedOperationException: Unable to open DISPLAY
    at [email protected]/com.sun.glass.ui.gtk.GtkApplication.lambda$new$6(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at [email protected]/com.sun.glass.ui.gtk.GtkApplication.<init>(Unknown Source)
    at [email protected]/com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(Unknown Source)
    at [email protected]/com.sun.glass.ui.Application.run(Unknown Source)
    at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.startup(Unknown Source)
    at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
    at [email protected]/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
    at [email protected]/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
    at [email protected]/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
    at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)

$ cherrytree
No protocol specified
/snap/cherrytree/40/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:69: Warning: invalid (NULL) pointer instance
  self.window = gtk.Window()
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:69: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  self.window = gtk.Window()
/snap/cherrytree/40/usr/share/cherrytree/modules/clipboard.py:93: GtkWarning: IA__gtk_clipboard_get_for_display: assertion 'display != NULL' failed
  self.clipboard = gtk.clipboard_get()
missing /home/schroeder_l/snap/cherrytree/40/.config/cherrytree/config.cfg
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:114: Warning: invalid (NULL) pointer instance
  vbox_main.pack_start(self.ui.get_widget("/MenuBar"), False, False)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:114: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  vbox_main.pack_start(self.ui.get_widget("/MenuBar"), False, False)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:114: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  vbox_main.pack_start(self.ui.get_widget("/MenuBar"), False, False)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:114: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  vbox_main.pack_start(self.ui.get_widget("/MenuBar"), False, False)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:114: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  vbox_main.pack_start(self.ui.get_widget("/MenuBar"), False, False)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:114: GtkWarning: IA__gdk_screen_get_display: assertion 'GDK_IS_SCREEN (screen)' failed
  vbox_main.pack_start(self.ui.get_widget("/MenuBar"), False, False)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:114: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
  vbox_main.pack_start(self.ui.get_widget("/MenuBar"), False, False)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:119: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  self.scrolledwindow_tree = gtk.ScrolledWindow()
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:121: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  self.scrolledwindow_text = gtk.ScrolledWindow()
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:173: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  self.treeview.append_column(self.column)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:173: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  self.treeview.append_column(self.column)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1309: Warning: invalid (NULL) pointer instance
  self.node_menu_tree = gtk.Menu()
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1309: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  self.node_menu_tree = gtk.Menu()
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1274: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  menu_item = gtk.ImageMenuItem(attributes[1])
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1274: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  menu_item = gtk.ImageMenuItem(attributes[1])
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1274: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  menu_item = gtk.ImageMenuItem(attributes[1])
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1276: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  menu_item.set_image(gtk.image_new_from_stock(attributes[0], gtk.ICON_SIZE_MENU))
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1276: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  menu_item.set_image(gtk.image_new_from_stock(attributes[0], gtk.ICON_SIZE_MENU))
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1276: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  menu_item.set_image(gtk.image_new_from_stock(attributes[0], gtk.ICON_SIZE_MENU))
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1265: Warning: invalid (NULL) pointer instance
  curr_submenu = gtk.Menu()
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1265: Warning: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
  curr_submenu = gtk.Menu()
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1266: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  menu_item = gtk.ImageMenuItem(attributes[1])
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1266: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  menu_item = gtk.ImageMenuItem(attributes[1])
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1266: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  menu_item = gtk.ImageMenuItem(attributes[1])
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1267: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  menu_item.set_image(gtk.image_new_from_stock(attributes[2], gtk.ICON_SIZE_MENU))
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1267: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  menu_item.set_image(gtk.image_new_from_stock(attributes[2], gtk.ICON_SIZE_MENU))
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:1267: Warning: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'
  menu_item.set_image(gtk.image_new_from_stock(attributes[2], gtk.ICON_SIZE_MENU))
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: GtkWarning: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: PangoWarning: pango_context_set_font_description: assertion 'context != NULL' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: PangoWarning: pango_context_set_base_dir: assertion 'context != NULL' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: PangoWarning: pango_context_set_language: assertion 'context != NULL' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: Warning: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: GtkWarning: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: GtkWarning: IA__gdk_screen_get_display: assertion 'GDK_IS_SCREEN (screen)' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: GtkWarning: IA__gdk_keymap_get_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
  self.scrolledwindow_text.add(self.sourceview)
/snap/cherrytree/40/usr/share/cherrytree/modules/core.py:213: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
  self.scrolledwindow_text.add(self.sourceview)
Segmentation fault (core dumped)

Might that problem only occur for snap apps that use GTK or Qt? Of the apps that run without problems pdftk is a command line tool and eclipse uses KDE (don't know for chromium).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.