Create Gnome menu entry

# login as root
sudo su

# create group
cat </etc/xdg/menus/applications-merged/my.menu

Applications

my
my.directory

my

my-sub
my-sub.directory

my-sub

EOF

# create directory for entry
cat < /usr/share/desktop-directories/my.directory
[Desktop Entry]
Type=Directory
Name=MyMenu
Icon=emblem-favorite
EOF

# create sub directory for entry
cat < /usr/share/desktop-directories/my-sub.directory
[Desktop Entry]
Type=Directory
Name=MySubMenu
Icon=folder
EOF

# create application starter and add to my entry
cat < /usr/share/applications/myapp1.desktop
[Desktop Entry]
Name=MyApplication1
Exec=nautilus
Icon=system-file-manager
Terminal=false
Type=Application
Categories=my;
EOF

# create application starter and add to my-sub entry
cat < /usr/share/applications/myapp2.desktop
[Desktop Entry]
Name=MyApplication2
Exec=nautilus
Icon=computer
Terminal=false
Type=Application
Categories=my-sub;
EOF

# Links
https://wiki.matusov.sk/?id=howto/gnome-menu-edit