create global GNOME app folder categories


Summary: I want to create Groups in GNOME app launcher (app folder categories) but dont know where to put the config for all users.

openSUSE 13.2 x86_64; GNOME 3.14.1

I have some desktop files with “Categories=GNOME;X-MYGROUP;” in /usr/share/applications/ a /usr/share/desktop-directories/ and /etc/xdg/menus/applications-merged/ All installed desktop files are listed with the app launcher correctly.

Now, I want to build a Group (in GNOME words Categories since 3.10). For a user I can

# gsettings set folder-children "'Utilities', 'Sundry', 'YaST', 'MyGroup']"
# gsettings set name "My Group"
# gsettings set categories "'X-MYGROUP']"

and all works as expected. Now, I want to configure this for all users (incl new users).

I create a glib-2.0 schema


<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="gsettings-desktop-schemas">
  <schema path="/org/gnome/desktop/app-folders/folders/MyGroup/" id="">
    <key type="s" name="name">
      <default>'My Group'</default>
      <summary>Folder name</summary>
      <description>The name of the application folder.</description>
    <key type="as" name="categories">
      <description>A list of categories for which apps will be placed into this folder by default, in addition to the apps that are listed in the apps key.</description>



folder-children = 'Utilities', 'Sundry', 'YaST', 'MyGroup']

categories = 'X-MYGROUP']
name = 'My Group'


glib-compile-schemas /usr/share/glib-2.0/schemas

and for safety, a reboot, without success.

dconf-editor shows the config I made on the right place but gsettings only patially:

# gsettings get folder-children
'Utilities', 'Sundry', 'YaST', 'MyGroup']
# gsettings get categories
@as ]
# gsettings get name

I also tried to configure it via dconf profiles in /etc/dconf/profile but without success too.

I have searching how the YaST entries find its way but can’t locate them.

Can anyone help here?

Thanks in advance

OK, here is a solution:

dconf profiles are the correct place to configure this:

#  -d /etc/dconf/profile ] && mkdir -p /etc/dconf/profile
#  -d /etc/dconf/db/site.d ] && mkdir -p /etc/dconf/db/site.d
# cat >> /etc/dconf/profile/user <EOF
# cat >> /etc/dconf/db/site.d/00_site_settings_my_group <EOF
folder-children = 'Utilities', 'Sundry', 'YaST', 'MYGROUP']

categories = 'X-MYGROUP']
name = 'My Group'

# dconf update

With this proceeding it’s easy to build other application groups like older gnome versions did it:

# cat >> /etc/dconf/db/site.d/10_site_settings_office <EOF
folder-children = 'Utilities', 'Sundry', 'YaST', 'MYGROUP', 'Office']

categories = 'Office']
name = 'Office'

# dconf update

and surprisedly all libreoffice Office applications (and some other) are in such a group. To discover wich Categorie you should use:

# grep Categories /usr/lib64/libreoffice/share/xdg/writer.desktop

All files in /etc/dconf/db/site.d/ are processed in lexical order and therefore it is important to ensure that the last file contains all your app folers.

If you played with dconf-editor or gsettings you have a local user-config and you don’t see the global modifications. You can reset the entry by:

gsettings reset folder-children