Any Way to Rotate Screen Automatically on Steamlink Startup?
-
Hello,
I am currently working on a handheld emulation system using a Raspberry Pi 4, and a Waveshare 4in touchscreen based on the XPT 2046 chip.
One issue that I have ran into is that the default orientation for the screen is 480x800, in portrait. I have managed to fix this for most things, however on application that I am still having issues with is Steamlink. Whenever it runs it opens a display session using the X display manager, and it runs in portrait. I fixed this issue for the LXDE desktop environment by adding an autostart application that rotates the screen when the desktop opens, however that doesn't affect when steamlink is opened by itself.
I tried fixing this by writing a bash script to open Steamlink, and automatically run the 'xrandr -o left' command, however, it doesnt work as the xrandr command can't run before the 'steamlink' command. This is because the X session isn't running yet. I also can't run it after the 'steamlink' command, as it won't trigger until Steamlink, and the X session, are closed.
The ideal solution would be to have a bash script that opens steamlink, then rotates the display, and when steamlink is closed it exits back to how it was before steamlink is opened.
If anyone has any ideas for how to figure this out it would be great. Thanks.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.