Default Configurations

Asked by Primož Ajdišek

I would like to have my own DE custumisations and when i create new user (when installing or when installed) i want it to have that configs instead of default that come with DE

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

This can be done; there are a few approaches you can use... I'll post some techniques here when I get some time.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Primož Ajdišek (bigpod) said :
#3

Still waiting, just refreshing

Revision history for this message
Cubic PPA (cubic-wizard) said :
#4

Create a file called 90_ubuntu-settings.gschema.override and place it in the /usr/share/glib-2.0/schemas/ directory in Cubic. The keys and values in this file are the ones you see in dconf-editor.

Here is an example file to get you started:

[com.ubuntu.update-notifier]
regular-auto-launch-interval = 0

[org.gnome.desktop.background]
picture-uri = 'file:///usr/share/backgrounds/my_background.jpg'
show-desktop-icons = false

[org.gnome.desktop.datetime]
automatic-timezone = true

[org.gnome.desktop.interface]
clock-format = '12h'
clock-show-date = true
clock-show-seconds = true
cursor-theme = 'DMZ-Black'
document-font-name = 'Liberation Sans 10'
font-name = 'Liberation Sans 10'
gtk-theme = 'Adapta'
icon-theme = 'Papirus-Adapta'
monospace-font-name = 'Liberation Mono 9'
show-battery-percentage = true

[org.gnome.desktop.peripherals.mouse]
speed = 0.75

[org.gnome.desktop.peripherals.touchpad]
natural-scroll = true
# speed = 0.75
speed = 1.00
tap-to-click = true

[org.gnome.desktop.screensaver]
picture-uri = 'file:///usr/share/backgrounds/my_background.jpg'

[org.gnome.desktop.wm.preferences]
button-layout = 'close,minimize,maximize:appmenu'
mouse-button-modifier = '<Alt>'
titlebar-font = 'Liberation Sans 10'
# titlebar-uses-system-font = false

[org.gnome.gedit.plugins]
active-plugins = ['charmap', 'codecomment', 'devhelp', 'docinfo', 'filebrowser', 'findinfiles', 'modelines', 'smartspaces', 'sort', 'sourcecodebrowser', 'spell', 'textsize', 'time', 'wordcompletion', 'zeitgeist']

[org.gnome.gedit.preferences.editor]
auto-indent = true
bracket-matching = true
create-backup-copy = false
display-overview-map = true
display-right-margin = true
highlight-current-line = true
insert-spaces = true
right-margin-position = 80
# scheme = 'tango_custom'
tabs-size = 4

[org.gnome.gedit.preferences.ui]
show-tabs-mode = 'always'

[org.gnome.gnome-system-monitor]
current-tab = 'resources'

[org.gnome.nautilus.icon-view]
# default-zoom-level = 'large'
default-zoom-level = 'standard'

[org.gnome.nautilus.preferences]
click-policy = 'single'
show-create-link = true
show-image-thumbnails = 'always'
# sort-directories-first = true

[org.gnome.power-manager]
info-last-device = '/org/freedesktop/UPower/devices/battery_BAT0'
info-history-graph-points = false
info-page-number = 1
info-stats-graph-points = false

[org.gnome.settings-daemon.plugins.color]
night-light-enabled=true

[org.gnome.settings-daemon.plugins.power]
power-button-action = 'interactive'

# Alternatively, update in /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.xsettings.gschema.xml
[org.gnome.settings-daemon.plugins.xsettings]
antialiasing = 'rgba'
hinting = 'full'

[org.gnome.shell]
always-show-log-out = true

enabled-extensions = ['<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>']

# Activities hot-corner, top-left
enable-hot-corners = true

favorite-apps = ['ubiquity.desktop', 'firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.gedit.desktop', 'org.gnome.Terminal.desktop', 'libreoffice-writer.desktop', 'libreoffice-calc.desktop']

[org.gnome.shell.extensions.clipboard-indicator]
notify-on-copy = false

[org.gnome.shell.extensions.sound-output-device-chooser]
hide-menu-icons = true

[org.gnome.shell.overrides]
attach-modal-dialogs = false

[org.gnome.Terminal.Legacy.Settings]
theme-variant = 'dark'

[org.gtk.Settings.FileChooser]
sort-directories-first = true

Revision history for this message
Cubic PPA (cubic-wizard) said :
#5

Also, you can update some of the defaults in the *.xml files in /usr/share/glib-2.0/schemas/.

Here is an example script I use to change some of the Gnome Terminal defaults in /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml...

    echo '• Updaing terminal size to 120x48 and setting scrollback to unlimitd ...'

    # Size
    sed -i 's|<default>80</default>|<default>120</default>|g' /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml
    sed -i 's|<default>24</default>|<default>48</default>|g' /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml

    # Scrollback
    perl -i -0pe 's|<key name="scrollback-unlimited" type="b">\n <default>false</default>|<key name="scrollback-unlimited" type="b">\n <default>true</default>|g' /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml

    # Transparency
    perl -i -0pe 's|<key name="use-transparent-background" type="b">\n <default>false</default>|<key name="use-transparent-background" type="b">\n <default>true</default>|g' /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml
    perl -i -0pe 's|<key name="use-theme-transparency" type="b">\n <default>true</default>|<key name="use-theme-transparency" type="b">\n <default>false</default>|g' /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml
    perl -i -0pe 's|<key name="background-transparency-percent" type="i">\n <default>50</default>|<key name="background-transparency-percent" type="i">\n <default>7</default>|g' /usr/share/glib-2.0/schemas/org.gnome.Terminal.gschema.xml

    # Compile schema
    glib-compile-schemas /usr/share/glib-2.0/schemas/

Revision history for this message
Cubic PPA (cubic-wizard) said :
#6

Add files that you want ALL new users to have in the /etc/skel directory.
These are copied to the home directory of all new users.
Take a look at the hidden files in your own home folder (such as the files in ~/.local).

Here is an example structure for /etc/skel...

/etc/skel
├── .bash_logout
├── .bashrc
├── .config
├── examples.desktop
├── .profile
├── Temp
└── Templates
      ├── Document.odt
      ├── Presentation.odp
      ├── Spreadsheet.ods
      └── Text.txt

Revision history for this message
Cubic PPA (cubic-wizard) said :
#7

Make sure you enable all required repositories in Cubic, before attempting to install software.

        ## Make a backup of the original sources.list; it will be restored later
        mv /etc/apt/sources.list /etc/apt/sources.list.original

        ##? Make sure the URLs and directories below exist.
        echo "deb http://us.archive.ubuntu.com/ubuntu/ `lsb_release -sc` main multiverse restricted universe" | tee --append /etc/apt/sources.list
        echo "deb http://us.archive.ubuntu.com/ubuntu/ `lsb_release -sc`-security main multiverse restricted universe" | tee --append /etc/apt/sources.list
        echo "deb http://us.archive.ubuntu.com/ubuntu/ `lsb_release -sc`-updates main multiverse restricted universe" | tee --append /etc/apt/sources.list
        echo "deb http://us.archive.ubuntu.com/ubuntu/ `lsb_release -sc`-backports main restricted universe multiverse" | tee --append /etc/apt/sources.list

Revision history for this message
Cubic PPA (cubic-wizard) said :
#8

Backgrounds are placed in...

    /usr/share/backgrounds/

And you must have a corresponding configuration file in...

    /usr/share/gnome-background-properties/

Revision history for this message
Cubic PPA (cubic-wizard) said :
#9

Download extensions using this URL format..

https://extensions.gnome.org/extension-info/?pk=${EXTENSION_ID}&shell_version=${GNOME_VERSION}

Replace ${GNOME_VERSION} with your gnome version.

Replace ${EXTENSION_ID} with the ID of the extension you want.
You can find out the extension ID by looking at the extension's URL at https://extensions.gnome.org.
For example, the ID for Open Weather is 750...
https://extensions.gnome.org/extension/750/openweather/

Extensions should be placed in (for all users)...

/usr/share/gnome-shell/extensions

Activate the extensions by adding them to 90_ubuntu-settings.gschema.override. For example...

[org.gnome.shell]
enabled-extensions = ['<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>', '<email address hidden>']

Revision history for this message
Cubic PPA (cubic-wizard) said :
#10

I hope the above are helpful.

The most useful technique is to use the 90_ubuntu-settings.gschema.override file.

Can you help with this problem?

Provide an answer of your own, or ask Primož Ajdišek for more information if necessary.

To post a message you must log in.