Set environmen-variables on logon? / GDK_CORE_DEVICE_EVENTS=1

Is there a way to set environment-variable when logging in with a display-manager?

When logging in on the console and then using startx, I can use .xinitrc; but that’s ignored when using a display-manager. .xsessionrc also is ignored.

(And without export GDK_CORE_DEVICE_EVENTS=1, unfortunately the mouse-wheel does not work on many GTK-applications. :frowning: )

It would be even better if NixOS could set GDK_CORE_DEVICE_EVENTS=1 automatically.

The next snippet sets the environment variable automatically (though, it
is set even if running without X.

{
  environment.variables = {
    GDK_CORE_DEVICE_EVENTS = "1";
  };
}

rkoe nixos1@discoursemail.com writes:

.xprofile

Regards
Frank