https://bugs.kde.org/show_bug.cgi?id=522508

            Bug ID: 522508
           Summary: KIO launches Nautilus with kio-fuse path instead of
                    native trash:/ URI
    Classification: Frameworks and Libraries
           Product: frameworks-kio
      Version First 6.27.0
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Trash
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 193943
  --> https://bugs.kde.org/attachment.cgi?id=193943&action=edit
strace and KIO debug output demonstrating that KIO launches Nautilus with the
kio-fuse path instead of the native trash:/ URI.

DESCRIPTION

When Nautilus is configured as the default file manager, opening the Trash via
KIO (for example using `kioclient exec trash:/` or by clicking the Plasma
desktop Trash icon) launches Nautilus with the kio-fuse mount path instead of
the original `trash:/` URI.

Nautilus supports the `trash:` URI natively, therefore the URI should not be
translated into a kio-fuse path.

Instead of opening the native Trash view, Nautilus is started with a path
similar to:

    /run/user/1000/kio-fuse-XXXXXX/trash

STEPS TO REPRODUCE

1. Set Nautilus as the default file manager:

       xdg-mime default org.gnome.Nautilus.desktop inode/directory

2. Execute:

       kioclient exec trash:/

   or click the Trash icon on the Plasma desktop.

3. Observe the location opened by Nautilus.

OBSERVED RESULT

KIO launches Nautilus with the kio-fuse mount path instead of preserving the
original URI.

KIO debug output shows:

    kf.kio.gui: Launching processes via KProcessRunner::SystemdAsService
    kf.kio.gui: Starting process:
    QList("/usr/bin/nautilus",
          "--new-window",
          "/run/user/1000/kio-fuse-KiUDcT/trash")

The same behaviour occurs when clicking the Plasma desktop Trash icon.

EXPECTED RESULT

KIO should launch Nautilus using the original URI, for example:

    nautilus --new-window trash:/

or otherwise preserve the original `trash:/` URI instead of translating it into
a kio-fuse filesystem path.

Since Nautilus already supports the `trash:` URI natively, no translation
through kio-fuse should be necessary.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 6.7.2
KDE Frameworks Version: 6.27.0
Qt Version: (please fill in from `kinfo`)

ADDITIONAL INFORMATION

The following commands open the correct native Trash view:

    nautilus trash:/
    gio open trash:/

However:

    kioclient exec trash:/

always translates the URI into the kio-fuse path before launching Nautilus.

`strace` confirms that KIO launches:

    /usr/bin/nautilus --new-window /run/user/1000/kio-fuse-KiUDcT/trash

instead of:

    /usr/bin/nautilus --new-window trash:/

As a workaround, wrapping the Nautilus executable and translating the kio-fuse
path back to `trash:/` restores the expected behaviour.

There is also a recent KDE Discuss thread where another user appears to
encounter a similar `trash:/` to `kio-fuse` translation while investigating
unexpected Trash behaviour. Although the symptoms are different, it may
indicate that the same KIO URL translation or launching logic is involved:

https://discuss.kde.org/t/dolphin-opens-personal-folder-instead-of-trash/45119

This may be related to bug 457685, which was also caused by KIO unnecessarily
translating URLs for non-KDE applications through kio-fuse. Although the
trigger is different (trash:/ vs. local file paths), both issues appear to
involve the logic deciding whether a URI should be preserved or converted to a
filesystem path.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to