Bug 1956075 - Remote FTP files open in browser instead of application
Summary: Remote FTP files open in browser instead of application
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 34
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-02 14:42 UTC by Ildar Akhmetgaleev
Modified: 2021-05-02 14:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Ildar Akhmetgaleev 2021-05-02 14:42:13 UTC
Description of problem:
`gio open` launches Chromium browser when opening a file through ftp instead of a associated file handler application.

Version-Release number of selected component (if applicable):
glib2.x86_64        2.68.1-1.fc34
nautilus.i686       40.0-1.fc34
chromium.x86_64     89.0.4389.90-3.fc34

How reproducible: Can be reproduced with F34 Live media.

Steps to Reproduce:
1. Boot VM with Fedora 34 live.
2. Open FTP share with Nautilus.
3. Open directory in terminal from Nautilus's context menu.
5. Run `gio open <file>`. Result will be as expected, Application associated with file type will pop-up.
6. Install Chromium browser.
6. Run `gio open <file>`. Now gio launches Chromium instead.

Actual results:
gio opens file with Chromium browser with `file:///run/user/1000/gvfs/ftp:host=host/dir/file` in addressbar.

Expected results:
gio should open files with a file handler, just like with no Chromium installed.

Additional info:
gvfs mounted directory `/run/user/1000/gvfs/ftp:host=servak.local/Куча`

```
$ gio info -a "standard::content-type,standard::fast-content-type" ./Программирование_на_Rust.zip
uri: ftp://servak.local/%D0%9A%D1%83%D1%87%D0%B0/%D0%9F%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_%D0%BD%D0%B0_Rust.zip
local path: /run/user/1000/gvfs/ftp:host=servak.local/Куча/Программирование_на_Rust.zip
unix mount: gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000
attributes:
  standard::content-type: application/zip
  standard::fast-content-type: application/zip
```
```
$ gio mime application/zip
Default application for “application/zip”: org.gnome.Nautilus.desktop
Registered applications:
	org.gnome.Nautilus.desktop
Recommended applications:
	org.gnome.Nautilus.desktop
```
```
$ gio mime x-scheme-handler/ftp 
Default application for “x-scheme-handler/ftp”: chromium-browser.desktop
Registered applications:
	chromium-browser.desktop
Recommended applications:
	chromium-browser.desktop
```
`~/.config/mimeapps.list` not exist, `chromium-desktop.desktop` has `x-scheme-handler/ftp` in `MimeType`.

Upstream bug https://gitlab.gnome.org/GNOME/glib/-/issues/1414


Note You need to log in before you can comment on or make changes to this bug.