Back to the main site

Lutris needs sudo to run

I know sudo shouldn’t be needed to run lutris, but the only way I can get it to successfully run is if I run lutris with sudo, otherwise I get some “permission” denied errors and lutris doesn’t run. Any ideas? I tried to change the permission to the file that was blocking the launch and kinda got around this problem, but running any game results in other files needing permissions so I need another approach at it

This is the terminal log when trying to run a game

INFO 2018-08-12 12:03:25,256 [runner]:Runtime disabled by system configuration
ERROR 2018-08-12 12:03:25,263 [jobs]:Error while completing task <bound method wine.prelaunch of <lutris.runners.wine.wine object at 0x7fc079130c88>>: [Errno 13] Permission denied: ‘/home/fil/Games/overwatch/user.reg’
<class ‘PermissionError’> [Errno 13] Permission denied: ‘/home/fil/Games/overwatch/user.reg’
File “/usr/lib/python3/dist-packages/lutris/util/jobs.py”, line 29, in target
result = self.function(*args, **kwargs)
File “/usr/lib/python3/dist-packages/lutris/runners/wine.py”, line 1005, in prelaunch
prefix_manager.configure_joypads()
File “/usr/lib/python3/dist-packages/lutris/util/wineprefix.py”, line 114, in configure_joypads
self.clear_registry_key(key)
File “/usr/lib/python3/dist-packages/lutris/util/wineprefix.py”, line 41, in clear_registry_key
registry.save()
File “/usr/lib/python3/dist-packages/lutris/util/wineregistry.py”, line 143, in save
with open(path, ‘w’) as registry_file:

  1. Did you install Overwatch while running Lutris with sudo?
  2. Is OW installed on a separate drive?
  3. Do you have read/write access to that drive?
  1. I think I did, please don’t tell me I have to reinstall it
  2. Same drive
  3. I do

Just for future reference:
If you run Lutris with sudo, the game install directory belongs to the root user. This means that you also have to run Lutris with sudo if you want to play the game.

Fortunately, there is a pretty easy fix for that: just run sudo chown -R $USER:$USER path/to/game/installation (in this case sudo chown -R $USER:$USER /home/fil/Games) to fix all permissions.

Remember, never use sudo unless you know exactly what it does and if you really need it.

2 Likes

Hello,
I wanted to ask, does a game being installed on a separate drive cause a problem ? I am having a problem with league of legends