Fedora 28+, i3 window manager. My login scripts are all predicated upon the whole Xorg session startup sequence (~/.xinitrc, ~/.xsession, etc.), but at some point in upgrading my old FC23 laptop to FC28, gdm became the default and my startup scripts don't run any more.

It looks like gdm is systemd-based, so getting my scripts back in the login sequence can probably happen if I can figure out how to:

  1. Figure out how the systemd session startup sequence used by gdm maps to the old Xorg one, and write my own user systemd modules to plug into the appropriate places in the sequence. So far I haven't found any sort of mapping between the X user session startup sequence and the gdm one. (Assuming systemd user modules can intermix with the system modules in the sequence.) Or,
  2. Disable the gdm service and get Xorg started instead. This would be a regression to old-style stuff, and probably not the preferred solution. I should learn how the current mechanism works rather than clinging to legacy stuff -- but if the current mechanism can't provide the hook-points I need, I may have to [find out how to] disable gdm and start Xorg instead.

My scripts do things like set up envariables to be inherited, start particular dæmons and agents, and suchlike -- so that it's all in place by the time the first user application gets started by me.

Does anyone have an answer to either of these, or have an alternate solution to propose?


migrated from serverfault.com Mar 30 at 0:54

This question came from our site for system and network administrators.

  • Try putting your stuff in ~/.xprofile, it should be sourced from /etc/gdm3/Xsession -- unfortunately I cannot test it right now. Btw, this has nothing to do with systemd -- not everything wrong in this world is caused by systemd ;-) – mosvy Mar 30 at 11:24
  • Notice that gdm may run your session through ssh-agent, which is a setgid program and will wipe off some environment variables, like LD_PRELOAD. – mosvy Mar 30 at 11:26
  • It’s not clear what you are asking. “gdm” was used in Fedora 23 too, although it has change a bit it still starts using the same mechanism. Are you asking how to disable gdm and switch to the text console login, where you can then run “startx”? Or do you want to use an alternate login manager such as lightdm or sddm? – jsbillings Mar 30 at 20:43

You can edit /etc/gdm/custom.conf to force gdm to use Xorg instead of wayland, which it uses by default.

Add or uncomment this in there:


If i3 also uses wayland, you may need to change its configuration as well. Refer to the i3 documentation on how to do that (I don't have experience with i3).

  • @mosvy -- I've done that, and I get this in the journal during session startup: /usr/libexec/gdm-x-session[<pid>]: /bin/sh: line 0: exec: --: invalid option but I can't figure out which file it's trying to execute. Even with debugging enabled in /etc/gdm/custome.conf it doesn't make clear that it's even getting to /etc/gdm/Xsession, – RoUS May 22 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.