Problems with KDE plasma desktop

Hi,
I have just installed opensuse 12.1, after having used Ubuntu and LinuxMint for several years. I use the KDE version and have a small problem with it:
On my desktop I have a widget called Folder View, currently pointing to my desktop folder. In there I see the icons which are in my /home/username/Desktop folder.
One of them, Google-Chrome, does not show the correct icon, although in the folder in my user area it does. The moment I click the icon to start the program I see the Chrome icon appear for a fraction of a second, then it disappears again and I have the substitute icon.
I can throw it away and copy it again from the Kick-off menu but it won’t make any difference, I can change the icon-choose the right one- but still it won’t show up.
All other icons are just fine. How to also get the Chrome icon on my desktop?

Remove it, right click in the container, pick New shortcut to application.

I just did but the new icon is still not the Chrome icon. It looks like a piece of paper with a questionmark on it and the lower right hand corner is curled.

Could the problem be that the default .desktop file (when placed into your folder view) is looking for an icon that does not exist or searching the wrong path?

Could you copy and paste the contents of the Google-Chrome.desktop file in the Desktop folder?
Maybe all you need to do is manually update the desktop file.

I’ve had this issue with some apps like GRASS and SAGA GIS because of the default settings in the .desktop file, but never Google Chrome yet.

Which info do you need? I don’t quite understand what you mean.

Once you drag the launcher from the kick-start to your Desktop folder, open your desktop folder.

In the desktop folder, open the Google Chrome .desktop file with a text editor like KWrite (right click and go to Open With… > Kwrite)

You should be able to see and edit the contents of the desktop file in Kwrite.

I didn’t know this was possible, but Ok here is the info I saw:

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=/usr/bin/google-chrome
GenericName[en_US]=Google-Chrome
GenericName=Google-Chrome
Icon=google-chrome
MimeType=
Name[en_US]=Google-Chrome
Name=Google-Chrome
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-SuSE-translate=true

The part we are interested in is the “Icon=…” stanza.

Update it to point to an icon, in this case a png file!

When google chrome installed it may of saved the icons in /usr/share/icons/

From a terminal, execute:

find /usr/share/icons -type f -name "*google-chrome*"

It should output some of the icons it found and maybe they end in .png

Copy one of the paths it outputs (choose the resolution by the folder name, 48x48 or 64x64 for example).

On my system, I can use /usr/share/icons/hicolor/64x64/apps/google-chrome.png

So I would change the following line:

Icon=google-chrome

to

Icon=/usr/share/icons/hicolor/64x64/apps/google-chrome.png

Save and close that desktop file, the changes should be immediate. Let me know if that works!

This works. Thank you. But I still have a question about it. When I open the folder /home/username/Desktop I do see the correct icon already. Also when I open that file I see the same line as I had on the desktop. Why does it work there and not in folder view? A bit strange, isn’t it?

It is strange, because there are rules to how it works[1].
It first looks at $HOME/.icons and when it didn’t find “google-chrome” (from the original Icon=…) maybe it glitched out and didn’t bother to look else where?

You could test it out and place a copy of google-chrome.png in the folder $HOME/.icons and also change Icon back to Icon=google-chrome
If it still comes up broken then something else is going on.

Good that it works now.

But either way, you can always make your own .desktop file from scratch[2]!

[1] Icon Theme Specification
[2] Desktop Entry Specification