Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Experimental Video Detection #38

Closed
V0rt3x667 opened this issue Nov 26, 2023 · 2 comments
Closed

Test Experimental Video Detection #38

V0rt3x667 opened this issue Nov 26, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@V0rt3x667
Copy link
Owner

V0rt3x667 commented Nov 26, 2023

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
@V0rt3x667 V0rt3x667 added the enhancement New feature or request label Nov 26, 2023
@V0rt3x667 V0rt3x667 self-assigned this Nov 26, 2023
@V0rt3x667
Copy link
Owner Author

V0rt3x667 commented Nov 27, 2023

ON HOLD!

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?

@V0rt3x667 V0rt3x667 added the help wanted Extra attention is needed label Nov 27, 2023
@V0rt3x667 V0rt3x667 linked a pull request Nov 27, 2023 that will close this issue
@V0rt3x667 V0rt3x667 removed a link to a pull request Nov 28, 2023
@V0rt3x667 V0rt3x667 removed the help wanted Extra attention is needed label Nov 28, 2023
@V0rt3x667
Copy link
Owner Author

I have reverted the main branch to the default RetroPie behaviour. I will keep the test_video branch as alternative for anyone wishing to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant