You are not logged in.

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

AndrewSmart
Member
Registered: 2019-06-10
Posts: 65

[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
SESSION  UID USER    SEAT  TTY
      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
1946
$ killall conky
conky(1946): Operation not permitted
conky: no process found
$ echo $?
1
$ killall -u $USER conky
conky: no process found
$ echo $?
1

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)

Offline

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

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,991
Website

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

Offline

#3 2022-04-30 20:36:21

AndrewSmart
Member
Registered: 2019-06-10
Posts: 65

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

johnraff wrote:

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.

Saying "I think it used to work in lithium" in OP was not precise. I think the behaviour was different in lithium. I believe in lithium it had no popup like observed in OP, but conky didn't autoload, so each additional session I would have to in jgmenu select the 'conky reload' option in order to get conky in that session. I think that's what happened, but I really can't remember.

I couldn't remember earlier so I didn't respond earlier.

Last edited by AndrewSmart (2022-04-30 21:59:53)

Offline

Board footer

Powered by FluxBB