Registered Member
|
Using kmenuedit I can insert new items in the USER k-menu (which is stored within the ~user/.kde tree - each user need to insert it manually). I would like to insert an item which must be available for ALL users, so as soon as I make this insertion, all my users will be able to access it. For kde 3, there are instructions at the KDE website which allows me to do so:
http://docs.kde.org/development/en/kdeb ... -menu.html But for Kde 4 I couldn't find any information on how to do that. Neither any information on what are the files where this information is stored. Can anyone give me a hint on how these things work in KDE 4 ? |
Administrator
|
The method has not changed since KDE 3. KDE 4 still uses the XDG Freedesktop.org specification for applications.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
The easiest way would be to put a .desktop file in /usr/share/applications , this way it'll affect the whole system, not just one use. For the .desktop file itself you can mimic any .desktop file in /usr/share/applications and change the relevant parts, they'll be:
Name= Exec= Icon= Categories= The Categories= part will determine where the .desktop file will appear, look at the Categories= entry in a .desktop file of an app in the same sub-menu where you want the new application to appear. For the menu to refresh instantly use this in terminal: kbuildsycoca4 It'll work automatically for all other users when they login. |
Registered Member
|
sorry to awaken this old thread, but it is a problem for me in 2012. I have put icons in /usr/share/icons/hicolor/[16x16,32x32,48x48,64x64]/apps/projecticon.png
and have a /usr/share/applications/projectname.desktop similar to that mentioned in the thread,
and the icon shows in the classic/old style menu, but not in the kickoff menu. In the kickoff menu a "default" icon is shown instead. i'm using kde 4.5.5 (slackware 13.37) does anyone have any suggestions as to why the solution does not work, thanks |
Administrator
|
Which part of the Kickoff menu is this? The "Applications" section?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
yes in the application section, under games, sub-catagory arcade games
see http://timsoft.users.sourceforge.net/snapshot5.png for an example of the correct icon not showing (kickoff default) and http://timsoft.users.sourceforge.net/snapshot7.png for the correct icon showing (classic menu) |
Administrator
|
I somehow suspect viewtopic.php?f=224&t=102356 is related to this. If you change the icon size in Dolphin, using the controls at bottom right, does the icon become visible or does it remain as the unknown icon?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
it may well be related, if both are using the same libraries, or are just alternate interfaces of the same program, though as i'm not sure on that, that is why the two ends of this problem are on two different threads. The first one I noticed was the kickoff menu icon issue, as that is the one I test when installing the application as it is most likely to be seen by users.
when changing the icon size in dolphin, all sizes are ok except for 32x32 however, there is an icon (png) file in /usr/share/icons/hicolor/32x32/apps/ just the same as for other sizes. I can open the that (32x32) png file in krita, gimp, or whatever without any problems, so the file itself seems to be ok, and if you select "preview" in dolphin, it shows the icon in /usr/share/icons/hicolor/32x32/apps/ even if it doesn't show for the desktop file in /usr/share/applications
Last edited by timsoft on Mon May 28, 2012 8:33 am, edited 1 time in total.
|
Administrator
|
If you remove /var/tmp/kdecache-$USER/ outside KDE, does the icon appear upon logging in?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
yes it does, in both kickoff and dolphin. thanks.
I did run
after installing the application with it's desktop and icon files, and the installation of the os (slackware 13.37) and kde is clean. Is there anything else that I should be doing at installation time that would prevent a users cache problem, bearing in mind I would be running it from the application install script, typically as root, and it would need to apply to all users? I would prefer not to have to run
|
Administrator
|
Usually, this is not a problem. What probably happened is that KDE cached the unknown icon when it failed to find the 32x32 icon, as you initially didn't provide it.
My best recommendation would be to install the icons before the desktop files, and that should work fine.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
the installation is handled by the package management, which as it is tar.gz format saved in alphabetic order means that /usr/share/applications/.. is always going to be installed before /usr/share/icons/... so I can't do much about that.
I have done some experimenting uninstalling the package, creating a new user, logging into X (startx) as that user, then from a root shell installing the application, and it seems to work just fine. It could just be a one-off problem with the root user on a clean install. I'll be installing a 64bit version on a separate partition later on, and will see if the problem re-occurs on that installation, but apart from that I think we can mark it as a fix.
I've done a clean 64bit install and run the same tests, but no problems this time. I can only think that it was either an unfortunate timing of the scanning of directories for icons at the exact moment the files were being installed, or a cache corrupted because I had to ctl-alt-backspace out of X the first time because the nouveau driver didn't work on my geforce 7025 graphics and i had to install the nvidia drivers instead.(which i forgot to mention ) |
Administrator
|
Glad to hear it is now working as expected. Marking as solved.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]