LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   icon for new project not showing in kickoff, but shows in old style menu (http://www.linuxquestions.org/questions/slackware-14/icon-for-new-project-not-showing-in-kickoff-but-shows-in-old-style-menu-945983/)

timsoft 05-20-2012 05:51 AM

icon for new project not showing in kickoff, but shows in old style menu
 
I am creating a slackbuild for a project. It sticks icons into /usr/share/icons/hicolor/[16x16,32x32,48x48,64x64]/apps/projecticon.png
the desktop file (projectname.desktop) looks something like
Code:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=project name
Type=Application
Categories=Game; ArcadeGame
Exec=projectexecutable
Icon=projecticon
Terminal=false

When the project is installed, it has the usuall
Code:

if [ -x usr/bin/update-desktop-database ]; then
  chroot . /usr/bin/update-desktop-database usr/share/applications 1> /dev/null 2> /dev/null
fi

# Update hicolor theme cache:
if [ -d usr/share/icons/hicolor ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null
  fi
fi

in doinst.sh

The correct icon appears in the classic kde menu, but not in the kickoff menu style, you just get a blank document icon (although when you click on it to run the cursor shows the right icon.)
Can anyone point me to what I am missing to get the icon to show in kickoff menu as well (slackware 13.37 32bit clean installation)
I've tried adding 128x128 and 256x256 icon sizes as well just in case, but no difference.

kingbeowulf 05-24-2012 12:55 PM

timsoft,

emaied as well, but here for general discussion:

No clue. I don't use KDE much. That kick off menu is weird. Perhaps there is an entry in the desktop file beyond the icon= normally used? Or you need to specify the icon file extension? Wrong file extension?

timsoft 05-24-2012 04:24 PM

all the icons are png files. I have tried both with and without the .png extension in the .desktop file, but no joy. I'll try looking at some other slackbuilds than the vlc one i was checking out for any more clues. it is weird. One would think that lots of other people have come across the problem, especially as it is the default menu for slackware 13.37, even though I must confess that the first thing I do is change it to classic (old) style when I set up a system.

I have noticed the same behaviour when using dolphin in icon view to look at the /usr/share/applications/ directory. The correct icon shows in details view, but in icon view my project.desktop file does not have the icon it should have, it just has a place-holder icon.

If I find a solution I'll post it here and on the mailing list for general info.

timsoft 05-28-2012 08:42 AM

the fix is to remove the users kde cache directory (when not in kde)

Code:

rm -rf /var/tmp/kdecache-`whoami`
I only had this problem on the first user to run x (startx) which was root. Logging in as subsequent users worked without the icon problem, including uninstalling the app, logging in as another user, installing as root while in X.
I'll see if the problem is the same for slackware 13.37 64bit. I'll post the results back here, and on the mailing list for info.
It seems to be only affecting the 32x32 png icon. Other sizes are fine in dolphin, and are not used for kickoff (normal view)

As to why the problem occurs, it as been suggested http://forum.kde.org/viewtopic.php?f=67&t=39274&p=223326#p223321 that the icons be installed before the desktop file. however, doing that on a slackbuild, which installs alphabetically so /usr/share/applications/project.desktop is always installed before /usr/share/icons/[16x16,32x32,48x48x64x64]/apps/project.png would prove a bit of a problem. Shy of putting the .desktop file in install, and then copying it to /usr/share/applications in the doinst which is a bit messy, as i'm not sure how it would get cleaned up on uninstall

Well I've tested with clean slackware13.37 64bit install and no problems with icons on kickoff or dolphin. Either I was unlucky in the timing of icon scanning for kde, or the cache got messed when I had to kill X the first time (ctl-alt-backsp) as the nouveau drivers didn't like my hardware and I had to install the proprietary nvidia ones.


All times are GMT -5. The time now is 02:47 PM.