You are not logged in.

#1 2021-12-24 16:24:51

Registered: 2019-06-10
Posts: 41

[Beryllium] bl-conky-session autostart failure on 2nd LightDM session

I think it used to work with buster/lithium.

The 2nd LightDM session starts with a pop up "Kill running conkys first?"

Pressing no and cancel didn't work. Pressing 'don't kill' results in conky being lauched.

My setup:

$ loginctl
      1 1000 user    seat0 tty1
     11 1004 gaming  seat0
      3 1001 browser seat0
      5 1000 user    seat0 tty5
      6 1000 user    seat0 tty6
      7 1000 user    seat0 tty2
      8 1000 user    seat0 tty4
      9 1000 user    seat0 tty3

8 sessions listed.

I used `dm-tool switch-to-user gaming` to launch the 2nd LightDM session.

Looks like line 100 in bl-conky-session it runs `pidof conky` which gets the pid of the conky already running, but for the other user.

Some command output when running as the 'gaming' user:

$ pidof conky
$ killall conky
conky(1946): Operation not permitted
conky: no process found
$ echo $?
$ killall -u $USER conky
conky: no process found
$ echo $?

I don't know how you can use pidof to only query for the $USER user but I guess that's the way to go.

Last edited by AndrewSmart (2021-12-24 16:26:31)


#2 2021-12-25 07:01:53

From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,615

Re: [Beryllium] bl-conky-session autostart failure on 2nd LightDM session

Hi @AndrewSmart thanks, you've found a bug. smile
The code should indeed be checking whether conkys belong to the current user or not.
'pidof conky' needs to be be replaced with eg 'pgrep -x -u "$USER" conky'

You're using beryllium? I'm puzzled as to why bl-conky-session worked with lithium, though there has been some code change for beryllium. Anyway, I'll get the fix in before our release.

EDIT: in fact there are some other places in the BL codebase where pidof is used like that. Although recent code is using pgrep, I guess back in the early days we didn't think about simultaneous multi-user situations. I'll switch them all for pgrep -u "$USER"

Also should do similar checks for killall (which does have a -u option).

And thanks again for bringing this up!

Last edited by johnraff (2021-12-26 07:42:05)

...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop


Board footer

Powered by FluxBB