mdeguzis / SteamOS-Tools

Tools, scripts, and hosted packages for SteamOS.
http://www.libregeek.org
GNU General Public License v3.0
191 stars 24 forks source link

Web Apps on Brewmaster / Brewmaster_Beta #60

Closed mdeguzis closed 8 years ago

mdeguzis commented 9 years ago

Currently web apps do not launch from BPM. This is being worked on. This does not seem to be an issue with Xephyr, but something else.

cptn-cosmo commented 9 years ago

Is there any update on this issue? :)

mdeguzis commented 9 years ago

I haven't gotten a whole lot direction from the folks in the Steam Universe forum, but I will be looking at this today or tomorrow. I have to build a deb package for Kodi to fix that install, and test out Unreal Tournament 4. This is on my list to look at. Xephyr should still work, so there may be a kind somewhere in how many of us in the forum ran Chrome via kiosk mode. I'll try to report back here when something changes.

cptn-cosmo commented 9 years ago

Awesome, thanks for the update!

mdeguzis commented 9 years ago

Since I last approached this, I had some things work in testing small items, but it seems Chrome just doesn't want to start in the foreground. I had attempted to repackage Chromium-dev with widevine support, but that didn't work 100%, since I had some packaging issues. I may revisit this method again soon once I get my test machine back up and running. I'll also see if there is any other display method I could do. Quite possibly, I could see what SteamOS does to switch to "desktop mode", and do a switch to that, launch Chrome with antimicro and that's all she wrote.

Ryochan7 commented 9 years ago

I had been messing around with the steamos-compositor source code to find out why it was not presenting the Xephyr window. For some reason, the Xephyr window never gets populated with a value for the STEAM_GAME atom. It is possible to set the property manually though. Here is a small example of code to run after launching Xephyr that will allow Steam to grab the window.

WINDOW_ID=$(xwininfo -root -children | grep "Xephyr" | awk '{print $1}')
xprop -id $WINDOW_ID -f "STEAM_GAME" 32c -set "STEAM_GAME" 8000

Doing that is enough to get Steam to grab the window and display it. The value of 8000 used in the snippet is completely arbitrary. I am not sure why the Xnest window gets populated with STEAM_GAME but Xephyr does not.

mdeguzis commented 9 years ago

Excellent .... I'll add this code after the Xephyr launch code for web apps from the alchemist branch and try this tomorrow. Thank you @Ryochan7 , much appreciated!

mdeguzis commented 9 years ago

IT WORKS!. Is there a way to skip the antimicro welcome screen?

Ryochan7 commented 9 years ago

You probably already have but I should mention that I run sleep 1 before trying to grab the window id. That should give Xephyr enough time to start up and create a window so that there is a window to check for.

As for antimicro, there is no way to skip the wizard on the first run. There were issues with some previous builds where the check for whether the wizard should appear was not working right and it could appear when not needed.

mdeguzis commented 9 years ago

Ok I will add a pause in there. That's ok, just though i'd ask. Again , thank you

mdeguzis commented 9 years ago

@Ryochan7 , another user was asking about the welcome screen on reddit. I suppose what I could do is advise them to start it once in desktop mode, or make a screenshot with highlighted areas for the wiki, since the Steam compositor makes the text extremely small. Is this flag for the wizard not stored anywhere after first run? I understand if not.

Ryochan7 commented 9 years ago

The program checks if any keys have been defined in the main config file; the file is usually stored at $HOME/.config/antimicro/antimicro_settings.ini. A specific flag is not set by the wizard after going through it as it is assumed that either the wizard will save a setting if something was changed or some key value pair will change during a normal run; the minimum saved values would be saving the main window size and position. I guess that isn't such a good assumption to make.

mdeguzis commented 8 years ago

@Ryochan7 , with the latest SteamOS-Tools web apps script (see default launch.sh here), are you able to launch Chrome successfully? Seems to get stuck for me nowadays. If Chrome is this problematic in the SteamOS session, I may just keep hammering away and trying to integrated widevine support.

Ryochan7 commented 8 years ago

@ProfessorKaos64: I have looked into it and BROWSER_TMP is not replaced from the copied Default-Launch.sh file unless the custom URL option is used. One more sed command is needed around line 362. Everything else seems fine but I haven't tested it yet.

mdeguzis commented 8 years ago

My main problem is not that small issue, which I will fix, but getting Chrome to show at all anymore. Thank you for any help you can give. I have looked into the commands used, and their syntax. The WINDOW_ID piece was grabbing the wrong field (print $4 vs. print $1). Chrome just doesn't want to show itself. Still working through some ideas maybe later tonight.

Ryochan7 commented 8 years ago

I am not having that problem. After running the extra sed command to replace BROWSER_TMP, Chrome launches fine.

mdeguzis commented 8 years ago

Hmmm ok. I will test again tonight from a fresh install again and/or vmware snap restore.

mdeguzis commented 8 years ago

No dice for me on a fresh install for me @Ryochan7

http://slexy.org/view/s21mJIBW6G

Ryochan7 commented 8 years ago

I am seeing a couple of potential problems in the log file.

Line 14

xprop: error: Invalid window id format: :15.0.

Line 22-26

[7278:7278:1123/213515:ERROR:process_singleton_posix.cc(279)] Failed to create /home/steam/.config/google-chrome/SingletonLock: Permission denied
[7278:7278:1123/213515:ERROR:chrome_browser_main.cc(1291)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.
[7278:7307:1123/213515:ERROR:cache_util.cc(132)] Unable to move cache folder /home/steam/.config/google-chrome/ShaderCache/GPUCache to /home/steam/.config/google-chrome/ShaderCache/old_GPUCache_000
[7278:7307:1123/213515:ERROR:cache_creator.cc(132)] Unable to create cache
[7278:7307:1123/213515:ERROR:shader_disk_cache.cc(588)] Shader Cache Creation failed: -2
mdeguzis commented 8 years ago

Fixed with permissions check and rebuild of antimicro to include libsdl2-2.0-0

mdeguzis commented 8 years ago

@Ryochan7 working fine for me, but wanted to pick your brain on the xprop line...

xprop: error: Invalid window id format: -f.

See #101 , I know of that syntax error, but I haven't checked into that message yet.

Ryochan7 commented 8 years ago

I have found that xprop will throw that error if the window ID is not an integer or hex value. I had wondered before why the script now has awk print the 4th string instead of the 1st. On my system when I run xwininfo, I get the following output for the full string.

     0x1800001 "Xephyr on :15.0 (ctrl+shift grabs mouse and keyboard)": ("Xephyr" "Xephyr")  1920x1080+0+0  +0+0

In that case, printing $4 with awk will result in :15.0 being used for the window id which is not right. What is the full string that you get when you run the following command after opening a web app?

xwininfo -root -children | grep "Xephyr" | awk '{print $0}'

I guess that maybe the overlay library now populates the Xephyr window properly so using xprop might not be necessary anymore. I will have to look into that.

Edit: I just commented out the code that uses xwininfo and xprop and the YouTubeTV-Launch.sh script still works on my system.

mdeguzis commented 8 years ago

Well, it might be useful to still keep it there if it does no harm and may be useful later. I did have $1 but thought that was wrong, incorrectly. I'll make sure it is restored after I test it.

mdeguzis commented 8 years ago

Corrected the awk error in 07137df added comment about what you found out in 73f5fee