Skip to content

fix: trash: Use kioclient as trash implementation on KDE Plasma 6 - #54092

Merged
MarshallOfSound merged 1 commit into
electron:mainfrom
LinusDierheimer:trask-use-kioclient-on-plasma6
Sep 25, 2026
Merged

MarshallOfSound merged 1 commit into
electron:mainfrom
LinusDierheimer:trask-use-kioclient-on-plasma6

Conversation

@LinusDierheimer

@LinusDierheimer LinusDierheimer commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Description of Change

Use kioclient as trash implementation on KDE Plasma 6. Similar to Plasma 3, the executable ist just called kioclient (without a 6 suffix). Prefer it over gio.

I did not find any documentation that needs updating because of that.

Checklist

Release Notes

Notes: Changed the default trash implementation on KDE Plasma 6 to kioclient.

@welcome

welcome Bot commented Sep 18, 2026

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖

Semantic PR titles

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Commit signing

This repo enforces commit signatures for all incoming PRs.
To sign your commits, see GitHub's documentation on Telling Git about your signing key.

PR tips

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@MarshallOfSound MarshallOfSound left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this an exhaustive switch with no default instead? The reason KDE6 got missed in the first place is that base::nix::DESKTOP_ENVIRONMENT_KDE6 landed upstream back in 2023 and this if-chain silently fell through to gio. Chromium's own KDE call sites (settings_utils_linux.cc, printer_manager_dialog_linux.cc) switch over every DesktopEnvironment value so clang yells at us on the roll when base adds a new one (COSMIC most recently). Let's do the same here so this can't drift again.

    // Determine desktop environment and set accordingly.
    switch (base::nix::GetDesktopEnvironment(env.get())) {
      case base::nix::DESKTOP_ENVIRONMENT_KDE4:
      case base::nix::DESKTOP_ENVIRONMENT_KDE5:
        trash = "kioclient5";
        break;
      case base::nix::DESKTOP_ENVIRONMENT_KDE3:
      case base::nix::DESKTOP_ENVIRONMENT_KDE6:
        trash = "kioclient";
        break;
      case base::nix::DESKTOP_ENVIRONMENT_OTHER:
      case base::nix::DESKTOP_ENVIRONMENT_CINNAMON:
      case base::nix::DESKTOP_ENVIRONMENT_DEEPIN:
      case base::nix::DESKTOP_ENVIRONMENT_GNOME:
      case base::nix::DESKTOP_ENVIRONMENT_PANTHEON:
      case base::nix::DESKTOP_ENVIRONMENT_UKUI:
      case base::nix::DESKTOP_ENVIRONMENT_UNITY:
      case base::nix::DESKTOP_ENVIRONMENT_XFCE:
      case base::nix::DESKTOP_ENVIRONMENT_LXQT:
      case base::nix::DESKTOP_ENVIRONMENT_COSMIC:
        // No DE-specific tool, falls through to `gio trash` below.
        break;
    }

@MarshallOfSound

Copy link
Copy Markdown
Member

@LinusDierheimer Ping on this, happy to review once the above change is made

@LinusDierheimer
LinusDierheimer force-pushed the trask-use-kioclient-on-plasma6 branch from cc83ac0 to 4071784 Compare September 25, 2026 09:26
@LinusDierheimer

Copy link
Copy Markdown
Contributor Author

@LinusDierheimer Ping on this, happy to review once the above change is made

Force pushed your suggested change

@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) September 25, 2026 09:31
@MarshallOfSound
MarshallOfSound merged commit b39d393 into electron:main Sep 25, 2026
89 of 92 checks passed
@welcome

welcome Bot commented Sep 25, 2026

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk

release-clerk Bot commented Sep 25, 2026

Copy link
Copy Markdown

Release Notes Persisted

Changed the default trash implementation on KDE Plasma 6 to kioclient.

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #54361

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54362

@trop trop Bot added in-flight/45-x-y merged/45-x-y PR was merged to the "45-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. and removed target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. in-flight/45-x-y in-flight/44-x-y labels Sep 25, 2026
@MarshallOfSound MarshallOfSound mentioned this pull request Oct 29, 2026
3 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants