Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to do something like this:

My folder script contains ten scripts, I want to create .desktop files and new menu under Applications called "myScript".

I'm able to create .desktop with script but I don't want to use Alacarte but instead use a script process to make all in batch mode.

I cannot understand why the .desktop is shown only in category:Other. Yes I know it is possible to open Alacarte and move the launchers in any category, but for a batch process I want to do this with a script.

I don't know how to obtain information because I don't know how Alacarte works. I have tested some of my .desktop by inserting the Category:Gnome;GTK;mymenu but the launchers go in menu:"Other".

I hope my description is clear. I am using Gnome shell 3 with Ubuntu Precise.

share|improve this question
1  
There's only a few categories. You can't just make up random ones like "mymenu". :) Check out the main category list here: standards.freedesktop.org/menu-spec/… –  algebralives Jul 24 '12 at 1:50
    
thanks for your link was useful ;-) –  johnny cravatta Jul 26 '12 at 18:36
add comment

1 Answer

ok finally i have find one solution, and one website is very useful to understand this: http://www.frankrock74.it/frankrock74/?p=1738
i do something like this: open alacarte and made my personal menu "Script" as an empty menu.I can put this in any menu but i choose Application. Now i create my personal .desktop file as is for example.:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec= /home/$USER/myscript/script.sh
Name=script1
Icon=/home/$USER/image/icon.png
Categories=Script

Now is important to made one modification inside a file: Terminal: gedit ~/.config/menus/applications.menu in this file is possible to view the desktop directories created with alacarte, example:

<Name>alacarte-made-1</Name>

<Directory>alacarte-made-1.directory</Directory>

this second voice is the menù i have created "Script" to make the launchers functionally inside this desktop.directory is necessary to add this line after the upper voice. A directive to the menu to include our category As is:

    <Include>
  <And>
    <Category>Script</Category>
  </And>
</Include>

in finally we have somthing like this:

        <Name>alacarte-made-1</Name>
    <Directory>alacarte-made-1.directory</Directory>
<Include>
  <And>
    <Category>Music</Category>
  </And>
</Include>

NOw saved and finally any my.desktop files i put inside the folder: ~/.local/share/applications/ is recognized in my personal menù and works well. Is a good choice to read this web site to understanding desktop directories: http://library.gnome.org/admin/system-admin-guide/stable/menustructure-desktopentry.html.en hoping my english is comprensible. regards

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.