remote_host = strempty(remote_host);
seat = strempty(seat);
+ if (strchr(tty, ':')) {
+ /* A tty with a colon is usually an X11 display, place
+ * there to show up in utmp. We rearrange things and
+ * don't pretend that an X display was a tty */
+
+ if (isempty(display))
+ display = tty;
+ tty = NULL;
+ }
+
type = !isempty(display) ? "x11" :
!isempty(tty) ? "tty" : "other";