Dark theme

Hello everyone,
im trying to set dark theme in dom0 who stays light.
I checked the forum and i did install in dom0 : sudo qubes-dom0-update qt5-qtstyleplugins.
And then after that, i opened a new terminal in dom0 and typed: sudo vim /etc/environment then i press enter after i press i, then typed QT_QPA-PLATFORMTHEME=gtk2 then i pressed escape then i typed X then enter but nothing happened and my dom0 is still light theme.

Im very not techi, could someone explain to me exactly how to do it where do it exactly step by step please?
And sorry for my english its not my native language.
thank you guys

1 Like

Hello,
i went trough all these topic already, and i couldn’t understand all of it thats why im stuck and ask if anyone could just describe me clearly and precisely what to and how to do…
Help anyone?
Thank you

[user@dom0 ~]$ echo "QT_QPA_PLATFORMTHEME=gtk2" | sudo tee -a /etc/environment

You’ve also missed a whole section that’s mentioned in the comments:

[user@dom0 ~]$ cat << EOF > $HOME/.gtkrc-2.0 
include "/usr/share/themes/Arc-Dark/gtk-2.0/gtkrc"
style "user-font" 
{
        font_name="DejaVu Sans Book"
}
widget_class "*" style "user-font"
gtk-font-name="DejaVu Sans Book 12"
gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="gnome"
EOF
[user@dom0 ~]$ mkdir -p $HOME/.config/gtk-3.0
[user@dom0 ~]$ cat << EOF > $HOME/.config/gtk-3.0/settings.ini 
[Settings]
gtk-font-name=DejaVu Sans Book 12
gtk-theme-name=Arc-Dark
gtk-icon-theme-name=gnome
EOF

Then logout/reboot.

That guide lists precisely everything you need to do.
What exactly are you having trouble with?

1 Like

So, what @BEBF738VD wrote you, you have to have 3 files:

  1. environment in /etc with the content
QT_QPA_PLATFORMTHEME=gtk2
  1. .gtkrc-2.0 in /home/user with the content he suggested (mine is different for example, but dark too)

  2. settings.ini in home/user/.config/gtk-3.0 (you have to create folder gtk-3/0 first) with the content he suggested (mine is also different, but dark too)

So, the two of us described it in a most simple way it could be (how and what, and me what). There is no easier way to explain.

I simply took the file as it is in the guide.
The important part is that the values are consistent across the two files.

1 Like

To save and exit from Vim, you have to press Esc, then type :x (not X), then press enter.

Hello guys and thank you for your answers,
you probably going to think that iam retarded but i dont understand anything about all this, maybe i should have been more specific, im not use to command line and i just begin with qubes os.

Is there any possibility that someone could just tell me step by step command by command…
I just try to open a terminal and copy exactly the commands from BEBF738VD and rebbot my computeur but nothing happens my qubes manager is still white.

I start to desperate, and the worst is that i can’t copy past the command line into dom0 terminal so its like a torture to me to try and try again…

Please anyone can just tell me like:
Step 1: open dom0 terminal and type:
-this this and that.

Step 2:

  • this this.

Sorry if i look completely stupid but i just begin with all this.
Again thank you for your time

Don’t worry about it. We don’t think that.

My reply lists the commands step by step, unfortunately I cannot be anymore clear than that. Make sure you type everything as I suggested (except of course [user@dom0 ~]$ which was just to show you where the command begins).

Open the terminal and type every command I listed here, in order: Dark theme - #4 by BEBF738VD

Why don’t you begin by checking the contents of the files you created with my commands?

Type the following in a terminal in dom0:

[user@dom0 ~]$ cat $HOME/.gtkrc-2.0

And check if the output is the same as below:

include "/usr/share/themes/Arc-Dark/gtk-2.0/gtkrc"
style "user-font" 
{
        font_name="DejaVu Sans Book"
}
widget_class "*" style "user-font"
gtk-font-name="DejaVu Sans Book 12"
gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="gnome"

Then type:

[user@dom0 ~]$ cat $HOME/.config/gtk-3.0/settings.ini

And check if it matches the following:

[Settings]
gtk-font-name=DejaVu Sans Book 12
gtk-theme-name=Arc-Dark
gtk-icon-theme-name=gnome

Finally, verify this last file:

[user@dom0 ~]$ cat /etc/environment

Which should have the following line:

QT_QPA_PLATFORMTHEME=gtk2

Remember, everything matters: dots, dashes, underscores, and letter casing.

4 Likes

thank you so much for your understanding, i got to go right now, but i do all this when i come back and keep you up to date.
Again thank you so much!

i just checked quicly so for the first i do have:
Home/User/: is a directory
cat: .gtkrc-2.0: no such file or directory
and for the second, i do exactly the same…
Im so lost…

i begin to open my dome0 terminal and type:

echo "QT_QPA_PLATFORMTHEME=gtk2" | sudo tee -a /etc/environment
then i typed exaclty this:
cat << EOF > $HOME/.gtkrc-2.0 
include "/usr/share/themes/Arc-Dark/gtk-2.0/gtkrc"
style "user-font" 
{
        font_name="DejaVu Sans Book"
}
widget_class "*" style "user-font"
gtk-font-name="DejaVu Sans Book 12"
gtk-theme-name="Arc-Dark"
gtk-icon-theme-name="gnome"
EOF

then this:

mkdir -p $HOME/.config/gtk-3.0
[user@dom0 ~]$ cat << EOF > $HOME/.config/gtk-3.0/settings.ini 
[Settings]
gtk-font-name=DejaVu Sans Book 12
gtk-theme-name=Arc-Dark
gtk-icon-theme-name=gnome
EOF

after that i just reboot my computeur and nothing......

and for the

[user@dom0 ~]$ cat /etc/environment
i do have:

[user@dom0 ~]$ cat /etc/environment
QT_QPA_PLATFORMTHEME=gtk2
ST_QPA_PLATFORMTHEME=gtk2

After all of the above, do not forget to perform the steps:

Change Appearance
Change Style in Window Manager

I think maybe that is missing.

Hello anyone,
is anybody could try to help me, im just about to give up, despite the fact that i did everything @BEBF738VD told me to do, nothing seems to work and i just dont know why, i feel so frustrated that just to have dark theme you have to do such difficult things.

Just to summarize,
when i type
[user@dom0 ~]$ cat $HOME/.gtkrc-2.0, i do have:
cat: /home/User/: is a directory
cat: .gtkrc-2.0 : no such file or directory

then when i type:
[user@dom0 ~]$ cat $HOME/.config/gtk-3.0/settings.ini

i do have:
[user@dom0 ~]$ cat $HOME/.config/gtk-3.0/settings.ini
cat: /home/User/: is a directory
[user@dom0 ~]$ cat $HOME/.config/gtk-3.0/settings.ini no such file or directory

Then when i type:
[user@dom0 ~]$ cat /etc/environment

I do have:

[user@dom0 ~]$ cat /etc/environment
QT_QPA_PLATFORMTHEME=gtk2
ST_QPA_PLATFORMTHEME=gtk2

I precise that i opened my terminal emulator and typed exactly the commands line @BEBF738VD told me to....
I just start to desperate now.....

You must’ve typed the command wrong, because you did not create the file.

Same as above, but you also didn’t create the directory.

/etc/environment is alright, there’s one wrong variable but it doesn’t matter.

Doesn’t look like unfortunately, please try again. Make sure you also type EOF when you see it in my commands: Dark theme - #4 by BEBF738VD

And again, make sure you do not type [user@dom0 ~]$ in your terminal.

Im going to try again and let yo know,
just a question about this part:

style “user-font”
{
font_name=“DejaVu Sans Book”
}
widget_class “*” style “user-font”

on this sentence, font_name=“DejaVu Sans Book” i pressed space bar to move it in the middle, is it ok or i just do:
{ then press enter
widget_class “*” style “user-font” and i just left this on the “left”?
i dont know if you understand what i mean…
again thank you for you patience.

Should be ok, insert 8 spaces.

8 spaces, ok i will try this asap and keep you update,
Thanks so much

Try that and then verify if the files were created correctly.

IF you are still unable to create the files correctly, I uploaded some dummy files on github, which you can download and move to dom0: GitHub - BEBF738VD/qubes-config

However, note that moving anything to dom0 requires that you trust the file and its content, so only follow this path if you understand what’s in it (and you trust me not to to put anything malicious in it).

With that said, this is how you do it:

  1. Create the folder in dom0:
[user@dom0 ~]$ mkdir -p $HOME/.config/gtk-3.0
  1. In a DispVM, download the two files:
user@dispXXXX:~$ curl -s --tlsv1.3 -o $HOME/.gtkrc-2.0 https://raw.githubusercontent.com/BEBF738VD/qubes-config/main/%24HOME/.gtkrc-2.0
user@dispXXXX:~$ curl -s --tlsv1.3 -o $HOME/settings.ini https://raw.githubusercontent.com/BEBF738VD/qubes-config/main/%24HOME/.config/gtk-3.0/settings.ini

At this point you can re-verify the contents of the files you just downloaded with cat.

  1. Note the name of the DispVM and use it in the next commands (in my case it’s dispXXXX)
  2. Transfer the files to dom0:
[user@dom0 ~]$ qvm-run -p dispXXXX "cat /home/user/.gtkrc-2.0" > $HOME/.gtkrc-2.0
[user@dom0 ~]$ qvm-run -p dispXXXX "cat /home/user/settings.ini" > $HOME/.config/gtk-3.0/settings.ini

Done. Make sure you type everything correctly. Again, only use this method if nothing else works and you understand what you’re doing.

2 Likes

Omg finally i did worked !
i know what i was doing wrong, after i typed the command lines, i was clothing the terminal then shutdown the computer.
This time i didn’t shut it down but click on logout then reboot as you told me and then it worked!

Next step is doing the same for debian and fedora qubes which is another story, any advice to do so?
Again thank you so much for everything! @BEBF738VD