You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the hacky and not very robust method of detecting x11/wayland/kms use via reading the envar XDG_SESSION_TYPE.
The following un-merged pull request has been submitted to the RetroPie Project. I would like to adopt it early with some modifications: RetroPie/RetroPie-Setup#3686
TARGETS:
Remove usage of XDG_SESSION_TYPE
Restore using sudo to run the script as per RetroPie
The text was updated successfully, but these errors were encountered:
After doing further research I have come to the conclusion that there is no reliable one size fits all solution to determine session type. XDG_SESSION_TYPE is a none starter because it can be set by a display manger but what if you don't use one? It can also be set by the desktop or compositor but what if you use a desktop that does not set this envar? How about building a binary via SSH which sets XDG_SESSION_TYPE to tty? The build won't work on x11 or wayland as it assumes a kms setup.
Other solutions rely on parsing loginctl such as loginctl show-session $(awk -v u="$USER" '$0 ~ u{print $1}'<<<$(loginctl)) -p Type. What about users of distros like Artix that do not use systemd as an init system?
Replace the hacky and not very robust method of detecting x11/wayland/kms use via reading the envar XDG_SESSION_TYPE.
The following un-merged pull request has been submitted to the RetroPie Project. I would like to adopt it early with some modifications: RetroPie/RetroPie-Setup#3686
TARGETS:
The text was updated successfully, but these errors were encountered: