Bug 488772 - User .desktop not work when using keyboard shortcuts
Summary: User .desktop not work when using keyboard shortcuts
Status: CONFIRMED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.9.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 455212 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-06-20 05:04 UTC by Ronald
Modified: 2024-12-18 02:07 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald 2024-06-20 05:04:11 UTC
SUMMARY

For env, `LC_COLLATE="en_US.UTF-8"`
To sort in Chinese Pinyin in dolphin,
add ~/.local/share/applications/org.kde.dolphin.desktop,
the only different line to /usr/share/applications/org.kde.dolphin.desktop is as below
```
Exec=env LC_COLLATE="zh_CN.UTF-8" dolphin %u
```

STEPS TO REPRODUCE
1. Add `~/.local/share/applications/org.kde.dolphin.desktop` as above
2. Press "Win + E" to open dolphin

OBSERVED RESULT
The name in Chinese are not sorted in Pinyin

EXPECTED RESULT
The name in Chinese are sorted in Pinyin

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
When launching Dolphin by click the icon in the application menu, the sort order respect "~/.local/share/applications/org.kde.dolphin.desktop", which gets LC_COLLATE="zh_CN.UTF-8", so that it sorts in Chinese Pinyin as expected.
But when launching Dolphin with keyboard shortcuts, it doesn't.
Comment 1 Felix Ernst 2024-06-20 10:13:56 UTC
>When launching Dolphin by click the icon in the application menu,
>the sort order respect "~/.local/share/applications/org.kde.dolphin.desktop",
>which gets LC_COLLATE="zh_CN.UTF-8", so that it sorts in Chinese Pinyin as expected.
>But when launching Dolphin with keyboard shortcuts, it doesn't.

So the global keyboard shortcut for Dolphin as defined in system settings does not seem to care about the extra environment variables defined in the Dolphin .desktop file. Yes, I guess that might be unexpected.

If that is the issue you should be able to work around this by binding a custom command that includes the environment variable to a keyboard shortcut in system settings.
Comment 2 Méven Car 2024-07-22 11:57:22 UTC
Btw does it work when setting globally the env variable, i.e for the session :

export LC_COLLATE="zh_CN.UTF-8"

Or via the systemsettings language setting ?

Those could be workaround, but your bug is more general and could concern other apps/shortcuts too.
Comment 3 Ronald 2024-07-23 05:25:34 UTC
I'm not going to change the global locale settings as a workaround.
Not a blocking problem, waiting for the fixing.
Comment 4 Ronald 2024-12-18 02:06:00 UTC
*** Bug 455212 has been marked as a duplicate of this bug. ***