As an alternative, we may think about using system-logind to kill all user's 
processes when logout...

Thanks.

Fred

-----Original Message-----
From: x2go-dev <x2go-dev-boun...@lists.x2go.org> On Behalf Of Oleksandr Shneyder
Sent: 2021年8月13日 22:25
To: Ulrich Sibiller <ul...@gmx.de>
Cc: x2go-dev@lists.x2go.org
Subject: Re: [X2Go-Dev] Clean processes after x2goterminate-session

In my tests dbus and all processes running inside of the session having PGID of 
x2goruncommand.

Alex

Am 13.08.21 um 01:47 schrieb Ulrich Sibiller:
> Are you sure dbus does not have its own PGID?
> 
> Uli
> 
> On Thu, Aug 12, 2021 at 7:36 PM Oleksandr Shneyder 
> <o.shney...@phoca-gmbh.de> wrote:
>>
>> Why we are not just saving the x2goruncommand PID in the session 
>> directory. All spawned processes will have a  PGID identical to the 
>> PID of x2goruncommand. In the x2goterminate-session we can terminate 
>> all processes with PGID identical to x2goruncommand PID:
>>
>> kill -- -X2GORUNCMD_PID
>>
>> looks simple to me and POSIX confirm. Any objections?
>>
>>
>> regards,
>> Alex
>>
>>
>> Am 11.08.21 um 04:57 schrieb Mike Gabriel:
>>> On  Di 10 Aug 2021 18:10:41 CEST, Ulrich Sibiller wrote:
>>>
>>>> Probably it would be best to use dbus for session termination if it 
>>>> is running.
>>>
>>> This could be one puzzle piece, indeed. Basically, we can kill 
>>> x2goruncommand and then the session manager would automatically go 
>>> into logout.
>>>
>>> However, esp. the GTK desktops (MATE, XFCE, etc.) leave many stray 
>>> processes around (e.g. gvfsd, colord, etc.). For these friends, some 
>>> more intelligence is required. Might have that in the X2Go Server 
>>> renicer code already, because Lee at those early times worked on 
>>> code that detects the complete process tree of a running desktop session.
>>>
>>> Nowadays, one could argue that cgroups are another and better 
>>> alternative. But cgroups are not available on non-Linux, so maybe a 
>>> kernel-agnostic approach is a more favourable way to go?
>>>
>>> Mike
>>
>>
>> --
>> -----------------------------------------------------------
>> Oleksandr Shneyder        | Email: o.shney...@phoca-gmbh.de
>> phoca GmbH                | Tel. : 0911 - 14870374 0
>> Schleiermacherstr. 2      | Fax. : 0911 - 14870374 9
>> D-90491 Nürnberg          | Mobil: 0163 - 49 64 461
>>
>> Geschäftsführung: Dipl.-Inf. Oleksandr Shneyder
>>
>> Amtsgericht München       | http://www.phoca-gmbh.de
>> HRB 196 658               | http://www.x2go.org
>> USt-IdNr.: DE281977973
>> -----------------------------------------------------------
>>


--
-----------------------------------------------------------
Oleksandr Shneyder        | Email: o.shney...@phoca-gmbh.de
phoca GmbH                | Tel. : 0911 - 14870374 0
Schleiermacherstr. 2      | Fax. : 0911 - 14870374 9
D-90491 Nürnberg          | Mobil: 0163 - 49 64 461

Geschäftsführung: Dipl.-Inf. Oleksandr Shneyder

Amtsgericht München       | http://www.phoca-gmbh.de
HRB 196 658               | http://www.x2go.org
USt-IdNr.: DE281977973
-----------------------------------------------------------



----------

This email has been scanned for spam and viruses. Visit the following link to 
report this email as spam:
https://securemail.cloud-protect.net/index01.php?mod_id=11&mod_option=logitem&mail_id=1628864719-MZsKPgao79T4&r_address=fliu%40issi.com&report=1


_______________________________________________
x2go-dev mailing list
x2go-dev@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-dev

Reply via email to