Scripting KDE Menu Additions and Removals

James McDonald james
Mon May 17 11:44:40 PDT 2004


Thanks Roger,

Thats exactly what I needed.


Roger Oberholtzer wrote:

>I had a nice long answer for this, and, for the first time, sylpheed froze
>and I lost it. Damn.
>
>Global menu definitions are stored in files in $KDEDRR/share/applnk, and
>mime definitions are in  $KDEDRR/share/mimelnk. The files in these
>directories cross-reference each other.
>
>To remove an application from the K menu, do NOT delete tthe file in
>the applnk directory. Instead, add this to the file:
>
>	NoDisplay:	true
>
>A shell script to do this would be straight forward.
>
>
>To add an item, just add a definition file to $KDEDRR/share/applnk, like the
>following:
>
>
> [Desktop Entry]
> Name=RSofT Configuration Editor
> Name[C]=RSofT Configuration Editor
> Comment[C]=RSofT Configuration Editor
> SwallowExec=
> SwallowTitle=
> BinaryPattern=
> MimeType=rsoft/configuration
> Exec=rxvt -geometry 80x30 -e dtwrap change
> Icon=hwinfo.xpm
> TerminalOptions=
> Path=
> Type=Application
> Terminal=0
> NoDisplay=true
>
>The file should have an extension of .desktop. I called this file
>Change.desktop.
>
>To make a submenu, make a directory in $KDEDRR/share/applnk and put these
>files in that directory.
>
>To add a mimetype, add it to $KDEDRR/share/mimelnk. Here is the one that
>works with the applink above:
>
> [KDE Desktop Entry]
> Comment=RSofT Configuration
> Comment[C]=RSofT Configuration
> Hidden=false
> DefaultApp=Change
> Icon=pipe.xpm
> Type=MimeType
> Patterns=acc.rst;rutdepth.rst;aies.rst;fifo.rst;mca.rst;sampler.rst;
> MimeType=rsoft/configuration
>
>The DefaultApp refers to the file name of the application in the applnk
>directory.
>
>So, it is all just a bunch of small files.
>
>If you want to do a change for a specific user, put the same files in
>$HOME/.kde2/share.
>
>I would imagine that to hide a global menu for just one user would require
>that you copy thr applnk file to the user's applnk directory and add the
>NoDisplay line.
>
>(My lost answer was better, but time...)
>
>On Fri, 21 Feb 2003 10:33:50 +1100
>James McDonald <james at jamesmcdonald.id.au> wrote:
>
>  
>
>>Hi Folks,
>>
>>Long time no post.
>>
>>I have run Redhat for a while but RH8.0 seems to require a lot of extra 
>>additions as I mostly use Linux as an admin/chat/hack system not an 
>>office/games system which is what I think RH are aiming at with RH8.0.
>>
>>I have switched to Mandrake 9.0 and was wondering if anyone can point me 
>>to how to bash script menu modifications... I like KDE3.0 but want to 
>>make my menu 'just the stuff I need, nothing that I don't' but as each 
>>reinstall means this has to be done again and Menuedit MenuDrake take a 
>>longtime to use... so I am wondering about installing/moving menu items 
>>via script....
>>
>>Any pointers would be much appreciated....
>>
>>James McD
>>    
>>
>
>  
>




More information about the Linux-users mailing list