I upgraded to Luddite 13.2 a week or so ago, and everything is working very well except fhat I'm seeing multiple applicsions duplicated in the fluxbox menu. Applications, Preferences has two entries for gparted and three for Synaptic, while Applications, Other has two more Synaptic and another gparted; icewmcc appears once in each of those submenus, also. Doesn't cause a problem, really (except I can't run Synaptic from those menu entries because it needs root privileges -- it starts fine from Control Centre), it's just indicative that something isn't quite right.
Is there an easier, more automatic way to clean up these menus short of finding the fluxbox config files and editing them manually?
topic title: Flxubox menu has many duplicates
-
Posts: 347
- Joined: 08 Aug 2013
-
Posts: 69
- Joined: 16 Oct 2013
#2
I'm interested in the answer to this question too. My menu has developed several duplicate entries, and I've been wondering what has caused this as well as what can be done to prevent it.
-
Posts: 1,444
- Joined: 09 Feb 2012
#3
same story, different day (Feb 2012): post26782.html#p26782
Some debian packages contain multiple .desktop files for a single application.
The package maintainer's expectation (presumption) is that your XDG-menu builder will consider, and respect,
the OnlyShowIn= directive within an application's seemingly redundant .desktop files
There's no way to accommodate, within a given .desktop file, conditional logic like
"Hi, desktop environment. If you are Gnome, do THIS; if you are KDE, do THAT..."
so multiple, seemingly redundant, .desktop files are shipped. One will contain OnlyShowIn=Gnome; another will contain OnlyShowIn=KDE
The KDE-oriented .desktop file might contain
exec=pkexec-mybigtoe
icon=/some/extraspecial/path/to/kde-installed-icons/OMGponies.png
...which is uselesss (broken) to you, unless KDE is installed on your system.
PROBLEM:
The fluxbox-menu generator isn't saavy enough to parse the .desktop files and exclude 'em based on OnlyShowIn=
(I haven't checked lately. Maybe the generator DOES consider the OnlyShowIn directive)
PROBLEM:
because some package maintainers (especially for gnome pkgs) stupidly/selfishly/needlessly
place OnlyShowIn=Gnome directive within .desktop files ...the fluxbox-menu generator should rightly continue to ignore this oft-abused directive.
Even if a distro maintainer compensates by deleting any extra/redundant .desktop files,
{sigh} those"missing" files will be reinjected next time (every time) the package is upgraded.
PROBLEM:
Even if the distro maintainer, or end user, modifies a .desktop file, setting Hidden=true
(ref
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html"
linktext was:"http://standards.freedesktop.org/deskto ... 01s05.html"
====================================
)
and setting chmod 444
...during an update operation, dpkg will STILL overwrite the modded .desktop file(s) with"freshly extracted from the package" copy(ies)
SOLUTION:
a"solution" can be acheived by distro maintainer placing within skel
Hidden=true modded copies of .desktop files for known-to-be-affected packages
and
by each user creating same (copied to homedir and modded to read Hidden=true)
copies of .desktop files for each affected package, as discovered, post-install.
For a single-user system, I would rather address this problem by editing in place
any problematic .desktop files residing within usr/share/applications
applying"immutable" attribute ( chattr +i ) vs creating, and modding, homedir copies.
Some debian packages contain multiple .desktop files for a single application.
The package maintainer's expectation (presumption) is that your XDG-menu builder will consider, and respect,
the OnlyShowIn= directive within an application's seemingly redundant .desktop files
There's no way to accommodate, within a given .desktop file, conditional logic like
"Hi, desktop environment. If you are Gnome, do THIS; if you are KDE, do THAT..."
so multiple, seemingly redundant, .desktop files are shipped. One will contain OnlyShowIn=Gnome; another will contain OnlyShowIn=KDE
The KDE-oriented .desktop file might contain
exec=pkexec-mybigtoe
icon=/some/extraspecial/path/to/kde-installed-icons/OMGponies.png
...which is uselesss (broken) to you, unless KDE is installed on your system.
PROBLEM:
The fluxbox-menu generator isn't saavy enough to parse the .desktop files and exclude 'em based on OnlyShowIn=
(I haven't checked lately. Maybe the generator DOES consider the OnlyShowIn directive)
PROBLEM:
because some package maintainers (especially for gnome pkgs) stupidly/selfishly/needlessly
place OnlyShowIn=Gnome directive within .desktop files ...the fluxbox-menu generator should rightly continue to ignore this oft-abused directive.
Even if a distro maintainer compensates by deleting any extra/redundant .desktop files,
{sigh} those"missing" files will be reinjected next time (every time) the package is upgraded.
PROBLEM:
Even if the distro maintainer, or end user, modifies a .desktop file, setting Hidden=true
(ref
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html"
linktext was:"http://standards.freedesktop.org/deskto ... 01s05.html"
====================================
)
and setting chmod 444
...during an update operation, dpkg will STILL overwrite the modded .desktop file(s) with"freshly extracted from the package" copy(ies)
SOLUTION:
a"solution" can be acheived by distro maintainer placing within skel
Hidden=true modded copies of .desktop files for known-to-be-affected packages
and
by each user creating same (copied to homedir and modded to read Hidden=true)
copies of .desktop files for each affected package, as discovered, post-install.
For a single-user system, I would rather address this problem by editing in place
any problematic .desktop files residing within usr/share/applications
applying"immutable" attribute ( chattr +i ) vs creating, and modding, homedir copies.
-
Posts: 1,028
- Joined: 21 Aug 2011
#4
This section is displayed because of incorrectly specified .desktop files. The entire section will be automatically removed by dealing with the three items within it.
GParted, icewmcc, and Synaptic Package Manager have"Other" specified for their category. This is not a registered or additional category according to the freedesktop.org standards and is therefore not recognized. Entries that do not comply with the standard usually produce duplicate entries for each incorrect item. This has ocurred for each of the three items above (producing six entries in total).
I suggest they are revised by editing each of the following files (as root)
Specify the GParted entry to be placed in System Tools
/usr/share/application/antix/gparted.desktop
Change to
Categories=System;
Specify the Synaptic Package Manager entry to be placed in System Tools (as per Gdebi) to have both the"installer" type entries in the same menu location.
/usr/share/application/antix/synaptic.desktop
Change to
Categories=System;
Specify the IceWMCC entry to be placed in Preferences. It might also be given a more user friendly description. It also has not been allocated an icon.
/usr/share/application/antix/IceWmCC.desktop
Change to
Name=IceWM Control Center
Categories=Settings;
Icon=preferences-desktop
Having made the above changes ensure they are the only *.desktop files that refer to each app respectively. Check for duplcate files in both
/usr/share/applications/
/usr/share/applications/antix/
If duplicates are found move them to your home folder.
Update the menu (or log out and in again) to have the changes reflected in the antiX main menu. It should now contain single instances of GParted, IceWM Control Center, and Synaptic Package Manager. In this case the files moved to your home directory may be deleted.
Menu entries in Applications-->OtherSilent Observer wrote:...I'm seeing multiple applicsions duplicated in the fluxbox menu. Applications, Preferences has two entries for gparted and three for Synaptic, while Applications, Other has two more Synaptic and another gparted; icewmcc appears once in each of those submenus, also.
This section is displayed because of incorrectly specified .desktop files. The entire section will be automatically removed by dealing with the three items within it.
GParted, icewmcc, and Synaptic Package Manager have"Other" specified for their category. This is not a registered or additional category according to the freedesktop.org standards and is therefore not recognized. Entries that do not comply with the standard usually produce duplicate entries for each incorrect item. This has ocurred for each of the three items above (producing six entries in total).
I suggest they are revised by editing each of the following files (as root)
Specify the GParted entry to be placed in System Tools
/usr/share/application/antix/gparted.desktop
Change to
Categories=System;
Specify the Synaptic Package Manager entry to be placed in System Tools (as per Gdebi) to have both the"installer" type entries in the same menu location.
/usr/share/application/antix/synaptic.desktop
Change to
Categories=System;
Specify the IceWMCC entry to be placed in Preferences. It might also be given a more user friendly description. It also has not been allocated an icon.
/usr/share/application/antix/IceWmCC.desktop
Change to
Name=IceWM Control Center
Categories=Settings;
Icon=preferences-desktop
Having made the above changes ensure they are the only *.desktop files that refer to each app respectively. Check for duplcate files in both
/usr/share/applications/
/usr/share/applications/antix/
If duplicates are found move them to your home folder.
Update the menu (or log out and in again) to have the changes reflected in the antiX main menu. It should now contain single instances of GParted, IceWM Control Center, and Synaptic Package Manager. In this case the files moved to your home directory may be deleted.
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#5
Menu entries in Applications-->Other.
The reason why gparted and synaptic appear here is because all the other entrieselsewhere in the menu fail to open since they need some *kit which 'replaces' gksu/kdesu etc. The entries in 'other' open with gksu 9except icewmcc)
If you do what SamK suggests, make sure the ecec line has gksu gparted for example. BTW You will still get a duplicate since any upgrade to synaptic/gparted will revert any changes you make, plus add other .desktop files as explained correctly by skidoo 2 posts up.
The reason why gparted and synaptic appear here is because all the other entrieselsewhere in the menu fail to open since they need some *kit which 'replaces' gksu/kdesu etc. The entries in 'other' open with gksu 9except icewmcc)
If you do what SamK suggests, make sure the ecec line has gksu gparted for example. BTW You will still get a duplicate since any upgrade to synaptic/gparted will revert any changes you make, plus add other .desktop files as explained correctly by skidoo 2 posts up.
-
Posts: 1,028
- Joined: 21 Aug 2011
#6
/usr/share/application/antix/gparted.desktop
/usr/share/application/antix/synaptic.desktop
/usr/share/application/antix/IceWmCC.desktop
Agreed, however until a long-term"fix" is implemented, ten minutes work can produce a worthwhile improvement that may last for many months or even years. It seems a beneficial trade-off in lieu of anything more permanent from upstream.anticapitalista wrote: BTW You will still get a duplicate since any upgrade to synaptic/gparted will revert any changes you make...
Perhaps it would have been more helpful of me to provide full examples. The following have been created as outlined above and had all non english items removed to aid clarity.anticapitalista wrote:If you do what SamK suggests, make sure the ecec line has gksu gparted for example.
/usr/share/application/antix/gparted.desktop
Code: Select all
[Desktop Entry]
Name=GParted
GenericName=Partition Editor
X-GNOME-FullName=GParted Partition Editor
Comment=Create, reorganize, and delete partitions
Exec=gksu gparted
Icon=gparted
Terminal=false
Type=Application
Categories=System;
StartupNotify=true
Code: Select all
[Desktop Entry]
Name=Synaptic Package Manager
GenericName=Package Manager
Comment=Install, remove and upgrade software packages
Exec=gksu synaptic
Icon=synaptic
Terminal=false
Type=Application
Categories=System;
NotShowIn=KDE;
X-Ubuntu-Gettext-Domain=synaptic
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=IceWM Control Center
Exec=/usr/local/bin/icewmcc/icewmcc.sh
Icon=preferences-desktop
Terminal=false
Type=Application
Categories=Settings;
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#7
Thanks SamK.
We are working on a longer term fix with the present menu scripts we use and an even longer term fix with how we actually create the menus.
Also, for those using and keeping to the default Wheezy repo, this does not affect you and is very unlikely to do so since Wheezy only accepts bugfixes and security changes and it is almost 100% certain that gparted and synaptic will not get upgraded. You should not see these multiple duplicates.
We are working on a longer term fix with the present menu scripts we use and an even longer term fix with how we actually create the menus.
Also, for those using and keeping to the default Wheezy repo, this does not affect you and is very unlikely to do so since Wheezy only accepts bugfixes and security changes and it is almost 100% certain that gparted and synaptic will not get upgraded. You should not see these multiple duplicates.
-
Posts: 1,444
- Joined: 09 Feb 2012
#8
ref
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/GNOME/gparted/blob/master/gparted.desktop.in.in"
linktext was:"https://github.com/GNOME/gparted/blob/m ... ktop.in.in"
====================================
Categories=GNOME;System;Filesystem;
See? The gparted package maintainer didn't draft the Categories= directive to state"Other".
To fix this specific case, revise the fluxbox-menu builder?
I don't think we'll ever see a"fix" initiated upstream...
ref
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html"
linktext was:"http://standards.freedesktop.org/menu-s ... c-1.0.html"
====================================
omit the"OnlyShowIn" directive and cause xdg-compliant menu builder to generate an unwelcome"Other" entry
or include the"OnlyShowIn" directive and cause grief/complaint (as in my earlier post).
gpartedMenu entries in Applications-->Other
This section is displayed because of incorrectly specified .desktop files
. . .
GParted, icewmcc, and Synaptic Package Manager have"Other" specified for their category
ref
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/GNOME/gparted/blob/master/gparted.desktop.in.in"
linktext was:"https://github.com/GNOME/gparted/blob/m ... ktop.in.in"
====================================
Categories=GNOME;System;Filesystem;
See? The gparted package maintainer didn't draft the Categories= directive to state"Other".
To fix this specific case, revise the fluxbox-menu builder?
Code: Select all
(pseudocode)
foreach x in Categories
if x='GNOME' continue # aka skip/ignore
else
ref
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html"
linktext was:"http://standards.freedesktop.org/menu-s ... c-1.0.html"
====================================
...in fact, for the package maintainer, it's a damned if ya do, damned if ya don't scenario ~~Desktop entries should list all categories that clearly apply.
. . .
. . .
A desktop entry for a GNOME-specific calculator program that should only appear in GNOME might have:
Categories=GNOME;Utility;
OnlyShowIn=GNOME;
omit the"OnlyShowIn" directive and cause xdg-compliant menu builder to generate an unwelcome"Other" entry
or include the"OnlyShowIn" directive and cause grief/complaint (as in my earlier post).
-
Posts: 347
- Joined: 08 Aug 2013
#9
Wow, I didn't know I was going to delve into Linux politics. I see the entries for gparted etc. not launching except in Other because they lack the authenticator prefix -- honestly, gparted and Synaptic don't really need to be in menus because both launch from the Control Center (at least for Full installs; Synaptic isn't part of Base but can be added and then won't run from Preferences -- I used to launch it from a terminal as su when I had Base because I couldn't recall which menu entry actually worked), only one or two clicks extra compared to the menu and unambiguously using root authentication.
Editing the desktop files looks like the simple way to deal with this; I'll just have to do it again if gparted or Synaptic get updates.
Editing the desktop files looks like the simple way to deal with this; I'll just have to do it again if gparted or Synaptic get updates.
-
Posts: 2,238
- Joined: 16 Dec 2007
#10
I've been playing with antix-core installs, and when installing synaptic, I've also been installing policykit-1-gnome which is an authenticator. the duplicate entries work with that.
-
anticapitalista
Posts: 5,955
- Site Admin
- Joined: 11 Sep 2007
#11
policykit-1-gnome says it all! __{{emoticon}}__
-
Posts: 2,238
- Joined: 16 Dec 2007
#13
True, I wouldn't bother on a full-install, but on a core install, there is nothing there to start with. all the special menu tweaks the crew makes are absent, as there is no WM by default. it was easier to install the authenticator than to edit all the desktop files that kept cropping up with the issue to go to gksu. policykit is already installed, so for 800 kbs of storage space, the problem more or less goes away. There are other authenticators, the gnome one is just the first I played with while messing around with a mate desktop core install. and my menu entries for synaptic work after every update. and there are no duplicates.
so unnecessary on a regular full install - absolutely. but bone simple on a core install building something up from scratch.
so unnecessary on a regular full install - absolutely. but bone simple on a core install building something up from scratch.
-
Alanarchy
Posts 0 Alanarchy
#14
What made me chuckle most Dolphin was the fact that when I first installed AntiX, I was trying to use Thunar as FM, which involved installing policykit-1-gnome, and it was only after watching your Spacefm vids that I realised how it worked and how Spacefm made policykit-1-gnome unnecessary. __{{emoticon}}__