On Mon, 30 Jul 2018 at 16:00, Ralph Corderoy <ralph@inputplus.co.uk> wrote:
Hi Mike,
How can I automatically detect that FreeRDP session has been closed so that I can run a small Zenity script?
Well, a script is probably being run, just like a .xinitrc might be, and instead of its normal
xclock & xbiff & xterm & exec twm
to start a bunch of X clients in the background and then replace xinit with the window manager, ending the session when the WM quits, you could
twm & rdp-client timeout 30 zenity ... # ...conditionally reboot, shutdown, or just re-start X server when # it exits to get a fresh rdp-client.
so sh(1) waits for rdp-client to exit before executing further commands.
One issue here: it’s possible that the RDP client returns control to the shell immediately (as some GUI apps will do). In that case, you’ll need a different solution. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16