Score:0

Setting default theme for Plank on Ubuntu 20.04 using Cubic

mo flag

I am trying to create a custom distro based on Ubuntu using Cubic. I have installed Plank and it works fine when using the Try Distro screen when booting into the vm that Cubic provides. I have copied over some plank theme files into the right directory but I don't know how to set the default theme for plank from the terminal.

I have tried the following:

gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ theme 'myiostheme'

When I do a gsettings get, it shows the theme has changed, but when booting from the live-usb it shows the default Plank theme.

I would appreciate any help I can get

Score:1
zw flag

Gsetting works at runtime. But you need permanent setting. You can apply it using dconf as follows on Cubic image creation:

sudo mkdir -p /etc/dconf/profile

cat <<EOF | sudo tee /etc/dconf/profile/user
user-db:user
system-db:local
EOF

sudo mkdir -p /etc/dconf/db/local.d

cat <<EOF | sudo tee /etc/dconf/db/local.d/00-cubic
[net/launchpad/plank/docks/dock1]
theme='Matte'
EOF

sudo dconf update

Other possible way is to create desktop-autostart file for all users and place it into /etc/xdg/autostart as follows:

cat <<EOF | sudo tee /etc/xdg/autostart/plank-theme.desktop
[Desktop Entry]
Name=Set Plank Theme
Comment=Set Plank Theme
Exec="gsettings set net.launchpad.plank.dock.settings:/net/launchpad/plank/docks/dock1/ theme 'myiostheme'"
Terminal=false
NoDisplay=true
Type=Application
EOF

and it will executed on login.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.