<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>506032</bug_id>
          
          <creation_ts>2025-06-23 09:42:17 +0000</creation_ts>
          <short_desc>Cannot rename desktop links (shortcuts)</short_desc>
          <delta_ts>2025-07-31 17:19:50 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>plasmashell</product>
          <component>Desktop icons &amp; Folder View widget</component>
          <version>6.4.0</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>1.0</target_milestone>
          
          <blocked>446031</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="zaliojicitrina">saulelis</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>akselmo</cc>
    
    <cc>hein</cc>
    
    <cc>kdedev</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/plasma/plasma-workspace/-/commit/8df7d9aeffb82fe128113855c66605ef6a8457dc</cf_commitlink>
          <cf_versionfixedin>6.4.4</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2435290</commentid>
    <comment_count>0</comment_count>
    <who name="zaliojicitrina">saulelis</who>
    <bug_when>2025-06-23 09:42:17 +0000</bug_when>
    <thetext>SUMMARY
I am unable to rename the displayed name for .desktop files. Right clicking on them and selecting rename on the desktop or dolphin renames the .desktop file itself and not the displayed name. Trying to rename through the properties window&apos;s application tab&apos;s name field throws an error &quot;Could not save properties due to insufficient write access to: &apos;home/name/Desktop/shortcut.desktop&apos;&quot;. It does however work, if you use a text editor (such as Kate or Nano) to edit the &quot;name&quot; field.

STEPS TO REPRODUCE
1. Try to rename a .desktop file either through the desktop itself, with dolphin or the file&apos;s properties window.

OBSERVED RESULT
The displayed name on the desktop stays the same. If edited through the desktop or dolphin the .desktop file name itself is changed. Trying to rename through the properties window throws an error.

EXPECTED RESULT
The displayed name is changed, keeping the original name of the .desktop file intact.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.15.3
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION
Checking the permissions for the .desktop files, each file&apos;s owner is root and not my user account, perhaps that has something to do with it? Though trying to change the owner with chown did not fix the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2435876</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2025-06-24 17:57:08 +0000</bug_when>
    <thetext>Can you be specific about how you created the shortcuts that are on the desktop?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2435878</commentid>
    <comment_count>2</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2025-06-24 17:57:46 +0000</bug_when>
    <thetext>Was it by dragging apps installed from Flathub (user install, not system install) from Kickoff/kicker/etc to the desktop and then choosing &quot;Link&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2435879</commentid>
    <comment_count>3</comment_count>
    <who name="zaliojicitrina">saulelis</who>
    <bug_when>2025-06-24 18:01:48 +0000</bug_when>
    <thetext>I think one of them was from flathub (currently can&apos;t check), but most of the apps were installed using pacman (arch system). The shortcuts were created by right clicking the apps and selecting &quot;Add to desktop&quot; in the start menu (kickoff).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2435880</commentid>
    <comment_count>4</comment_count>
    <who name="zaliojicitrina">saulelis</who>
    <bug_when>2025-06-24 18:02:55 +0000</bug_when>
    <thetext>Will add, 2 of them were installed from the AUR. Seems like their origin is not related</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2436435</commentid>
    <comment_count>5</comment_count>
    <who name="TraceyC">kdedev</who>
    <bug_when>2025-06-26 00:50:58 +0000</bug_when>
    <thetext>I tested this on git-master and cannot reproduce

Testing steps:
1. Right click an app from the app menu and choose Add to Desktop (tested with native Kate and Obsidian flatpak)
2. Right click the shortcut, choose rename

The shortcut on the desktop has the new name
The properties show the new name in the name field, and the .destop filename remains as it had been (e.g. /home/tracey/.local/share/applications/org.kde.kate.desktop)

On KDE Neon User, and Neon Testing:
The properties window shows the new name in the text field, and the correct name for the .desktop file but the shortcut on the desktop does not update, due to a permissions issue. That&apos;s a packaging issue on Neon, but it verifies the .desktop file does not change name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2436528</commentid>
    <comment_count>6</comment_count>
    <who name="zaliojicitrina">saulelis</who>
    <bug_when>2025-06-26 09:28:30 +0000</bug_when>
    <thetext>I can try downloading plasma-deskqtop-git from the AUR (I believe that&apos;s the right package) then to see if the bug persists.  Question: is mixing KDE enviroment packages a bad idea - I would esentially be only replacing the desktop while keeping all other plasma apps from the main (extra) repositories.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2436686</commentid>
    <comment_count>7</comment_count>
    <who name="TraceyC">kdedev</who>
    <bug_when>2025-06-26 17:25:03 +0000</bug_when>
    <thetext>(In reply to zaliojicitrina from comment #6)
&gt; I can try downloading plasma-deskqtop-git from the AUR (I believe that&apos;s the
&gt; right package) then to see if the bug persists.  Question: is mixing KDE
&gt; enviroment packages a bad idea - I would esentially be only replacing the
&gt; desktop while keeping all other plasma apps from the main (extra)
&gt; repositories.

I would advise against mising environment packages. This can lead to an inconsistent system state, and would make things harder to test. I was testing on git-master to provide data, it isn&apos;t a workaround.

Hopefully others will be able to reproduce this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2437704</commentid>
    <comment_count>8</comment_count>
    <who name="Akseli Lahtinen">akselmo</who>
    <bug_when>2025-07-01 11:57:07 +0000</bug_when>
    <thetext>I can repro this:

- If linked target is in user writable folder, the symlink can be renamed
- If linked target is in flatpak or some other non-user writable folder, it can&apos;t be renamed

One should be able to rename symlinks, since it shouldnt rename the target. Will investigate why it fails.

Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.80
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.4-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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2437709</commentid>
    <comment_count>9</comment_count>
    <who name="Akseli Lahtinen">akselmo</who>
    <bug_when>2025-07-01 12:05:19 +0000</bug_when>
    <thetext>I think i get why:

When renaming the symlink, it does actually rename it. However it cant rename the &quot;friendly name&quot; that is usesdon the desktop for name display, since that is under root ownership.

What we could do instead is just show the symlink name if its symlink, but when creating new symlink for desktop file, use tve friendly name as its initial name.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2437736</commentid>
    <comment_count>10</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2025-07-01 13:39:20 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5648</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2444208</commentid>
    <comment_count>11</comment_count>
    <who name="Akseli Lahtinen">akselmo</who>
    <bug_when>2025-07-31 10:21:33 +0000</bug_when>
    <thetext>Git commit 8b2f22c28d24b3a70765b71d83f3cde77320ab7d by Akseli Lahtinen.
Committed on 31/07/2025 at 10:21.
Pushed by akselmo into branch &apos;master&apos;.

DesktopProtocol: If symlink target desktop file is unwritable, create new one to ApplicationsLocation

If user creates a symlink from applications launcher to desktop, and that symlink points to a
flatpak related desktop file, it is unwritable. Therefore renaming it wont work, since
rename process wants to rename the &quot;friendly name&quot; of the desktop file.

In these cases, we copy the symlink target desktop file data, create new one
to the `QStandardPaths::ApplicationsLocation`, delete the old symlink and replace it 
with new one which points to the one we just created. Since this is writable,
it will rename correctly.

M  +14   -1    kioworkers/desktop/kio_desktop.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/8b2f22c28d24b3a70765b71d83f3cde77320ab7d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2444215</commentid>
    <comment_count>12</comment_count>
    <who name="Akseli Lahtinen">akselmo</who>
    <bug_when>2025-07-31 10:46:11 +0000</bug_when>
    <thetext>Git commit 8df7d9aeffb82fe128113855c66605ef6a8457dc by Akseli Lahtinen.
Committed on 31/07/2025 at 10:21.
Pushed by akselmo into branch &apos;Plasma/6.4&apos;.

DesktopProtocol: If symlink target desktop file is unwritable, create new one to ApplicationsLocation

If user creates a symlink from applications launcher to desktop, and that symlink points to a
flatpak related desktop file, it is unwritable. Therefore renaming it wont work, since
rename process wants to rename the &quot;friendly name&quot; of the desktop file.

In these cases, we copy the symlink target desktop file data, create new one
to the `QStandardPaths::ApplicationsLocation`, delete the old symlink and replace it 
with new one which points to the one we just created. Since this is writable,
it will rename correctly.


(cherry picked from commit 8b2f22c28d24b3a70765b71d83f3cde77320ab7d)

955ad41c DesktopProtocol: If symlink target desktop file is unwritable, create new one...
a4f1fcbc If newPath exists, only link it

Co-authored-by: Akseli Lahtinen &lt;akselmo@akselmo.dev&gt;

M  +14   -1    kioworkers/desktop/kio_desktop.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/8df7d9aeffb82fe128113855c66605ef6a8457dc</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>