0

On a normal working Linux machine the command w report 2 users(because 2 users are connected)

w
 19:23:19 up  1:53,  2 users,  load average: 0,44, 0,63, 0,81
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT

after reboot report correctly 1 user

w
 19:26:44 up  1:03,  1 users,  load average: 0,44, 0,73, 0,90
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT

On my Slackware current w reports the sum(!) of the previous users + the actual user connected, after 4 reboots it report 4 users.

w
 19:28:16 up  1:58,  4 users,  load average: 0,26, 0,59, 0,76

Why? I use Lightdm. Is it possible to use Xreset with a properly sessreg line like XDM?

muru
  • 69,900
  • 13
  • 192
  • 292
elbarna
  • 12,050
  • 22
  • 92
  • 170

1 Answers1

0

Solution found using a Xreset script

First I edit the script(if not exist create it)

vim /etc/lightdm/Xreset

    #!/bin/sh
    sessreg -d -l $DISPLAY $USER

chmod 755 /etc/lightdm/Xreset

Then I edit /etc/lightdm/lightdm.conf

session-cleanup-script=/etc/lightdm/Xreset

After reboot w report the correct number of users, which is 2 one for Xsession, one for shell opened.

elbarna
  • 12,050
  • 22
  • 92
  • 170