Repository: lutris/lutris

Issue:
After the Lutris update, no games start.
On the previous version 0.5.6, all games were launched.
After updating Lutris to version 0.5.7-1, **not a single game starts if "Disable desktop effects" is enabled in preference**
Here is what the console writes. **FileNotFoundError: [Errno 2] No such file or directory: 'qdbus'**
Archlinux.
python-dbus is installed
![image](https://user-images.githubusercontent.com/67700024/86579374-e878ae00-bf85-11ea-9528-60aeeb460fca.png)



Discussion:
Before toggling compositing, lutris checks if it's enabled.
To do this lutris on Plasma runs: `qdbus org.kde.KWin /Compositor org.kde.kwin.Compositing.active`
On your system, the `qdbus` command (QTs DBus command) is not found.

I am not sure this is **SOLELY** a lutris problem, but also not saying lutris is not at fault at all.
I would create a fix tho, once I figure out what to do instead.
(The maintainer would, of course, have to accept it).
The code was recently changed for 5.7 there. Probably an unforeseen problem. That's how it goes.

So yes, I agree it likely should be fixed in Lutris code.
I think its unlikely that this is a lutris problem.

In lutris 5.6, there was no check if compositing was enabled.
But `qdbus` still was used to enable and disable compositing on plasma.

It could of course be that the desktop-environment was not properly detected and nothing was done anyway.
(There was a change that `DESKTOP_SESSION` does not have to match perfectly, it only has to end with "plasma").
> I think its unlikely that this is a lutris problem.
> 
> In lutris 5.6, there was no check if compositing was enabled.
> But `qdbus` still was used to enable and disable compositing on plasma.
> 
> It could of course be that the desktop-environment was not properly detected and nothing was done anyway.
> (There was a change that `DESKTOP_SESSION` does not have to match perfectly, it only has to end with "plasma").

My bad. I originally read what you typed as it as probably being with Lutris but now I read it again and that's not quite what you said lol.

Considering the amount of code changes there in Lutris 5.7 I would personally assume Lutris since it worked the version before so. It is possible yes (I won't argue that it isn't with this) that Lutris does something good and finds a problem with the user's system or packages on the system.

Resolving patch:
diff --git a/lutris/util/display.py b/lutris/util/display.py
--- a/lutris/util/display.py
+++ b/lutris/util/display.py
@@ -162,7 +162,16 @@ def get_desktop_environment():
 
 
 def _get_command_output(*command):
-    return subprocess.Popen(command, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, close_fds=True).communicate()[0]
+    """Some rogue function that gives no shit about residing in the correct module"""
+    try:
+        return subprocess.Popen(
+            command,
+            stdin=subprocess.DEVNULL,
+            stdout=subprocess.PIPE,
+            close_fds=True
+        ).communicate()[0]
+    except FileNotFoundError:
+        logger.error("Unable to run command, %s not found", command[0])
 
 
 def is_compositing_enabled():
@@ -221,7 +230,13 @@ def _get_compositor_commands():
 
 
 def _run_command(*command):
-    return subprocess.Popen(command, stdin=subprocess.DEVNULL, close_fds=True)
+    """Random _run_command lost in the middle of the project,
+    are you lost little _run_command?
+    """
+    try:
+        return subprocess.Popen(command, stdin=subprocess.DEVNULL, close_fds=True)
+    except FileNotFoundError:
+        logger.error("Oh no")
 
 
 def disable_compositing():


Test patch: