This command works fine from the command line, but if I run it from the UI made with LÖVE, it won't work because the UI won't actually kill itself until the whole command is executed. And I can't launch the selected app with my UI running because (I don't think I'm using the right words but I hope it can be understood) they can't "share the screen" (I get an "xauth: error".
I was thinking on creating a temporary file with the command for launching the app, so the workflow from LÖVE would be:
-create the temporary file with the command
-call love.event.quit()
-somehow call the temporary file right after LÖVE is closed, like a quit callback or something.
Any ideas?
[EDIT]
I hate and love it when this happens: I found the solution shortly after I posted this. The solution is using a couple of scripts.
Script 1: this launches the UI and waits for it to be closed to launch a script called "launchapp.sh":
#!/bin/bash
Code: Select all
XDG_DATA_HOME=/tmp LOVE_GRAPHICS_USE_OPENGLES=1 ./love project.love
wait
./launchapp.sh
There might be a smarter way, but this one works