How to open all the files in the same instance lazarus / 32-Linux ---------------------------------------------------------------------- mosquito · 2022-01-30 09:32 I have an app (image viewer) made in Lazarus. In my debian, I have associated the image types to this app. Then, the app is called in the form: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i exec mylazvisor %fEverything works OK, now the problem is that a second image opens in another instance of the viewer. What I want is to open all in the same instance. I have occurred to me these two things: 1. Simulate a drag and drop to send the files to the app 2. Call Laz-Visor from another Laz-Launcher and set some type of IPC Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i exec lazvisor-launcher %fread/write env vars  I am looking for ideas, since this is a behavior that many programs have and I want to know how this is implemented by Lazarus. Thank you. ---------------------------------------------------------------------- Mr.Madguy · 2022-01-30 11:44 Not sure, how it's done on Linux, but on Windows you usually need to detect another instance of your app via checking some global object, like mutex, and then send data about command line parameters to it via something like pipe or memory mapped file. More advanced technique - to register your viewer as OLE server and use apps as clients. ---------------------------------------------------------------------- Bart · 2022-01-30 13:24 Look for UniqueInstance component. Bart ---------------------------------------------------------------------- mosquito · 2022-01-30 13:49 @Bart I still have not tried it, but apparently it's what I'm looking for. Thank you.