Open a window using PHP and maintain its active state.
Open a window using PHP and maintain its active state.
You're looking to automate starting a screen on another user's Ubuntu server after a PHP script finishes. The current approach uses `exec` with sudo, which works but feels a bit clunky. Here are some alternatives:
- Use `systemctl start` or `service` commands if the screen is managed via systemd.
- Consider running the script in a dedicated service or using a tool like `screen`/`tmux` for persistent sessions.
- If the script needs to keep running, you might need to adjust its exit condition or use a process manager.
Let me know if you'd like help refining the script or setting up a persistent session!
You can remove the script from the process list with "disown".