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.
ok thanx a lot
sorry for the inconvenience
sometimes I forget the good practices…
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:
-
templatevm (e.g. debian-10)
-
appvm based on templatevm that itself is the dispvm template (has
tempalte_for_dispvms=true) -
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
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
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
Ofc! And only if you feel like it
Hi Sven, does changing the font and font size work for you?
I’m fighting with this too now, currently in Debian 11. Dark mode works, via the gtk-application-prefer-dark-theme
setting, but not setting the font or font size.
I have the same settings.ini content as yours, except also the gtk-application-prefer-dark-theme=1
line, so:
[Settings]
gtk-application-prefer-dark-theme=1
gtk-font-name=Ubuntu 8
gtk-theme-name=Adwaita-dark
gtk-icon-theme-name=Adwaita
For me, the first line does control the dark theme (I can switch it on and off successfully), but the other lines, and in particular gtk-font-name does not take / is not applied at all.
Applications like Firefox and GEdit still have (relatively) huge font size.
Any hints about how to debug this further are much welcome.
I have ensured the gnome-settings-daemon is completely removed also, just in case.
Yes works in general in Debian 11 (minimal) as I described including firefox-esr. Don’t know about Gedit. Also my Debian 11 qubes are in-place upgrades from Debian 10. So it could be that there is a difference when one uses the Debian 11 template from the repo – maybe?
Thanks, that’s great to know, then I know I should keep trying
Ah, well, I tried an in-place upgrade from Debian 10 before as well, and changed to a fresh template to see if that would help … so the problem has to be something else. Hmm.
(Btw, also now confirmed that file is actually read, with strace:
$ strace gedit 2>&1 | grep settings.ini
access("/usr/share/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/xdg/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
access("/home/user/.config/gtk-3.0/settings.ini", F_OK) = 0
openat(AT_FDCWD, "/home/user/.config/gtk-3.0/settings.ini", O_RDONLY) = 10
)
Just a short update: Unfortunately haven’t solved the problem yet, so has had to retreat to Fedora as a base image, as I couldn’t work effectively with huge fonts taking up all the screen estate (not that fedora is bad, but the change causes some trouble to my usual workflow).
If anybody else get this to work and has some further tips about things influencing the outcome here, I’m much interested.
This is Qubes 4.1 fully darkened on an external full HD display. \ö/
Thank you — and all the commentators here and here — so much for your hard work! (For me, now, it was just a couple of hours. )
Summary for all users
- dom0 darkened with ›Q‹ panel click-pop-up/System Tools/Appearance and /Window Manager. With Style ›Bluebird‹ and in dom0 Terminal setting the same background color as desktop, dom0 Terminal kind of floats on the desktop, I like it …
- Fedora 34 VMs (as ›browser‹, orange, in the screenshot) darkened with gnome-tweak-tools, »Tweaks« in dom0 applications list.
- Debian 11 VMs (as ›encryption‹, purple, in the screenshot) with /etc/environment, settings.ini and gtkrc-2.0 files/settings.
- Background colors and fonts of Gedit and Terminal are, of course, adjustable within the apps itselves.
[So, fortunately, you/we all can avoid a nightmare called KDE (I know what I’m talking about).]
Have a nice one!
[Edit: See new user guide.]
Now we just need to figure out how to change the Networkmanager applet background.