mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 15:21:52 +01:00
Update NSLGameScanner.py
This commit is contained in:
parent
1ad559ea53
commit
4e63c385cb
@ -15,6 +15,13 @@ from urllib.request import urlretrieve
|
|||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
import xml.etree.ElementTree as ET
|
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
|
# Path to the env_vars file
|
||||||
env_vars_path = f"{os.environ['HOME']}/.config/systemd/user/env_vars"
|
env_vars_path = f"{os.environ['HOME']}/.config/systemd/user/env_vars"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user