Bug 67824

Summary: edited menu options never saved to .desktop file
Product: [Applications] kmenuedit Reporter: klee
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: tom+kdebugs, tyrerj
Priority: NOR    
Version: 0.4   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: output for: find ~/.local ~/.kde/share/applnk -name '*.desktop'
kbuildsycoca and ~/.config/menus/applications-kmenuedit.menu output
kbuildsycoca and ~/.config/menus/applications-kmenuedit.menu output

Description klee 2003-11-10 22:38:27 UTC
Version:           0.4 (using KDE 3.1.93 (CVS >= 20031028), yes)
Compiler:          gcc version 3.2
OS:          Linux (i686) release 2.4.21-1up.1

When I open kmenuedit with current CVS and edit some menu entry, the edits are never saved to disk and the .desktop file remains unchanged (or, if there's no .desktop file in my current $KDEHOME, then no .desktop file is created).

My exact sequence of actions:
1. K-menu -> Settings -> Menu Editor
2. Choose any menu item.
3. Edit any setting --- e.g., "Work path"
4. File -> Save
5. Close Menu editor
6. Restart the menu editor and go to the same shortcut.  The altered setting has been lost.
Comment 1 Waldo Bastian 2003-11-18 17:50:23 UTC
I think it is fixed, can you verify?

I believe this was fixed on 2003/10/19 but you report a KDE version of
CVS >= 20031028, so that's a bit strange.
Comment 2 klee 2003-11-19 01:46:01 UTC
I am running CVS HEAD off anoncvs.kde.org from this past weekend (at least mid-November), and it still displays this bug.

cvs status in kdebase/kmenuedit/ indicates that I am up-to-date.  I have done make clean/make/make install in the kmenuedit/ subdirectory.  So I am definitely running a current version of kmenuedit at least.

I will try doing make distclean and rebuild of kdelibs and kdebase this coming weekend, in case it's an issue of incorrect incremental recompilation elsewhere in the KDE distribution.
Comment 3 klee 2003-11-21 21:54:27 UTC
I can confirm.  Did full CVS update, make distclean/make -f Makefile.cvs/make/make install on both kdelibs and kdebase of 20 Nov. and the bug persists.
Comment 4 Daniel Naber 2004-01-24 18:27:56 UTC
Can anybody still reproduce this? I cannot.
Comment 5 Niels 2004-01-29 19:37:06 UTC
I don't know if this is the same problem, but I also can't save any changes from "KDE Menu Editor". I'm using rc1.
What file should it write to?
Comment 6 Niels 2004-01-29 19:51:56 UTC
Running kmenuedit in the konsole yields:

failed to create /home/niels/.config/menus/
kmenuedit: WARNING: Could not read /home/niels/.config/menus/applications-kmenuedit.menu
Comment 7 Niels 2004-01-29 19:58:45 UTC
If I create /home/niels/.config/menus/ kmenuedit still complains, and in any case that can't be where the configuration should be located. If I try to save changes, the konsole says:

X Error: BadWindow (invalid Window parameter) 3
  Major opcode:  20
  Minor opcode:  0
  Resource id:  0x280055d
Comment 8 Niels 2004-01-29 20:11:24 UTC
Fourth time lucky: after creating the file (not just the folder), everything works. The file is apparently not in the .kde folder because of freedesktop compliance.


touch ~/.config/menus/applications-kmenuedit.menu


(Sorry about all the noise from me!)
Comment 9 Waldo Bastian 2004-01-29 23:06:34 UTC
Niels: Can you provide the output of "ls -al ~/.config" ?
Comment 10 Niels 2004-01-29 23:28:06 UTC
Sure:

ls -al ~/.config
totalt 40
drwxr-xr-x    3 niels    users        4096 2004-01-29 19:56 .
drwx-----T   84 niels    users       32768 2004-01-29 23:28 ..
drwx------    2 niels    users        4096 2004-01-29 19:57 menus
Comment 11 Frans Pop 2004-02-08 02:24:08 UTC
I have the same problem as the original report: changes to for example Command or Work path are gone when kmenuedit is started again.
I get no errors when I start kmenuedit from Konsole.

KDE Version: 0.5 (KDE 3.2.0, (3.0))
Operating System: Linux (i686) release 2.4.20-031102

This from the 3.2 Debian Woody backports after upgrading from the 3.1.4 backports.
With 3.1.4 kmenuedit worked fine.

Happy to help if further information is wanted...
Comment 12 Brett Randall 2004-02-13 05:30:55 UTC
I am using 3.2 compiled from source using Konstruct running on Mandrake 9.2, and any changes I make using kmenuedit that I expect to change the .desktop file with don't have any effect on the menu. A .desktop file is created in ~/.local/share/applications with the appropriate changes, but they don't seem to have any effect. Does this mean that KDE is not appropriating the changes correctly, or that kmenuedit is saving them in the wrong place? I'm guessing its kmenuedit's fault, as restarting kmenuedit results in the changes having disappeared as well.

I still have KDE 3.1 installed on my computer, however KDE 3.2 is in ~/kde3.2 and ~/kde3.2/bin is the first item in my path, set in my .bashrc. I've also symbolically linked /usr/bin/startkde to ~/kde3.2/bin/startkde for the sake of not having to make any major changes to my KDM. Just in case any of this is important...
Comment 13 Paul Curry 2004-02-20 22:43:54 UTC
The menu editor won't save changes for me either.  I have a ~/.config/menus/applications-kmenuedit.menu file that gets updated every time I save.  I get the same error as in comment #7 when I run kmenuedit from the console.  I am using kde 3.2.0 installed from slackware packages.
Comment 14 Steven Benario 2004-02-21 16:06:10 UTC
I can confirm that any changes I make (and save from the menu) are also not saved anywhere. I've been trying to change the path of a program (which I upgraded), and I can't seem to get it to save. I'm using Debian Testing, KDE 3.2 (apt-get installed). Is there a file that I can manually edit or some known workaround?
Comment 15 David Zaslavsky 2004-03-07 19:03:47 UTC
I was able to resolve a problem similar to reply #12 by making kmenuedit run 
as setuid(root) (doing "chmod u+s $KDEDIR/bin/kmenuedit").  What was 
happening was that when I would try to save the menu configuration, the 
progress dialog that pops up saying "Updating system configuration" would 
progress from 0% to 90% and then restart at 0%, over and over, until I had to 
click Cancel - and the menu configuration would not be saved.

FYI I am running KDE 3.2 (not CVS) compiled from source on Mandrake 9.2; I 
have KDE installed in /usr/local/kde and I ran the install process as root 
using a homemade Makefile . . .

Comment 16 Peter Canada 2004-03-13 04:41:05 UTC
I opened menu editor, clicked on Apps, then went to the right side and edited the word "Apps" to read "Applications", then I went to the menu editors menu and selected save and then I selected quit and checked the real menu and it still reads as "Apps". It seems some changes shows up but others do not, they seem to dissappear.
Comment 17 Peter Canada 2004-03-13 04:42:35 UTC
A note.....I'm runing KDE 3.2.1 on linux kernel 2.6.4
Comment 18 David Baron 2004-03-14 15:41:11 UTC
Yes, this has come up again in KDE3.2.

Added entries are saved.
Changed entries, i.e. command or path are NOT.

Pain in the butt.
Comment 19 Jose Hernandez 2004-03-14 20:51:44 UTC
Yep. I think some .desktop files are have user without write access. I installed OpenOffice 1.1.0 then uninstalled and insatalled 2.0 development and am having a very tough time trying to get mime types and even the start menu working right. I noticed the .desktop files for OOo1.1.0 didn't have write access.
Comment 20 Waldo Bastian 2004-03-15 12:17:02 UTC
David Baron: Which entries did you try to change? Do you have write access to the .desktop files for those entries?
Comment 21 Paul Curry 2004-03-16 16:41:40 UTC
I got my menu editor to work by deleting the /var/tmp/kdecache-USER/ksycoca file and then running kbuildsycoca.  The original ksycoca file was owned by root and the new one is owned by the user.
Comment 22 Reed Sheridan 2004-04-03 15:37:45 UTC
I'm having the same problem.  I cannot add, delete, or modify anything with kmenuedit.  It doesn't give any error messages when starting from the command line or the GUI.  I have the latest packages from debian unstable - kmenuedit is from 3.2.
Comment 23 James Richard Tyrer 2004-04-04 20:23:23 UTC
Version 0.5 appears to fix this problem.

I will wait till the formal release of KDE-3.2.2 and test with the test case.

If anyone has problems with KDE-3.2.2, please advise me.

Otherwise, this will be closed as fixed in the near future.

--
JRT
Comment 24 Tom Simnett 2004-04-17 15:14:15 UTC
I'm using 0.5 and I cannot edit menu entries. Just installed k3b, which for some reason didn't install a menu entry. Tried using kmenuedit to do it, but it won't save the changes. Arson (which I have uninstalled, and tried to remove from the menu) still shows up, but k3b doesn't.
Comment 25 Peter Canada 2004-04-17 23:08:31 UTC
Heh....one nasty litlle bug that doesn't want to be exterminated.


<Sees the bug on the ground, and quickly tries to stomp it. DOH, missed it...that's one little sneaky bug. K, where's the RAID Spray, maybe that will help.>
Comment 26 Niels 2004-04-27 00:34:11 UTC
Kmenuedit has worked without error for me in KDE 3.2.2. I simply couldn't get 3.2.1 to give Firefox an icon, no matter what trick I tried. With 3.2.2 it worked as expected the first time. Thanks!
Comment 27 Tom Simnett 2004-04-27 03:50:53 UTC
I'm using 3.2.2 and it won't go away. I've tried removing ~/.kde/share/applnk/* and ~/.config/menus/* and it didn't make a difference. Menu's still can't be edited.
Comment 28 Waldo Bastian 2004-05-04 15:57:05 UTC
Tom: which menu item do you try to edit? Where is the .desktop file located that belongs to that item? What are the file permissions of this .desktop file? Can you attach the output of the following command:
	find ~/.local ~/.kde/share/applnk -name '*.desktop'
to this bugreport, both before and after you try to edit a menu item?
Comment 29 Tom Simnett 2004-05-04 16:17:40 UTC
Created attachment 5876 [details]
output for: find ~/.local ~/.kde/share/applnk -name '*.desktop'

As requested. It appears that an item exists, but it doesn't appear in the
menu.
Comment 30 Waldo Bastian 2004-05-04 16:43:13 UTC
Tom: Thanks, that looks good, can you also attach
	~/.config/menus/applications-kmenuedit.menu ?

and the output of:
	kbuildsycoca --menutest
Comment 31 Tom Simnett 2004-05-04 17:13:15 UTC
Created attachment 5877 [details]
kbuildsycoca and ~/.config/menus/applications-kmenuedit.menu output
Comment 32 Tom Simnett 2004-05-04 17:15:12 UTC
Created attachment 5878 [details]
kbuildsycoca and ~/.config/menus/applications-kmenuedit.menu output
Comment 33 Tom Simnett 2004-05-04 17:16:28 UTC
Sorry for duplicating that attachment. It didn't appear at all on my system.
Comment 34 Waldo Bastian 2004-05-04 17:23:17 UTC
Tom: Your problem is this:
kbuildsycoca: ERROR creating database '/var/tmp/kdecache-simmerz/ksycoca'!
kbuildsycoca: Wrong permissions on directory? Disk full?
Comment 35 Tom Simnett 2004-05-04 17:42:32 UTC
chmodded, chgrouped and now working. Many thanks!
Comment 36 Waldo Bastian 2004-05-12 17:14:38 UTC
Seems fixed then, perhaps kbuildsycoca should complain more loudly if it can't write.