You are not logged in.
I'm using Gnome. I'm trying to run an app as another user with Wayland. I have provided access to dconf dir and Wayland socket in $XDG_RUNIME_DIR to the secondary user I try to run the app as.
I have tried xfce4-terminal, Firefox and electron20 with the ozone-platform args, all of these give the same error about assertion failing.
(xfce4-terminal:3030): Gdk-WARNING **: 09:48:37.311: Failed to load cursor theme Adwaita
(xfce4-terminal:3030): Gdk-WARNING **: 09:48:37.343: Failed to load cursor theme Adwaita
Failed to connect to session manager: Failed to connect to the session manager: None of the authentication protocols specified are supported
(xfce4-terminal:3030): xfconf-CRITICAL **: 09:48:37.351: xfconf_init() must be called before attempting to use libxfconf!
(xfce4-terminal:3030): GLib-GObject-WARNING **: 09:48:37.351: invalid (NULL) pointer instance
(xfce4-terminal:3030): GLib-GObject-CRITICAL **: 09:48:37.351: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(xfce4-terminal:3030): xfconf-CRITICAL **: 09:48:37.351: xfconf_init() must be called before attempting to use libxfconf!
(xfce4-terminal:3030): GLib-GIO-CRITICAL **: 09:48:37.351: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed
(xfce4-terminal:3030): GLib-CRITICAL **: 09:48:37.351: g_propagate_error: assertion 'src != NULL' failed
(xfce4-terminal:3030): xfconf-CRITICAL **: 09:48:37.351: xfconf_init() must be called before attempting to use libxfconf!
(xfce4-terminal:3030): GLib-GIO-CRITICAL **: 09:48:37.351: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed
(xfce4-terminal:3030): GLib-CRITICAL **: 09:48:37.351: g_propagate_error: assertion 'src != NULL' failed
**
Gdk:ERROR:../gtk/gdk/wayland/gdkdisplay-wayland.c:1205:_gdk_wayland_display_get_cursor_theme: assertion failed: (display_wayland->cursor_theme_name)
Bail out! Gdk:ERROR:../gtk/gdk/wayland/gdkdisplay-wayland.c:1205:_gdk_wayland_display_get_cursor_theme: assertion failed: (display_wayland->cursor_theme_name)
Aborted (core dumped)
I can cd to /usr/share/icons/Adwaita/cursors as the user and the icons have the correct permissions.
Previously I was also getting a warning in addition: "Unable to open $PRIMARY_USER_DIR/.local/share/flatpak/exports/share/dconf/profile/user" but I fixed it by re-installing Gnome without malcontent which depended on flatpak.
Any ideas what could be wrong? Thanks!
Offline
Status update;
- I'm not getting the session manager warning when loading Firefox, so it probably does not matter
- I can run xfce4-terminal in Wayland as root - possibly suggesting this could be a permission issue (but not necessarily, it could be that root is special for any other reason) - I did check that the sub-user has permissions to access Adwaita icons in /usr/share/icons
- Changing cursor theme in gnome-tweaks did not help and it still tries to load Adwaita in the sub-user. Also the root terminal that does open in Wayland uses Adwaita- makes me consider where the settings are defined for other users
Last edited by kox (2022-11-28 12:20:11)
Offline
I still can't get it to work after spending the whole day on it.
- I tried setting a different icon theme in the sub user with `gsettings set org.gnome.desktop.interface cursor-theme oreo_blue_cursors` but `gsettings get org.gnome.desktop.interface cursor-theme` returns Adwaita anyway. Sometimes, there's a warning about failing to set the values and connecting to dconf,but even when there's not it never works
- Even if I try XCURSOR_THEME=oreo_blue_cursors xfce4-terminal - it still mentions failing to load Adwaita theme
- I copied Adwaita to the primary user and the sub user local icons dir and tried to specify either by prepending XCURSOR_PATH=to the command and neither did work
I have run out of options. The only further considerations are is why the applications can be ran as root (is this a permission issue or just root being given special treatment) and why I can't override the option with gsettings set - plus the core issue, why is it not able to get cursor theme Adwaita if it's set.
Offline
I'm getting the same error in Sway.
Last edited by kox (2022-11-28 19:11:52)
Offline
This may be an X Y problem. What exactly are you trying to accomplish in the first place?
Additionally, if no one else has posted since your last post, just edit the post instead of serial posting please.
"the wind-blown way, wanna win? don't play"
Offline
I want to load apps as another user so they only have limited filesystem access. I already do this in X but I wanted to switch to Wayland precisely to increase security of the user-based app isolation approach. Yes, I'm aware that Flatpak exists.
It looks to be a bug. I was able to reproduce it on a clean install with nothing but Sway and Firefox installed and I was able to run non-gtk apps. I have created an issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/5390
Offline
I'm not trying to run the app as another user or anything, so feel free to let me know if this needs a separate thread, but I have the exact same assertion failure under wayland with Hyprland.
Pcmanfm runs fine, same for lxappearance, but pavucontrol, Firefox, and many others throw the error.
Waybar for example, will work until I pass the cursor on the bar... Wofi will not start either.
My custom environment variables are the following (and even if I don't set any, the bug persists):
export XDG_CURRENT_DESKTOP=Hyprland
export XDG_SESSION_DESKTOP=Hyprland
export XDG_SESSION_TYPE=wayland
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_QPA_PLATFORM="wayland;xcb"
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export QT_QPA_PLATFORMTHEME="qt5ct"
The only solution for now is to stay away from Gtk apps.
Interesting note, I'm not sure if it's related, but I do get a cursor theme error in the yambar logs:
info: bar/wayland.c:218: seat0: cursor theme: (null), size: 24, scale: 1
I would really like to find a solution. If anyone has any clues, I'd gladly provide more information and/or try whatever could help. For some reason, on my laptop, with pretty much the same setup and config files, I am not affected.
Last edited by DummyDukeDugan (2023-01-21 22:50:43)
Offline
I found a solution. I reset the cursor theme in all places I can find, and it prevents the assertion failure.
Details:
You need to decide on a valid icon theme from the /usr/share/icons/ folders (could very much work on the user side folder as well). These will have a cursor subfolder. Also pay attention to the available sizes of your theme (the other subfolders).
Then, edit its name and size in:
~/.config/gtk-3.0/settings.ini
.icons/default/index.theme (theme name goes into [Icon Themes] section "Inherits" key)
Eventually (unlikely to be necessary) /usr/share/icons/default/index.theme
You may also have to edit it here:
gsettings set org.gnome.desktop.interface cursor-size 32
gsettings set org.gnome.desktop.interface cursor-theme Adwaita
Offline