How to pipe STDIO from a thread process to /dev/null?
0
votes
1
answer
321
views
I am trying to run Plarium Play with wine , but have encountered an odd issue. When trying to launch it from a regular desktop entry, I get this JavaScript error:
This does not happen if I launch from the terminal.
If I try and launch it from a desktop entry, even one piping to /dev/null, after first login, without starting Plarium Play from a terminal first, I get two JavaScript errors, one after the other:
In both cases, after dismissing them, the splash hangs forever.
This does not happen if I launch Plarium Play from the command line first, then use the modified desktop entry (with an stdio pipe to /dev/null) for later launches. Notably, the program launched from terminal keeps running even if I press Ctrl+C or close the terminal, and later startups with the piped desktop entry are faster than the initial terminal launch, so I assume it is starting a background process. Also notably, if I try to launch Plarium Play after getting the aforementioned launch errors without logging out, it thinks that an instance of Plarium Play is running, and exits immediately.
I cannot launch Plarium Play from the desktop entry, even if I did start the service from the terminal, unless I modify it to at least pipe regular stdio somewhere. If I try with an unmodified desktop entry, I get a similar JavaScript error to the ones above:
Notably, I can still relaunch Plarium Play after this last error without logging out, so long as I do it from terminal or pipe the output.
My conclusion is that the initial stages of the program to call up an existing instance of the background service NEED to debug somewhere, as do initial stages of the service startup, because of a limitation in JavaScript and Electron (I know little about either). The thing is, the service startup is of course sent to a separate thread, and as such won't use a regular > pipe from the launch command, although it will successfully find a regular terminal's stdio. However, configuring the desktop file to execute in terminal does not fix the problem for some reason. Note that any successful launch whatsoever brings up the Electron GUI of Plarium Play, as it is meant to.
Assuming this conclusion is correct (please tell me if you think it isn't), what can I do to also pipe the attempted stdio access of the server startup thread to /dev/null (or anywhere), so that I do not have to launch Plarium Play from the command line first every time I log in?




Asked by TheLabCat
(133 rep)
Jun 9, 2023, 09:36 PM
Last activity: Jul 7, 2023, 06:35 PM
Last activity: Jul 7, 2023, 06:35 PM