If a screenshot is taken in DBus or background mode and the running instance is 'upgraded' to GUIgui mode while the notification is displaying the instance would still exit after the notification timed out or was destroyed. So simply check if we are running in GUIgui mode.e before exiting