I want to write a Python script to run in Ubuntu session that can under certain conditions logout the user - think screen time management for kids :)
Can someone give me a pointer where to look, how is logout done in modern Linux desktops? I suspect it may have something to do with dbus but can't find any concrete way to do it. A pointer will be enough, I can figure out the rest :)
Thanks!