term: utmp: set ‘host’ to WAYLAND_DISPLAY

This is similar to what XTerm does (setting it to DISPLAY)
This commit is contained in:
Daniel Eklöf 2022-09-23 23:04:10 +02:00
parent aa10b1d2da
commit c93eb45b42
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -211,7 +211,7 @@ add_utmp_record(const struct config *conf, struct reaper *reaper, int ptmx)
if (conf->utempter_path == NULL)
return true;
char *const argv[] = {conf->utempter_path, "add", NULL};
char *const argv[] = {conf->utempter_path, "add", getenv("WAYLAND_DISPLAY"), NULL};
return spawn(reaper, NULL, argv, ptmx, ptmx, -1, NULL);
}
@ -223,7 +223,7 @@ del_utmp_record(const struct config *conf, struct reaper *reaper, int ptmx)
if (conf->utempter_path == NULL)
return true;
char *const argv[] = {conf->utempter_path, "del", NULL};
char *const argv[] = {conf->utempter_path, "del", getenv("WAYLAND_DISPLAY"), NULL};
return spawn(reaper, NULL, argv, ptmx, ptmx, -1, NULL);
}