I Often run a program to open a file from terminal, and I just want to take a quick look at the file in the program without clicking the program's window, and then close the program by Ctrl-F4 which requires the program's window is in the front i.e. in the focus by default. If the program is native Linux's one, the program's window is always in front i.e. in focus by default, so I can just close the program by Ctrl-F4. If the program is a Windows' one running under Wine, the program's window is not in the front, i.e. not in focus by default. The program which is in the front is the terminal from which the program is started.  I often forget that, and accidentally close the terminal instead of the program by Ctrl-F4. Closing the terminal will  close the program as well, but does more than what I want to. So my question is: how can I make a Windows' program to run in the front by default?Note:You can test the above by opening a pdf file with Windows' program PDFXCview.exe under Wine 2.0.1, and with  native linux's program evince. I am running them under Ubuntu 16.04.I run the Windows' program to open a file under wine in terminal by wine /home/tim/path/to/PDFXCview.exe myfile.pdfand the program's window is not in the front by default.Strangely, if I run the program without opening any file bywine /home/tim/path/to/PDFXCview.exe the window of the program will be in the front by default.One thing that might or might not be related is that I have set upto use PDFXCview.exe to open pdf files from file manager PcManFM inLXDE, by adding to ~/.local/share/applications/mimeinfo.cache:application/pdf=wine-extension-pdf.desktop;userapp-PDFXCview.exe-NHNW1Y.desktop;where the content of the file~/.local/share/applications/userapp-PDFXCview.exe-NHNW1Y.desktopis[Desktop Entry]Type=ApplicationName=PDFXCview.exeExec=wine /home/tim/path/to/PDFXCview.exe %UCategories=Other;NoDisplay=trueMimeType=application/pdfTerminal=falseIt might not be related because it is a setup for running programsfrom desktop environment, while my question is about runningprograms from terminal.When I open a pdf file using PDFXCview.exe under wine from PcManFM, by double clicking the file in PcManFM, the window of PDFXCview.exe is not in the front either. See https://askubuntu.com/q/925540/1471Thanks.
The window of a Window's program running under Wine is not in the front by default
ubuntu;wine