Setting default theme for Plank on Ubuntu 20.04 using Cubic
Solution 1:
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.