XFCE font resets size every reboot

I’m running EndeavourOS with XFCE4. I ran the installer for NVIDIA GPUs which installs drivers afaik. I have the same issue described in this question: How can i fix the font size in XFCE after installing a proprietary graphic driver

The solution works for me (changing AA or DPI setting and then changing it back). However I have to do this every time I reboot because the error reappears. How can I apply this fix automatically on boot?

Asked By: nylki


While I don’t use NVIDIA, as you mentioned that changing the DPI works for you.

This command will set the DPI to 100:

xfconf-query -c xsettings -p /Xft/DPI -t int -s 100

To understand how to get the properties and values, use the xfconf-query command to monitor changes.

First, find out the channel name. In this case, use the xsettings channel.

List the channel names with xfconf-query -m.

$ xfconf-query -m

Monitor the settings with:

xfconf-query -m -c xsettings

Now go to your settings from UI, and change the DPI. Come back to the terminal, and you see the command like this:

xfconf-query -m -c xsettings
Start monitoring channel "xsettings":

set: /Xfce/LastCustomDPI
set: /Xft/DPI
set: /Xfce/LastCustomDPI
set: /Xft/DPI

So we found out the property name, and we can use the command to change the DPI to 100 for example:

xfconf-query -c xsettings -p /Xft/DPI -t int -s 100


  • -c: Channel name. xsettings in our case.
  • -p: Property name. /Xft/DPI in our case.
  • -t: Type. int (integer) in our case
  • -s Set. Set to 100 in our case.

Use that command in Settings -> Session and Startup -> Application Autostart -> + Add -> Add name and the command. Choose proper trigger, in this case most likely on login.

If the DPI setting doesn’t seem to take effect, you can try a workaround by creating a BASH script that first sets the DPI to an arbitrary value (like 99), waits for a short period, and then sets it to the desired value (like 100).

Here’s how you can do it:

xfconf-query -c xsettings -p /Xft/DPI -t int -s 99

sleep 0.5

xfconf-query -c xsettings -p /Xft/DPI -t int -s 100

Run the bash script straight from autostart.

Answered By: 15 Volts
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.