Skip to content

Commit

Permalink
Set TTYPath for user-session@.service
Browse files Browse the repository at this point in the history
In order for a login session (managed by systemd-logind) to become fully
active, it must be assigned to both a seat and a VT.  Without using a
display manager, two options are available for ensuring these
assignments are made: (a) set XDG_SEAT and XDG_VTNR in the PAM session,
or (b) set PAM_TTY in the PAM session.

This commit implements the second option by setting TTYPath to
"/dev/tty1" for user-session@.service, thereby forcing systemd to set
PAM_TTY in the PAM session, which then sets XDG_SEAT to "seat0" and
XDG_VTNR to "1" for the user session.  "/dev/tty1" is the TTY of choice
because xorg-launch-helper spawns Xorg on tty1.
  • Loading branch information
phmccarty committed Sep 5, 2012
1 parent 9a7c498 commit 9f61e07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions units/system/user-session@.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ PAMName=login
ControlGroup=%R/user/%I/shared cpu:/
ControlGroupModify=yes
Type=notify
TTYPath=/dev/tty1
ExecStart=-@SYSTEMDUTILDIR@/systemd --user
Environment=DISPLAY=:0
Environment=XDG_RUNTIME_DIR=/run/user/%I
Expand Down

0 comments on commit 9f61e07

Please sign in to comment.