Use case:
1) Autostart barrier tray icon
2) Have script running and poll for event:
a) Machine plugged in to docking station - if barrier client not started, start it
b) Machine unplugged from docking station - if barrier client started, kill it
Currently this is possible, however without monitoring from GUI. GUI client runs completely separately and is unaware of a second instance of barrier client. This leads to two problems:
1) Killing barrier client, the child proccess of barrier GUI, results in barrier GUI restarting the process.
2) Spawning a new barrier client does not get registered with the barrier GUI, which is unaware of this instance.
Ideally, the GUI would allow some way to emulate the user action of selecting start/stop service from the tray icon. Unix domain sockets? TCP sockets? DBUS? Something to that effect.
I am aware that automation can be achieved with the barrierc client alone, however the tray icon application cannot be presently made to work with this scenario.
If the devs specify which IPC method would be suitable for this task, if any, I might do a POC.
With regards to a IPC method, I would, personally, go for something efficient and portable.
We could use Unix domain sockets for the *nix targets, including macOS. With Windows, there's a IPC method called 'Windows Sockets', which might be suitable.
Use case: 1) Autostart barrier tray icon 2) Have script running and poll for event: a) Machine plugged in to docking station - if barrier client not started, start it b) Machine unplugged from docking station - if barrier client started, kill it
Currently this is possible, however without monitoring from GUI. GUI client runs completely separately and is unaware of a second instance of barrier client. This leads to two problems:
1) Killing barrier client, the child proccess of barrier GUI, results in barrier GUI restarting the process.
2) Spawning a new barrier client does not get registered with the barrier GUI, which is unaware of this instance.
Ideally, the GUI would allow some way to emulate the user action of selecting start/stop service from the tray icon. Unix domain sockets? TCP sockets? DBUS? Something to that effect.
I am aware that automation can be achieved with the barrierc client alone, however the tray icon application cannot be presently made to work with this scenario.
If the devs specify which IPC method would be suitable for this task, if any, I might do a POC.