Repository: lutris/lutris

Issue:
Lutris won't start
**I tried to open Lutris, after downloading it using the instructions from the website**

**Expected behavior**

I was hoping for it to open.

**Current behavior**

It will not open. 

**Lutris debugging output**
When I went to check it out in the terminal, this was the result:
Traceback (most recent call last):
  File "/usr/games/lutris", line 40, in <module>
    from lutris.gui.application import Application
  File "/usr/lib/python3/dist-packages/lutris/gui/application.py", line 35, in <module>
    from lutris.game import Game
  File "/usr/lib/python3/dist-packages/lutris/game.py", line 14, in <module>
    from lutris.runners import import_runner, InvalidRunner, wine
  File "/usr/lib/python3/dist-packages/lutris/runners/wine.py", line 11, in <module>
    from lutris.runners.runner import Runner
  File "/usr/lib/python3/dist-packages/lutris/runners/runner.py", line 7, in <module>
    from lutris.config import LutrisConfig
  File "/usr/lib/python3/dist-packages/lutris/config.py", line 6, in <module>
    from lutris import settings, sysoptions
  File "/usr/lib/python3/dist-packages/lutris/sysoptions.py", line 9, in <module>
    from lutris.util.display import USE_DRI_PRIME, DISPLAY_MANAGER
  File "/usr/lib/python3/dist-packages/lutris/util/display.py", line 4, in <module>
    from dbus.exceptions import DBusException
ModuleNotFoundError: No module named 'dbus'`.






Discussion:
You don't have python-dbus installed on your system. Also, make sure that you have the version for Python 3 installed.
Installing Lutris on any supported distribution should not require the user installing any additional packages, the dependencies should be handled automatically using the distribution's package manager.

If it is not doing that then the package dependencies need to be updated. The maintainer of the package for the corresponding distribution needs to be notified.
If python3-dbus wasn't a dependency in one of the distros we support, we would know.
I'm running Debian 10 with python3-dbus installed and I'm having the same issue. I'm also getting this error - 
ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Any help would be greatly appreciated.
> I'm running Debian 10 with python3-dbus installed and I'm having the same issue. I'm also getting this error -
> ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
> Any help would be greatly appreciated.

If you're getting "ModuleNotFoundError: No module named 'dbus'`." then it could be that dbus isn't installed correctly (apparently that's a thing).

see: https://nixx.co/no-module-named-dbus/

I'm not sure these are really Lutris issues. It really can't fix every single problem known to man on install.

Resolving patch:
diff --git a/lutris/util/display.py b/lutris/util/display.py
--- a/lutris/util/display.py
+++ b/lutris/util/display.py
@@ -1,13 +1,16 @@
 """Module to deal with various aspects of displays"""
-# Standard Library
+# isort:skip_file
 import os
 import subprocess
 
-# Third Party Libraries
-from dbus.exceptions import DBusException
+try:
+    from dbus.exceptions import DBusException
+    DBUS_AVAILABLE = True
+except ImportError:
+    DBUS_AVAILABLE = False
+
 from gi.repository import Gdk, GLib, GnomeDesktop
 
-# Lutris Modules
 from lutris.util import system
 from lutris.util.graphics.displayconfig import MutterDisplayManager
 from lutris.util.graphics.xrandr import LegacyDisplayManager, change_resolution, get_outputs
@@ -108,12 +111,15 @@ def get_display_manager():
     """Return the appropriate display manager instance.
     Defaults to Mutter if available. This is the only one to support Wayland.
     """
-    try:
-        return MutterDisplayManager()
-    except DBusException as ex:
-        logger.debug("Mutter DBus service not reachable: %s", ex)
-    except Exception as ex:  # pylint: disable=broad-except
-        logger.exception("Failed to instanciate MutterDisplayConfig. Please report with exception: %s", ex)
+    if DBUS_AVAILABLE:
+        try:
+            return MutterDisplayManager()
+        except DBusException as ex:
+            logger.debug("Mutter DBus service not reachable: %s", ex)
+        except Exception as ex:  # pylint: disable=broad-except
+            logger.exception("Failed to instanciate MutterDisplayConfig. Please report with exception: %s", ex)
+    else:
+        logger.error("DBus is not available, lutris was not properly installed.")
     try:
         return DisplayManager()
     except (GLib.Error, NoScreenDetected):


Test patch: