Skip to content

Commit

Permalink
more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Pickett committed Nov 13, 2023
1 parent a896cf7 commit 2c2393c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ee/consoleuser/consoleuser_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ func CurrentUids(ctx context.Context) ([]string, error) {
return nil, fmt.Errorf("loginctl show-session (for sessionId %s): %w", s.Session, err)
}

outputStr := strings.Trim(string(output), "\n")

// to make remote session behave like local session and include systray icons on ubuntu 22.04
// had to create a ~/.xsessionrc file with the following content:
// export GNOME_SHELL_SESSION_MODE=ubuntu
Expand All @@ -53,12 +51,12 @@ func CurrentUids(ctx context.Context) ([]string, error) {
// ssh: remote=yes
// local: remote=no
// rdp: remote=no
if strings.Contains(outputStr, "Remote=yes") {
if !strings.Contains(string(output), "Remote=no") {
continue
}

// don't include inactive users
if strings.Contains(outputStr, "Active=no") {
if !strings.Contains(string(output), "Active=yes") {
continue
}

Expand Down

0 comments on commit 2c2393c

Please sign in to comment.