LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-22-2004, 12:33 PM   #1
anura
LQ Newbie
 
Registered: Feb 2004
Posts: 10

Rep: Reputation: 0
Smile one way to do custom menus without kmenuedit


It is quite possible that there are better ways to create custom menus,
but I was not able to find any howto.

So I tried and finally found out how to create custom menus for single users
without kmenuedit on SuSE 9.0, KDE 3.1. If you have trouble with kmenuedit you
might try the following:

Place your links (.desktop files) in
/home/username/.local/share/applications

Place your menus (.directory files) in
/home/username/.local/share/desktop-directories

Edit your file applications-kmenuedit.menu:
/home/username/.config/menus/applications-kmenuedit.menu

Press CTRL + ALT + Backspace to log in again and see the changes.


Here is an example which is working for me:
************************************

link files:
/home/username/.local/share/applications/Gimp.desktop
/home/username/.local/share/applications/Sodipodi.desktop
/home/username/.local/share/applications/evolution.desktop
/home/username/.local/share/applications/KMail.desktop


menu files:
/home/username/.local/share/desktop-directories/NameOfMainMenu.directory
/home/username/.local/share/desktop-directories/Graphics.directory
/home/username/.local/share/desktop-directories/Email.directory



Content of the file /home/username/.config/menus/applications-kmenuedit.menu
(Sorry, I canīt include the full "<!DOCTYPE ..." here as new forum members are not
allowed to post urls... So please see the first line in your file applications-kmenuedit.menu):

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" ... >

<Menu>


<Menu>
<Name>NameOfMainMenu</Name>
<Directory>NameOfMainMenu.directory</Directory>
</Menu>

<Menu>
<Name>Graphics</Name>
<Directory>Graphics.directory</Directory>
<Include>
<Filename>Gimp.desktop</Filename>
<Filename>Sodipodi.desktop</Filename>
</Include>
</Menu>

<Menu>
<Name>Email</Name>
<Directory>Email.directory</Directory>
<Include>
<Filename>evolution.desktop</Filename>
<Filename>KMail.desktop</Filename>
</Include>
</Menu>



<Move>
<Old>Graphics</Old>
<New>NameOfMainMenu/Graphics</New>
</Move>


<Move>
<Old>Email</Old>
<New>NameOfMainMenu/Email</New>
</Move>


</Menu>


***************************************************************

With the sections <Move>...</Move> you create the submenus
"Graphics" and "Email" in the custom menu "NameOfMainMenu".

If you donīt include these sections you will create single independent menus.

If you want to include an already existing menu as a submenu
of your custom menu, just add a <Move>...</Move> section with
the name of the existing menu.



If you already tried to make your menu with kmenuedit and did not succeed,
there is a lot of code in applications-kmenuedit.menu and a lot of .desktop
and .directory files which you may wish to delete before creating your custom
menu manually:

1. delete all .desktop files in /home/username/.local/share/applications
2. delete all .directory files in /home/username/.local/share/desktop-directories
3. delete the text in /home/username/.config/menus/applications-kmenuedit.menu
4. press CTRL + ALT + Backspace to log in again and activate the changes.
5. start creating your custom menu as described above


This is just what I found out. Hope it is of use for someone ;-)
 
Old 04-14-2004, 11:03 AM   #2
Larry Staberg
LQ Newbie
 
Registered: Feb 2004
Location: Bellevue, WA
Distribution: Fedora 6
Posts: 4

Rep: Reputation: 0
Have you in your wanderings found a forum that specializes in kde administratio?

I would like to customize the files in /usr/share/??? to affect all users both for the K-menu and for the Panel..

With your effort I'm trying to look at similar files in /usr/share but it has been difficult..

Things have changed a great deal from the 2.x to 3.2 versions as to where you put system wide configuration..

Compounding this is the fact that I'm not sure who's designing these locations, Redhat or KDE....

I've yet to find a 'how to config kde'...
 
Old 05-06-2014, 05:32 PM   #3
Logomachist
LQ Newbie
 
Registered: Aug 2009
Posts: 28

Rep: Reputation: 0
Question Are menu files still in $HOME ?

Is this info still current? I don't have /home/username/.local/share/applications or /home/username/.local/share/desktop-directories directories. I do however have a lot of .directory files in /usr/share/desktop-directories/ and .desktop files in /usr/share/applications/ and /usr/share/kde4/ (and subdirectories).

Have the files been moved to a new directory? Or are these other files used for something else? Know of any online references explaining how the menu files are parsed?

ETA: I just found http://standards.freedesktop.org/men...-spec-1.0.html which explains how the menu files are parsed.

Last edited by Logomachist; 05-06-2014 at 05:47 PM. Reason: Found the menu spec 1.0 which answers some of my questions
 
Old 05-06-2014, 06:33 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,502

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
you do know that his thread is 10 YEARS old
a lot of things have changed in 10 YEARS
for one thing the desktop went from KDE3 to KDE4
and moved off QT 2 and 3 to QT 4 and 5

also you DO have this folder
"/home/username/.local":
just replace "username" with YOUR USERS NAME
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KMenuEdit not saving changes CrEsPo Slackware 7 05-09-2005 08:08 PM
tired of kmenuedit foustware Fedora 3 05-08-2005 02:27 PM
kmenuedit does not save davidsrsb Slackware 0 03-26-2004 09:39 AM
kmenuedit linuxBill Linux - General 9 07-11-2003 03:15 PM
can't delete with kmenuedit digitized_funk Linux - Newbie 2 03-23-2003 10:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration