I'm writing a Python program that runs on Linux server. It monitors some log file and displays lines from that log file in a GUI, based on a given keyword.
I added a new feature that opens a terminal window with "less" showing the line that the user double-clicked on in my program.
My problem is this: When i run my program locally (on my computer) it works perfectly. But when I run my program from the main server while connected to it via SSH, the programs runs well, but when I double-click one of the lines, I see a console window that opens and closes quickly.
Here is the code that responsible for opening the "Less Terminal":
p = subprocess.Popen(args = ["gnome-terminal", "--command = less -p " + "\"" +searchString + "\"" " -j 10 " + "\"" + path + "\""], stdout = subprocess.PIPE)
How can I keep it open?
P.S. If I add shell = TRUE
, it just opens a new terminal window without the less
results.