Bug 10553

Summary: /etc/menu.d/fluxbox causes the user-created ~/.fluxbox/menu to be overwritten
Product: Mageia Reporter: noes minombre <mageia-fromthedeep>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: derekjenn
Version: 3   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: fluxbox-1.3.2-5.mga3.src.rpm CVE:
Status comment:

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