Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
daemon: Corrected XDG_SESSION_CLASS under pam, added/set when not usi…
Browse files Browse the repository at this point in the history
…ng pam

It was hard coded to incorrect value of greeter for pam, and not set at
all when not using pam

Corrected per issue #4
#14
  • Loading branch information
wltjr committed Apr 24, 2018
1 parent 2aa009d commit 3e1a2d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/daemon/entrance_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ _entrance_session_begin(struct passwd *pwd, const char *cookie)
entrance_pam_env_set("DISPLAY", _dname);
entrance_pam_env_set("MAIL=/var/mail/%s", pwd->pw_name);
entrance_pam_env_set("XAUTHORITY", cookie);
entrance_pam_env_set("XDG_SESSION_CLASS", "greeter");
entrance_pam_env_set("XDG_SEAT", "seat0");
entrance_pam_env_set("XDG_SESSION_CLASS", "user");
entrance_pam_env_set("XDG_VTNR", vtnr);
#endif
return EINA_TRUE;
Expand All @@ -136,7 +136,7 @@ _entrance_session_run(struct passwd *pwd, const char *cmd, const char *cookie)
#else
int n = 0;
char *term = getenv("TERM");
env = (char **)malloc(11 * sizeof(char *));
env = (char **)malloc(12 * sizeof(char *));
if(term)
{
char *t = NULL;
Expand Down Expand Up @@ -164,6 +164,8 @@ _entrance_session_run(struct passwd *pwd, const char *cmd, const char *cookie)
env[n++]=strdup(buf);
snprintf(buf, sizeof(buf), "XAUTHORITY=%s", cookie);
env[n++]=strdup(buf);
snprintf(buf, sizeof(buf), "XDG_SESSION_CLASS=user");
env[n++]=strdup(buf);
snprintf(buf, sizeof(buf), "XDG_VTNR=%d", entrance_config->command.vtnr);
env[n++]=strdup(buf);
env[n++]=0;
Expand Down

0 comments on commit 3e1a2d5

Please sign in to comment.