Version: (using KDE KDE 3.1.3) Installed from: Unspecified Linux OS: Linux Desktop file specification (on www.freedesktop.org) defines OnlyShowIn and NotShowIn fields. These are not supported by KDE. Desktop files which have an "OnlyShowIn=GNOME;XFCE;" or "NotShowIn=KDE;" or similar line should not appear in the menu, on the desktop etc. Furthermore, .desktop and .directory files that are automatically created by KDE at runtime and are only relevant to KDE (e.g. the trashcan stuff under ~/Desktop) should have an "OnlyShowIn=KDE;" line to prevent Gnome and others from displaying it. As Gnome 2.4 will to use the same ~/Desktop directory that KDE uses, this is a very important move not to conflict with each other. See this URL for a more detailed description: http://bugzilla.gnome.org/show_bug.cgi?id=121791
CC'ing Waldo since this relates to the new menu spec stuff.
another note on this: the .desktop files that link directly to a submodule of the kde control center (e.g. /usr/share/applications/kde/mouse.desktop) should probably have a OnlyShowIn=KDE, outside of KDE a menu entry for the whole control center is imho enough
Current status (KDE CVS): OnlyShowIn and NotShowIn are now supported in the KDE menu for both .desktop files and .directory files. kdesktop does not support any of OnlyShowIn / NotShowIn / NoDisplay for either . desktop files or .directory files.
CVS commit by waba: Add support for OnlyShowIn / NotShowIn / NoDisplay for both .desktop and .directory files. (BR63933) CCMAIL: 63933@bugs.kde.org M +15 -0 kdiconview.cc 1.106 --- kdebase/kdesktop/kdiconview.cc #1.105:1.106 @@ -794,4 +794,19 @@ bool KDIconView::makeFriendlyText( KFile return false; + if (cfg.readBoolEntry( "NoDisplay", false )) + return false; + + QStringList tmpList; + if (cfg.hasKey("OnlyShowIn")) + { + if (!cfg.readListEntry("OnlyShowIn", ';').contains("KDE")) + return false; + } + if (cfg.hasKey("NotShowIn")) + { + if (cfg.readListEntry("NotShowIn", ';').contains("KDE")) + return false; + } + QString name = cfg.readEntry("Name"); if ( !name.isEmpty() )
Support added for KDE 3.2.1
Please don't close it, so far only one part of two closely related problems are solved. As reported, KDE-specific desktop files (trashcan, control center modules etc.) should have an OnlyShowIn=KDE; field. Actually, the main goal is this latter one (so that Gnome doesn't show KDE's trashcan), supporting the OnlyShowIn field is only a necessary technical step to reach this goal.
we're now in KDE 3.5 and still no bugfix here. This would be a wonderful bugfix so that I don't keep having 2 trashcans in Gnome. Also, other KDE desktop icons interfering in Gnome. I like to switch around desktops and KDE is one of my faves, but when I switch to Gnome, KDE doesn't cooperate because of this bug. Thanks!
SVN commit 494161 by dfaure: Show trashcan .desktop file on desktop only in kde CCBUG:63933 M +1 -0 directory.trash --- branches/KDE/3.5/kdebase/kdesktop/init/directory.trash #494160:494161 @@ -146,3 +146,4 @@ Comment[zh_CN]=保存临时删除的文件 Comment[zh_TW]=包含刪除的檔案 Comment[zu]=Iqukethe amafayela agudluziwe +OnlyShowIn=KDE
This also affects desktop files in $(prefix)/share/autostart. I wanted to start a systray applet only for Gnome, so I set OnlyShowIn=GNOME; but kdesktop starts it nonetheless.
Michael, AFAIK, OnlyShowIn/NotShowIn only affects whether items appear in the menus... and their affect on autostart behavior is undefined.
If OnlyShowIn/NotShowIn is not defined for autostart items, is there another way to control which items is started in which DE?
autostart items should also follow OnlyShowIn as described in the autostart spec: http://standards.freedesktop.org/autostart-spec/ Yes, that's a fairly new spec ;-)
Is this a valid issue for KDE 4?
waiting for info
This seems to no longer be an issue with KDE 4.x and Fedora 11.
thanks for the feedback