Why X server runs on TTY1 and not TTY7 on Arch Linux?

7,806

This was changed in October 2012 during/after the migration to systemd/logind. According to a bug report, running the X server on a different tty than the active consolekit session caused things to break because the session on (for example) TTY7 would not be authenticated . Without logind, one could use ck-launch-session in ~/.xinitrc to get a new session for the X server. However, this didn't work anymore with logind, so /etc/X11/xinit/xserverrc was changed to just start the X server on the current tty.

Share:
7,806

Related videos on Youtube

MightyPork
Author by

MightyPork

Updated on September 18, 2022

Comments

  • MightyPork
    MightyPork over 1 year

    Edit: it seems Arch now uses TTY7 for X by default, so this question is irrelevant

    I've used Debian derivates (*buntu, CrunchBang), Mandriva, OpenSuSE, Fedora, name it.. all of them had X server at TTY7 (at least I think it was 7), accessed with:

    Ctrl + Alt + F7
    

    Now, I moved to Arch, and it's on TTY1 now -

    Ctrl + Alt + F1
    

    All the others are regular TTY's with login prompt.

    Why is that? Is it perhaps because Arch uses Systemd?

    • StrongBad
      StrongBad almost 10 years
      It depends on how you start X.
    • ctrl-alt-delor
      ctrl-alt-delor almost 10 years
      Someone once asked Spike Milligan “what are you doing here”, he answered “everyone has to be somewhere”.
    • ctrl-alt-delor
      ctrl-alt-delor almost 10 years
      A better question may be “how do I move it to tty7”?
    • MightyPork
      MightyPork almost 10 years
      Well, I'm mostly surprised by the change. I don't really care what F-key I have to use (that is needed only after I break graphics driver etc). I assumed the TTY7 is sort of a convention or a default X setting or something, so I'm wondering why Arch is different.
    • jasonwryan
      jasonwryan almost 10 years
  • MightyPork
    MightyPork almost 10 years
    Interesting, so basically it's just a workaround for a bug in logind?
  • Wieland
    Wieland almost 10 years
    I don't understand the inner workings of *Kit and logind enough to really answer that question but to me it sounds like a reasonable decision to not automatically transfer sessions from one tty to another. And remember, ck-launch-session was basically (afaiu) made to work around the same limitation.
  • JdeBP
    JdeBP over 7 years
    The question is specific to Arch Linux, as is the answer. People are referring to this from elsewhere as a more general answer, however. It is not. The reason that X uses the first virtual terminal on Fedora, for example, pre-dates the very existence of systemd by some years. This question and answer explicitly limit themselves to Arch.