Dark mode in Debian 10 VM

I have installed tweaks in my template to change appearance to dark mode. I can change it in the template or in the vm but change do not take effect.

Have you read the following (community) documentation? On step 5. there are instructions that you specifically need to do on Debian.

3 Likes

ok thanx a lot
sorry for the inconvenience
sometimes I forget the good practices…

1 Like

Hello!

If i enabled dark mode on the debian-10 Template VM (works just fine, at least gnome terminal and gnome-tweaks are dark) and i’ve created a disposable VM based on this Template VM, shouldn’t need to be dark the Disposable VM too? Because it isn’t. I’ve checked the ~/.config folder of the disposable VM and there is no gtk-3.0 or gtk-4.0 folder. Am i missing something?

Thanks!

There are three VMs involved:

  1. templatevm (e.g. debian-10)

  2. appvm based on templatevm that itself is the dispvm template (has
    tempalte_for_dispvms=true)

  3. the dispvm (based on the appvm)

Changes you make in the home directory of 1) will not reflect in 2) by
design. All changes you make in the home directory of 2) will reflect in 3)

/Sven

2 Likes

Thanks! I thought if i make changes in the Template VMs those changes will reflect in all VMs based on the Template VM. Now evrething work fine! Strange, but i thought because i made changes in directories under the home folder (~/.config) i can make it without using sudo, but it needed the sudo privilege. Just a note, if somebody’s intrested why the changes are not accepted

Strange, but i thought because i made changes in directories under
the home folder (~/.config) i can make it without using sudo, but it
needed the sudo privilege.

You probably has sudo privileges (by mistake?) when creating that file
originally.

sudo chmod u+rw ~/.config/the_file should fix it

1 Like

Thanks! I think i made the settings.ini file by accident with sudo privilege. Now everythings work fine.

It is the third day I try to set a dark theme in debian-10 template.

I tried to install it changing the theme in Gnome Tweaks (works well in Fedora, but not in Debian).
I tried to install all possible Gnome packages.
I tried this:

 cd ~/.config/
 mkdir gtk-3.0
 cd gtk-3.0/
 touch settings.ini

Add the following lines to settings.ini

 [Settings]
 gtk-application-prefer-dark-theme=1

when I open the file again it shows

gtk-application-prefer-dark-theme=0

I tried that

Works for some time, but then suddenly drops to =0 again.

Reinstalled debian-10 template, tried on other PC with Qubes 4.0 and every time it ignores my changes. Gnome Settings does not start, Gnome Tweaks no effect, dconf-editor no effect.

Any ideas?

Seems like starting Gnome Tweaks drops it to zero. It is strange because the file always has u+rw permissions and changes in Gnome Tweaks have no effect on interface.

In Fedora everything works as expected.

Hi @tvori-dobro I feel your pain. A couple of conclusions I reached after struggling with this for months:

  • If you have gnome-settings daemon running (e.g. Fedora) the config files are ignored (best case) or interfere (worst case) with the settings you make in gnome-tweaks. … so if you want to use gnome settings daemon and gnome tweaks, it’s probably best to just delete the settings.ini and the .gtkrc-2.0

  • I found that my qubes work best without gnome settings daemon (e.g. Debian, Debian-minimal). In that case set the DPI in /etc/X11/Xresources/x11-common using Xft.dpi: in the template … and make sure your qubes have both: ~/.config/gtk-3.0/settings.ini and ~/gtkrc-2.0. Mine look like this:

settings.ini

[Settings]
gtk-font-name=Ubuntu 10
gtk-theme-name=Adwaita-dark
gtk-icon-theme-name=Adwaita

.gtkrc-2.0

include "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc"
style "user-font"
{
         font_name="Ubuntu"
}
widget_class "*" style "user-font"
gtk-font-name="Ubuntu 10"
gtk-theme-name="Adwaita-dark"
gtk-icon-theme-name="Adwaita"

I put these files in the /etc/skel of the template so they get created automatically if I create a new qube based on that template.

To make sure QT apps look good too: in the template install qt5-style-plugins, gtk2-engines-murrine and gnome-themes-standard. Then in /etc/environment add these two lines:

QT_QPA_PLATFORMTHEME=gtk2
QT_SCALE_FACTOR=1

Perhaps the community documentation could get an update with this new information? (if you have the time and will, ofc!)

I tagged you reply as a task, but it’ll take some time. What I forgot in my reply is how to make sure QT apps look good too: in the template install qt5-style-plugins, gtk2-engines-murrine and gnome-themes-standard. Then in /etc/environment add these two lines:

QT_QPA_PLATFORMTHEME=gtk2
QT_SCALE_FACTOR=1

Edited your reply to add this. Hope you don’t mind :slight_smile:

Ofc! And only if you feel like it :slight_smile:

1 Like