Bug 10553 - /etc/menu.d/fluxbox causes the user-created ~/.fluxbox/menu to be overwritten
Summary: /etc/menu.d/fluxbox causes the user-created ~/.fluxbox/menu to be overwritten
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 3
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-18 11:32 CEST by noes minombre
Modified: 2013-06-28 22:42 CEST (History)
1 user (show)

See Also:
Source RPM: fluxbox-1.3.2-5.mga3.src.rpm
CVE:
Status comment:


Attachments

Description noes minombre 2013-06-18 11:32:26 CEST
Description of problem:

In mageia3, the user-created fluxbox menu in ~/.fluxbox/menu, if it exists, gets overwritten by the overzealous menu-creation shellscript in /etc/menu.d/fluxbox.

Version-Release number of selected component (if applicable):

1.3.2-5.mga3

How reproducible:

100%


Steps to Reproduce:
1. Install fluxbox
2. Configure ~/.fluxbox/menu
3. Install an rpm which contains a menu

patch to fix:


--- fluxbox.old	2013-06-18 02:01:28.610514703 -0700
+++ fluxbox	2013-06-18 02:01:55.725843341 -0700
@@ -1,10 +1,6 @@
 #!/bin/sh
 
-if [ "$USER_MENU" = "1" ]; then
- OUTPUTDIR=$HOME/.fluxbox
-else
- OUTPUTDIR=/etc/X11/fluxbox
-fi
+OUTPUTDIR=/etc/X11/fluxbox
 
 if [ "$VERBOSE" = "1" ]; then
  echo "writing to $OUTPUTDIR/menu"


Reproducible: 

Steps to Reproduce:
Comment 1 noes minombre 2013-06-18 20:31:34 CEST
This is also a problem with icewm; the script /etc/menu.d/icewm overwrites the icewm user menu. Here's the patch for that:

--- icewm.old	2013-06-18 11:23:56.464184933 -0700
+++ icewm	2013-06-18 11:24:56.865879012 -0700
@@ -1,10 +1,6 @@
 #!/bin/sh
 
-if [ "$USER_MENU" = "1" ]; then
- OUTPUTDIR=$HOME/.icewm
-else
- OUTPUTDIR=/usr/share/X11/icewm/
-fi
+OUTPUTDIR=/usr/share/X11/icewm/
 
 echo "prog \"Terminal\" /usr/share/icons/mini/terminals_section.png /usr/bin/xvt" > $OUTPUTDIR/menu
Comment 2 Derek Jennings 2013-06-28 22:30:52 CEST
This is the intended behaviour.  It is how fluxbox and IceWm get to know which new packages have been installed. At each log in the menus are rebuilt.
The $USER_MENU variable us used to tell the script if it is being run as a user or as root. When run as a user it updates the menu in ~/.fluxbox


If you want to use your own menu for fluxbox edit ~/.fluxbox/init and set 

session.menuFile:

CC: (none) => derekjenn

Comment 3 noes minombre 2013-06-28 22:42:18 CEST
Thank you!

Status: NEW => RESOLVED
Resolution: (none) => INVALID


Note You need to log in before you can comment on or make changes to this bug.