diff --git a/src/gajim.py b/src/gajim.py index e523ed2cb..926ec5635 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -2717,9 +2717,12 @@ class Interface: auto=True) gajim.sleeper_state[account] = 'autoaway' - bus = dbus.SessionBus() - bus.add_signal_receiver(gnome_screensaver_ActiveChanged_cb, - 'ActiveChanged', 'org.gnome.ScreenSaver') + try: + bus = dbus.SessionBus() + bus.add_signal_receiver(gnome_screensaver_ActiveChanged_cb, + 'ActiveChanged', 'org.gnome.ScreenSaver') + except: + pass self.show_vcard_when_connect = [] diff --git a/src/roster_window.py b/src/roster_window.py index 05ad866a9..4b3e8132e 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -3681,13 +3681,13 @@ class RosterWindow: if not dbus_support.supported: # do nothing if user doesn't have D-Bus bindings return - bus = dbus.SessionBus() try: + bus = dbus.SessionBus() if not 'com.google.code.Awn' in bus.list_names(): # Awn is not installed return except: - pass + return iconset = gajim.config.get('iconset') prefix = os.path.join(helpers.get_iconset_path(iconset), '32x32') if status in ('chat', 'away', 'xa', 'dnd', 'invisible', 'offline'):