Re: Cygwin/X - Query: why invoking from cmd backgrounds?

2024-01-20 Thread Jon Turney via Cygwin

On 20/01/2024 08:55, Shaddy Baddah via Cygwin wrote:

Hi,

I am just wondering if anyone understands why XWin detaches/runs in
the background, when launched from Windows Command Prompt.


I assume this is due to XWin being marked as a GUI, not console 
application (to stop it popping up a useless console window when run 
directly e.g. via explorer or a shortcut).



This being different to when run from Mintty.

Here's what happens with my Mintty invocation, which stays in the

[...]


Is this special detection and handling in the main() (or whatever
entrypoint is applicable)?


This is something cmd (and powershell) does. I don't know the mechanism.

I think you can make cmd wait with 'start /w'.  Or maybe making the 
command part of a pipeline...



--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Re: Cygwin/X - Query: why invoking from cmd backgrounds?

2024-01-20 Thread Marco Atzeri via Cygwin

On 20/01/2024 09:55, Shaddy Baddah via Cygwin wrote:

Hi,

I am just wondering if anyone understands why XWin detaches/runs in
the background, when launched from Windows Command Prompt.


Hi Shaddy,
Only a guess


But here's what happens when I run that first command line from
Windows Command Prompt. No output and the command returns, though the
server is running (including with an icon tray clickable):

| C:\Users\shaddy>C:\PublicData\sw.portapps\cygwin.x86_64\bin\XWin :1 
-nolisten tcp -ac -multiwindow

|
| C:\Users\shaddy>

Is this special detection and handling in the main() (or whatever
entrypoint is applicable)?


I assume you still have the log on /var/log/xwin/XWin.0.log
but it is not anymore duplicated on the terminal



Regards,
Shaddy


Marco


--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple


Cygwin/X - Query: why invoking from cmd backgrounds?

2024-01-20 Thread Shaddy Baddah via Cygwin

Hi,

I am just wondering if anyone understands why XWin detaches/runs in
the background, when launched from Windows Command Prompt.

This being different to when run from Mintty.

Here's what happens with my Mintty invocation, which stays in the
foreground:

| $ XWin  :1 -nolisten tcp -ac -multiwindow
| Welcome to the XWin X Server
| Vendor: The Cygwin/X Project
| Release: 1.21.1.9
| OS: CYGWIN_NT-10.0-19045 pc-w10 3.4.10-1.x86_64 2023-11-29 12:12 UTC x86_64
| OS: Windows 10  [Windows NT 10.0 build 19045] x64
| Package: version 21.1.9-1 built 2023-12-10
|
| XWin was started with the following command line:
|
| XWin :1 -nolisten tcp -ac -multiwindow
|
| (II) xorg.conf is not supported
| (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
| winUpdateDpi - primary monitor native DPI x 96 y 96
...
| winClipboardProc - xcb_connect () returned and successfully opened the 
display.


Here's what happens if I invoke tigervnc-server from Windows Command
Prompt, where it stays in the forgeground and I can terminate with
Ctrl-C:

| C:\Users\shaddy>C:\PublicData\sw.portapps\cygwin.x86_64\bin\Xvnc  :2 
-nolisten tcp -ac -geometry 900x600 -SecurityTypes=None
|
| Xvnc TigerVNC 1.8.0 - built Dec 30 2017 22:15:31
| Copyright (C) 1999-2017 TigerVNC Team and many others (see README.txt)
| See http://www.tigervnc.org for information on TigerVNC.
| Underlying X server release 11906000, The X.Org Foundation
|
|
| Sat Jan 20 19:34:43 2024
|  vncext:  VNC extension running!
|  vncext:  Listening for VNC connections on all interface(s), port 5902
|  vncext:  created VNC server for screen 0
| MIT-SHM extension disabled due to lack of kernel support

But here's what happens when I run that first command line from
Windows Command Prompt. No output and the command returns, though the
server is running (including with an icon tray clickable):

| C:\Users\shaddy>C:\PublicData\sw.portapps\cygwin.x86_64\bin\XWin :1 -nolisten 
tcp -ac -multiwindow
|
| C:\Users\shaddy>

Is this special detection and handling in the main() (or whatever
entrypoint is applicable)?

--
Regards,
Shaddy


--
Problem reports:  https://cygwin.com/problems.html
FAQ:  https://cygwin.com/faq/
Documentation:https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple