Bug 217992 - Access denied on changing icon from a .desktop shortcut with properties dialog
Summary: Access denied on changing icon from a .desktop shortcut with properties dialog
Status: RESOLVED FIXED
Alias: None
Product: kfile
Classification: Unmaintained
Component: kpropertiesdialog (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-09 14:37 UTC by Henrique Sant'Anna
Modified: 2018-06-15 02:39 UTC (History)
3 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 Henrique Sant'Anna 2009-12-09 14:37:57 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    Ubuntu Packages

When trying to change the icon from a ".desktop" file, inside the desktop plasmoid, I get an error saying that a haven't permission to do that.
That icon was probably created on a wine application installation some time ago, while I was using gnome (now I came back to KDE).
Since I don't have that svg file from the icon anymore, I decided to change it:

1. Downloaded a new svg file and saved it over my personal ~/Images/icons/ folder.
2. Was to desktop plasmoid, right-click over the icon, selected Properties.
3. Over the General tab, clicked over the icon button to start the icon changing.
4. Now on the icon selection dialog, selected the "Other icons" option, and clicked the browse button.
5. Selected the icon file in its file's path: ~/Images/icons/example.svg
6. Now the selected icon shows over the icon button, in the general tab, of the .desktop properties dialog.
7. I press OK, than get an error message that says that was not possible to save the properties because I have no permissions to write over the ~/Desktop/example.desktop file.

First, I checked the permissions and, as I expected, yes, I have write permission to that .desktop file.
So I opened it with kate to see its text content. And there I saw something that seems to me a little suspicious of causing the error message. The property Icon= is correctly edited and pointing to the ~/Images/icons/example.svg, even after the error message !! But there is another Icon property called "Icon[pt_BR]", corresponding to the Brazilian Portuguese translation of my desktop. That Icon[pt_BR] is set to the old icon value, so I deleted the entire line of this Icon[pt_BR], saved the file with kate, and voilà... the desktop icon is working now.
Comment 1 Raine 2010-09-08 16:22:56 UTC
Hi! I'm also having the same problem. It seams that there is a incompatibility between Icon[en_US] and Icon parameters...

My KDE version is 4.5.1 running on Ubuntu 10.04

Here it's my desktop file content:

[Desktop Entry]
Comment[en_US]=
Comment=
Encoding=UTF-8
Exec=/opt/eclipse-java/eclipse
GenericName[en_US]=
GenericName=
Icon[en_US]=/usr/share/icons/eclipse.xpm
Icon=/usr/share/icons/eclipse.xpm
MimeType=
Name[en_US]=Eclipse Java
Name=Eclipse
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
Version=1.0
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

To confirm this bug you should set:
Icon[en_US]=</path/to/any/icon>
Icon=

In other words, 'Icon[en_US]' value should have the same value as 'Icon' parameter otherwise the bug happens.

Then try to set icon via Properties on KDE desktop (I'm using desktop Activity Type as 'Folder View').

There are two ways to workaround this bug:

1) Comment or delete line 'Icon[en_US]=</path/to/any/icon>' and reset icon path via Properties on the desktop.

or

2) Set THE SAME path on 'Icon[en_US]' as 'Icon' parameter editing .desktop file via any editor manually.

Please fix this nasty bug as soon as possible...

Thanks for the support!
Regards,
Raine
Comment 2 Nate Graham 2018-06-15 02:39:06 UTC
Works for me in KDE Frameworks 5.47.