Results 1 to 3 of 3

Thread: Edit Gnome menus in text editor?

  1. #1
    Join Date
    Mar 2011
    Location
    Cary, NC, USA
    Beans
    17
    Distro
    Xubuntu 14.04 Trusty Tahr

    Edit Gnome menus in text editor?

    I've found the Gnome UI for editing menus a bit tedious; for example, there is no way to copy a menu entry! I want to add several similar entries, for doing ssh -X to various systems.

    This page[1] describes the menu files/locations but when I added a "Remote Systems" menu to my Application menu, I see no evidence of it in my ~/.config/menus/application.menu (nor in /etc/xdg/menus/applications.menu but I would not expect a user customization to show up there)

    I'm fine with editing XML in Emacs if I just knew where to look. This superuser thread [2] is close but the locations it mentioned don't exist in my sustem or describe editing global menus, not ~/.config per-user menus. Where should I look?

    1: http://library.gnome.org/admin/syste...ure-13.html.en
    2: http://superuser.com/questions/68089...e-command-line

  2. #2
    Join Date
    Nov 2010
    Location
    Berlin, Germany
    Beans
    4,534
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Edit Gnome menus in text editor?

    Ok, I did some practical research, meaning adding some submenus and submenu items and see what effect that has on "applications.menu".

    It turned out that when you add a custom submenu and custom item via the GUI, it ends up like this in "applications.menu":
    Code:
        <Menu>
            <Name>alacarte-made</Name> (1)
            <Directory>alacarte-made.directory</Directory> (2)
            <Include>
                <Filename>alacarte-made.desktop</Filename> (3)
            </Include>
        </Menu>
    (1) gets pulled from (2)
    (2) points to the file "~/.local/share/desktop-directories/alacarte-made.directory"
    (3) points to the file "~/.local/share/applications/alacarte-made.desktop"

    And when you change the position of the submenu, it gets listed into the layout section:
    Code:
        <Layout>
            <Merge type="menus"/>
            <Menuname>Accessories</Menuname>
            <Menuname>alacarte-made</Menuname>
            <Menuname>Debian</Menuname>
            <Menuname>Education</Menuname>
            <Menuname>Games</Menuname>
            <Menuname>Graphics</Menuname>
            <Menuname>Internet</Menuname>
            <Menuname>Office</Menuname>
            <Menuname>Other</Menuname>
            <Menuname>Development</Menuname>
            <Menuname>Science</Menuname>
            <Menuname>Multimedia</Menuname>
            <Menuname>System</Menuname>
            <Menuname>Universal Access</Menuname>
            <Menuname>wine-wine</Menuname>
            <Separator/>
            <Filename>Run Application....desktop</Filename>
            <Filename>ubuntu-software-center.desktop</Filename>
            <Merge type="files"/>
        </Layout>
    Greetings.

  3. #3
    Join Date
    Mar 2011
    Location
    Cary, NC, USA
    Beans
    17
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Edit Gnome menus in text editor?

    Quote Originally Posted by Krytarik View Post
    Ok, I did some practical research, meaning adding some submenus and submenu items and see what effect that has on "applications.menu".
    [...]
    1) gets pulled from (2)
    (2) points to the file "~/.local/share/desktop-directories/alacarte-made.directory"
    (3) points to the file "~/.local/share/applications/alacarte-made.desktop"
    [...]
    Greetings.
    Thank you so much! I had tried a find(1) for 'alacart*' in ~/.config but did not know about ~/.local

    I'll see if I can figure out who can update the Gnome doc at http://library.gnome.org/admin/syste...ure-13.html.en which does not mention ~/.local

    UPDATE: I found the ~/.local files documented a bit at Desktop Menu Specification
    Last edited by DavidBiesack; March 30th, 2011 at 01:11 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •