sessionCommands or /etc/xprofile or

I’m trying to figure out where to put X session commands, like launching gnome-keyring-daemon.
Currently, I have them in:

services.xserver.displayManager.sessionCommands = ''
  eval $(gnome-keyring-daemon --daemonize)
  export SSH_AUTH_SOCK

This seems to work, but it sounds like a couple other alternatives are

  • /etc/xprofile
  • /etc/profile.local

I haven’t tested these yet, though. And of course there’s ~/.xprofile, but I want something system-wide, not per-user.

Does it make any difference? Is there a best-practice?

Speaking of that in particular, I’d expect to use

services.gnome3.gnome-keyring.enable = true;

I believe that only works if your session support XDG autostart.

@ivanbrennan gnome-keyring-daemon is going to be per session anyways, so there’s no way to have it “system-wide”. What you have there I believe is the best practice.

1 Like

Good to know, thanks!