Skip to content

Commit

Permalink
Update NSLGameScanner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
moraroy authored Feb 29, 2024
1 parent 6bef543 commit 282b411
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions NSLGameScanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
import xml.etree.ElementTree as ET


# Check the value of the DBUS_SESSION_BUS_ADDRESS environment variable
dbus_address = os.environ.get('DBUS_SESSION_BUS_ADDRESS')
if not dbus_address or not dbus_address.startswith('unix:path='):
# Set the value of the DBUS_SESSION_BUS_ADDRESS environment variable
dbus_address = f'unix:path=/run/user/{os.getuid()}/bus'
os.environ['DBUS_SESSION_BUS_ADDRESS'] = dbus_address

# Path to the env_vars file
env_vars_path = f"{os.environ['HOME']}/.config/systemd/user/env_vars"
Expand Down

0 comments on commit 282b411

Please sign in to comment.