Bug 506440

Summary: Renaming Trash .desktop file to remove its .desktop suffix breaks it
Product: [Plasma] plasmashell Reporter: Mike <KMonsefi>
Component: Desktop icons & Folder View widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: minor CC: akselmo, hein, nate, notmart
Priority: NOR    
Version First Reported In: 6.4.1   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mike 2025-07-01 14:44:39 UTC
SUMMARY
Within a Folder View widget (not set to Desktop), files dragged onto "Trash.desktop" give error message when the .desktop extension is removed

STEPS TO REPRODUCE
1. Create a Folder View Widget and set location to *anything other than Desktop*.
2. Create a Trash.desktop file as you normally would in that widget.
3. Rename "Trash.desktop" to "Trash"
4. Drag an icon you want to delete onto Trash

OBSERVED RESULT
Produces error message popup: "Access denied to . "

EXPECTED RESULT
Icon should be sent to Trash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Kinoite 42
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0 
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Files dragged onto "Trash" icon in Folder View widget with location set to "Desktop" are correctly sent to Trash.
Comment 1 Marco Martin 2025-07-14 14:38:58 UTC
can't seem to reproduce
Comment 2 Akseli Lahtinen 2025-07-31 11:31:23 UTC
Can't reproduce

Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.1
Kernel Version: 6.15.8-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: AMD Radeon RX 6600
Comment 3 Nate Graham 2025-08-07 19:18:26 UTC
Also can't reproduce.

Can you share how you created the trash on the desktop?

A screen recording that shows the whole process of you creating the desktop trash, renaming its file, and then dragging something to it would be helpful.
Comment 4 Mike 2025-08-18 15:06:09 UTC
Screen recording of the issue: https://jumpshare.com/share/g3BquMOX7XVCwX4Q7XTQ
Comment 5 Nate Graham 2025-08-18 18:52:41 UTC
Thanks, now I can reproduce it. I suspect all of us had poor reading comprehension here and were putting the trash on the actual desktop, and not in a Folder View Widget with the location set to *anything other than Desktop*, as you wrote.

It makes sense why this happens now: .desktop is a special suffix that lets the system know that something is kind of a virtual item, with properties determined by the contents of the file.

The suffix is hidden on the actual desktop, or when using the desktop:/ location. In any other location, it will be shown.

If you remove the suffix, you can break the item. That's what happened here.

I'd recommend not renaming .desktop files.