Disable screen saver via DBus can crash
Affected version
Ubuntu Mantic Minotaur 23.10 gnome-shell 45.0-1ubuntu1 amd64 graphical shell for the GNOME desktop
Bug summary
Using simple-scan closed the session when starting a scan, I narrowed it to simple-scan using DBus to disable screen saver.
Steps to reproduce
This a simple Python program that does the trick on Ubuntu :
import dbus
session_bus = dbus.SessionBus()
print( session_bus )
screen_saver = session_bus.get_object( 'org.freedesktop.ScreenSaver' , '/org/freedesktop/ScreenSaver' )
print( screen_saver )
interface = dbus.Interface( screen_saver , dbus_interface = 'org.freedesktop.ScreenSaver' )
print( interface )
coc = interface.Inhibit( 'db' , '' )
print( coc )
What happened
Gnome-shell crashes and the user session is terminated abruptly.
What did you expect to happen
Better argument cheking when receiving messages through DBux? Last "apt update" corrected it, now the last call returns "dbus.exceptions.DBusException: org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code36: GDBus.Error:org.gnome.SessionManager.GeneralError: Reason not specified "
Relevant logs, screenshots, screencasts etc.
Edited by Bernard Burette