Bug 79059 - Menu Editor should be able to edit the global menu using the vfolder system.
Summary: Menu Editor should be able to edit the global menu using the vfolder system.
Status: CONFIRMED
Alias: None
Product: kmenuedit
Classification: Applications
Component: general (show other bugs)
Version: 0.5
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 21151 30555 75055 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-04 20:39 UTC by James Richard Tyrer
Modified: 2020-02-20 19:47 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Richard Tyrer 2004-04-04 20:39:17 UTC
Version:           0.5 (using KDE KDE 3.2.2)
Installed from:    Compiled From Sources
Compiler:          GCC 3.3.3 
OS:          Linux

With the new vfolder (XDG) menu system, you can no longer edit the global (default) menu by changing KDEHOME to KDEDIR, and I haven't been able to figure out any to do it.

Therefore, KMenuEdit must have an option to edit the global menu.  I would suggest that this be a command line option.  E.G. "kmenuedit --global".

I have looked into this and it appears that all that this option needs to do is to change the paths read (it should ONLY read the global menu files) and the directories where new files are written:

	"$HOME/.local/share" 

replaced with: 

	"$KDEDIR/share"

And
	"$HOME/.config/menus" 

replaced with: 

	"/etc/xdg/menus/applications-merged

Note that this may cause another bug.  I had some problems when testing this by hand with: "kbuildsycoca" complaining about invalid 'desktop' files.  I did not determine exactly what was wrong with them.

Note that since the change to vfolders has removed previous functionality, I am classifying this as a bug rather than a wishlist item.

--
JRT
Comment 1 Waldo Bastian 2004-04-04 23:19:31 UTC
Functionality is/will be provided by kiosktool.
Comment 2 James Richard Tyrer 2004-04-06 10:57:49 UTC
Re: original report:
<<
Note that this may cause another bug. I had some problems when testing this by hand with: "kbuildsycoca" complaining about invalid 'desktop' files. I did not determine exactly what was wrong with them. 
>>
The problem is caused by the file permissions of the files written which need to be 644 rather than 600.

--
JRT
Comment 3 James Richard Tyrer 2004-04-12 01:40:07 UTC
I have installed KioskTool, and I don't think that this will meet the needs of the average user that simply needs to make a minor changed to the menu and wants it to take effect globally.

IMHO, what is need is in: "Panels" KCM under the: "Menus" tab, the button: "Edit K Menu" needs to be moved up and button: "Global Menu" added below it.  This buttong would bring up KDESU for the root password since only 'root' should be allowed to edit the global menu.

The work around for this is:

As root:

Rename:
    /root/.local/share/applications
to:
    /root/.local/share/applications.save

Rename:
    /root/.local/share/desktop-directories
to:
    /root/.local/share/desktop-directories.save

Rename:
    /root/.config/menus
to:
    /root/.config/menus.save

Make links:
    /root/.local/share/applications
->
    $KDEDIR/share/applications

Link:
    /root/.local/share/desktop-directories
->
    $KDEDIR/share/desktop-directories

Link:
    /root/.config/menus
->
    $KDEDIR/etc/xdg/menus/applications-merged

NOTE: this is for built from source and it might be distro specific. :-(

As root in a Konsole, execute:

    kmenuedit

Edit the menu and the changes will be made to the global menu.  However, they will only work for 'root'.  To get them to work for user accounts, you will need to change the permissions on (some[]? of) the files that were created/changed.  Look for the files that were created in:

    $KDEDIR/share/applications
    $KDEDIR/share/desktop-directories
    /etc/xdg/menus/applications-merged

and change their permissions to 644.  They should be owned by root:root.

As user in a Konsole, execute:

    kbuildsycoca

to make sure that it all works OK.

Remove (or rename) the links and change the names of the three directories back to what they were.

WARNING, don't do anything else while you have these temporary changes in place.

Since this works, it is my conclusion that minor changes in the current KMenuEdit could make this work.

--
JRT
     
Comment 4 James Richard Tyrer 2004-04-12 01:41:11 UTC
I am reopening this as "WishList" but with HI priority.  I have assigned it to myself and I hope to have a patch available in the near future.
Comment 5 James Richard Tyrer 2004-04-18 21:56:04 UTC
Working on this, I find an additional issue, when you use the workaround:

If the '*.desktop' file is in a subdirectory.  E.G.:

$KDEDIR/share/applications/<sub_dir>/

Then the '*.desktop' file in that directory will be deleted and replaced with one named: "<sub_dir>-<base_name>.desktop" in the directory:

$KDEDIR/share/applications/

This does not prevent the workaround from working, but it needs to be addressed in a fix because it will cause problems when upgrading.

To prevent problems when upgrading, you should move the file and rename it by removing: "<sub_dir>-".

--
JRT
Comment 6 Waldo Bastian 2004-05-04 16:07:26 UTC
*** Bug 75055 has been marked as a duplicate of this bug. ***
Comment 7 Waldo Bastian 2004-05-04 16:15:03 UTC
*** Bug 30555 has been marked as a duplicate of this bug. ***
Comment 8 Waldo Bastian 2004-05-04 16:25:02 UTC
*** Bug 21151 has been marked as a duplicate of this bug. ***