2

We're deploying desktops via PXE/Preseed installations, and I'd like to change the default applications list in dock for new users.

After a fresh install using preseed, a late_command script creates the .desktop files that we need. The apps are present in the activities panel. Now I'd like to create links in the Dock, for all users by default.

I tried the following :

Create /etc/dconf/profile/mycompany file :

user-db:user
system-db:mycompany

Then a /etc/dconf/db/mycompany.d/00-mycompany-settings :

[org/gnome/shell]
favorite-apps = ['firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.gedit.desktop', 'org.gnome.Terminal.desktop', 'libreoffice-writer.desktop', 'org.remmina.Remmina.desktop', 'keepass2.desktop', 'yelp.desktop']

And finaly : sudo dconf update (which correctly creates the /etc/dconf/db/mycompany file)

Yet if I create a new user, and login as this newly created user, I still get the old favorites links. Nothing changed.

I also tried to add a 01-mycompany-settings file in the existing directory /etc/dconf/db/ibus.d/ the dconf update, without success. I also tried to add the configuration lines in /etc/dconf/db/ibus.d/00-upstream-settings, no change.

If I run dconf read /org/gnome/shell/favorite-apps as a new user, first I get nothing (since, I suppose, the user's db does not exists yet and the user has no rigths to read the system db). After adding manually an app to the favorite apps, then it always returns the defaults apps list plus the app I added manualy.

1 Answer 1

1

This solution allowed me to set default favorite applications for users in Ubuntu 18.04. Note: If the user has a ~/.config/dconf/user file that will be used instead and the defaults will not be applied.

mkdir -p /etc/dconf/profile; vim /etc/dconf/profile/user

#This line allows the user to change the default favorites later.
user-db:user
#This line defines a system database named msb
system-db:msb

mkdir -p /etc/dconf/db/msb.d; vim /etc/dconf/db/msb.d/00_msb_settings

# Define default favorite apps
[org/gnome/shell]
favorite-apps = ['chromium-browser.desktop', 'firefox.desktop', 'gnome-terminal.desktop', 'nautilus.desktop']

dconf update; chmod a+rx -R /etc/dconf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .