Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Browse Files" results in "No apps available" #597

Open
tomaszn opened this issue Nov 18, 2023 · 5 comments
Open

"Browse Files" results in "No apps available" #597

tomaszn opened this issue Nov 18, 2023 · 5 comments
Labels
downstream An issue with a downstream cause help wanted An issue that needs contributors
Milestone

Comments

@tomaszn
Copy link

tomaszn commented Nov 18, 2023

Current Behavior

On my Xubuntu 23.10, Xfce 4.18, no application is found to open (and mount) the "Browse Files" link.

A GNOME-looking window appears, and says:

No apps available
No apps installed that can open "sftp://..."

Valent is installed from Flatpak.

At the same time, opening the link via xdg-open works. Thunar, the default file browser, appears on the screen.

What can be the reason?

Expected Behavior

Thunar opens, and I see files kept on the phone.

Desktop

XFCE

Other Desktop

No response

Operating System

Ubuntu 23.10

Installed from

Nightly Flatpak

Version

nightly

Devices

KDE Connect (Android)

Plugins

Files

Logs

$ /usr/bin/flatpak run --branch=master --arch=x86_64 --command=valent --file-forwarding ca.andyholmes.Valent

(process:2): Gtk-WARNING **: 17:10:36.523: Locale not supported by C library.
	Using the fallback 'C' locale.
17:10:36.6241                       GLib-GIO:    DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
17:10:36.6307                       GLib-GIO:    DEBUG: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
17:10:36.6514                        Adwaita:    DEBUG: Portal doesn't provide settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
17:10:36.6523                        Adwaita:    DEBUG: Portal doesn't provide settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
17:10:36.6973                       GLib-GIO:    DEBUG: _g_io_module_get_default: Found default implementation keyfile (GKeyfileSettingsBackend) for ‘gsettings-backend’
17:10:36.6982                       GLib-GIO:    DEBUG: _g_io_module_get_default: Found default implementation gnutls (GTlsBackendGnutls) for ‘gio-tls-backend’
17:10:36.7176                       GLib-GIO:    DEBUG: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
17:10:36.7483                       GLib-GIO:    DEBUG: _g_io_module_get_default: Found default implementation portal (GNetworkMonitorPortal) for ‘gio-network-monitor’
17:10:37.0141                      libportal:    DEBUG: calling background
17:10:37.0184          valent-xdp-background:  WARNING: ValentXdpPlugin: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Background” on object at path /org/freedesktop/portal/desktop
17:10:37.5002                 valent-battery:    DEBUG: ValentBattery: not a battery
17:10:37.6422        valent-clipboard-plugin:    DEBUG: valent_clipboard_plugin_handle_clipboard_connect(): expected "content" field holding a string
17:10:37.8378        valent-clipboard-plugin:    DEBUG: valent_clipboard_plugin_handle_clipboard_connect(): expected "content" field holding a string

Screenshots

Screenshot_2023-11-18_17-16-40

@tomaszn tomaszn added the triage An issue that needs confirmation and labeling label Nov 18, 2023
@andyholmes
Copy link
Owner

Thanks for reporting. It seems like the portal might not be setup correctly on your system, or lack URI scheme associations for sftp://.

@andyholmes andyholmes added help wanted An issue that needs contributors downstream An issue with a downstream cause and removed triage An issue that needs confirmation and labeling labels Nov 18, 2023
@tomaszn
Copy link
Author

tomaszn commented Nov 18, 2023

Maybe that's the reason:

$ xdg-settings get default-url-scheme-handler
xdg-settings: default-url-scheme-handler not implemented for xfce

Any chance to fall back to xdg-open in such a case?

@andyholmes
Copy link
Owner

Whether Valent is in a Flatpak or not, it uses standard library APIs (i.e. g_app_info_launch_default_for_uri()), so unfortunately Valent isn't deciding to use the portal. Since GIO knows it's in a sandbox it will just use the portal automatically.

@tomaszn
Copy link
Author

tomaszn commented Nov 18, 2023

Same after switching to GNOME:

in-gnome

xdg-settings shows nothing for the default handler, but there is a default handler for sftp:

$ xdg-settings get default-url-scheme-handler

$ grep scheme ~/.config/mimeapps.list 
x-scheme-handler/https=xfce4-web-browser.desktop;
x-scheme-handler/trash=xfce4-file-manager.desktop;
x-scheme-handler/sftp=exo-ssh-handler.desktop
x-scheme-handler/http=xfce4-web-browser.desktop
x-scheme-handler/https=xfce4-web-browser.desktop
x-scheme-handler/mailto=xfce4-mail-reader.desktop
x-scheme-handler/trash=xfce4-file-manager.desktop

@andyholmes
Copy link
Owner

It looks like xdg-desktop-portal uses g_app_info_get_default_for_type(), which I think checks XDG and the mimeapps, although the rabbit hole gets pretty deep.

I'm not sure there's much to do about this in Valent, though. Maybe the "open" action should be removed and replaced with just a mount/unmount toggle or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
downstream An issue with a downstream cause help wanted An issue that needs contributors
Projects
None yet
Development

No branches or pull requests

2 participants