mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-15 21:15:24 +02:00
Restart GNOME logs in to GNOME, not the account's default session (gaming mode after the conversion); the default is put back afterwards
Sync git.upriser.nl mirror / sync (push) Skipped
Sync git.upriser.nl mirror / sync (push) Skipped
This commit is contained in:
1 parent
4b601bb196
commit
49fba4af82
4 files changed
+42
-3
No files matched your search
+3
-1
@@ -351,7 +351,9 @@ class Backend(QObject):
|
||||
# Steamify's helper logs the user straight back in; else a plain logout.
|
||||
import subprocess
|
||||
helper = "/usr/local/libexec/steamify-gdm-relogin"
|
||||
if os.access(helper, os.X_OK) and subprocess.run(["sudo", "-n", helper], capture_output=True).returncode == 0:
|
||||
# The session this one is, for this login only: the default (gaming mode, after the conversion) would log in there.
|
||||
session = os.environ.get("XDG_SESSION_DESKTOP") or "gnome"
|
||||
if os.access(helper, os.X_OK) and subprocess.run(["sudo", "-n", helper, session], capture_output=True).returncode == 0:
|
||||
return
|
||||
QProcess.startDetached("gnome-session-quit", ["--logout", "--no-prompt"])
|
||||
|
||||
|
||||
Reference in new issue
Block a user