Xsettingsd - ArchWiki

Jump to content

# Xsettingsd

From ArchWiki

Related articles

- Desktop environment
- X resources
- Window manager

Xsettingsd is a lightweight xsettings daemon which provides settings to Xorg applications via the XSETTINGS specification.

Some desktop environments (such as Plasma by default, or a custom one) do not include this. In such environments running an xsettings daemon is necessary for some applications (most notably GTK–, Java– and Wine–based) to use the selected theme, cursor, font, and other settings.

## Installation

Install xsettingsd or xsettingsd-gitAUR.

## Configuration

xsettingsd(1) contains just brief intro, see README for details.

An example configuration to X FreeType font rendering (you can use your preferred config file path):

    ~/.config/xsettingsd/xsettingsd.conf

    Xft/Antialias   1
    Xft/DPI         98304
    Xft/Hinting     1
    Xft/HintStyle   "hintfull"
    Xft/lcdfilter   "lcddefault"
    Xft/RGBA        "rgb"

Note

- `Xft/DPI` is your DPI multiplied by 1024.
- Fonts with your real DPI (like 94*1024) might look better than with artificial (like 96*1024) one, but you may encounter glitches (e.g. no borders on pop-up tips) in your application.
- Although X resources and xsettings parameter names may look similar, they all are case-sensitive. E.g. you should put `Xft.dpi: 96` in `~/.Xresources` and `Xft/DPI 98304` in `~/.xsettingsd.conf`.

## Usage

Start the user unit `xsettingsd.service`.

This unit is static, so it cannot be enabled directly. You can autostart it (or `xsettingsd` binary) on Xorg, desktop environment or window manager startup.

Note KDE with kde-gtk-config installed will start the binary automatically.

The unit is configured as `PartOf` the `graphical-session.target`, so it stops (restarts) when `graphical-session.target` is stopped (restarted), see systemd.unit(5) § [UNIT] SECTION OPTIONS and systemd.special(7) § Special Passive User Units.

## Troubleshooting

### Unable to open connection to X server

Check that `DISPLAY` and `XAUTHORITY` environment variables are set.

If you are starting the systemd unit, check that `systemctl --user import-environment DISPLAY XAUTHORITY` was executed (it can be done by `/etc/X11/xinit/xinitrc.d/50-systemd-user.sh` invoked from your `~/.xinitrc`).

Categories:

- Configuration files
- X server

Xsettingsd
Add topic