delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/10/24/07:02:18

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 70AB43858D28
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cs.umass.edu
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.umass.edu
To: cygwin <cygwin AT cygwin DOT com>
From: Eliot Moss <moss AT cs DOT umass DOT edu>
Subject: Confusing Cygwin X / xlaunch issue
Message-ID: <1e4edecf-166c-e3c1-f961-b31bfa01271f@cs.umass.edu>
Date: Sun, 24 Oct 2021 12:01:38 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Thunderbird/68.12.1
MIME-Version: 1.0
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS,
KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: moss AT cs DOT umass DOT edu
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

First, things work fine when I am using just my hi-res laptop display, or that
display plus a hi-res external display in "Extend these displays" mode
according to Windows 10.  At present I am using a lower resolution external
display (becaue I am on an extended trip and it's what I have) in "Extend
these displays" mode with my hi-res laptop display.  This seems to confuse X
(and also xlaunch?).  Here are the issues:

When booted with the external lo-res display as the main display:

- xterm windows come up with a very large font.
- The X menu (controlled by .XWinrc) does not come up.

If I then change to have the laptop hi-res display as the main display,
without rebooting, and without restarting X

- The xterms still have a big font (I did not restart them, so no surprise)
- The X menu works (over on the laptop screen).

I then restart X,

- The new xterms still have the large font
- The X menu still works

If I then shutdown X, make the external lo-res display the main display, and
restart X,

- The xterm fonts are big
- The X menu does not come up.

Then, if I set the laptop to be the main display, reboot Windows, and restart
X,

- The xterm windows have the right size font (but start on the laptop and need
   to be dragged over to the other display; they do resize appropriately there)
- The X menu works (but is way over on the laptop display).

Finally, if I change to have the external display to be the main one, without
restarting X,

- New xterms come up with the right size fonts
- The X menu comes up on the external screen (as desired)

If I shut down X and restart it (external display still main),

- xterm fonts have the right size
- The X menu does not come up.

It seems that, at the least, I need to *start* X when the laptop (hi-res)
display is main.  I'm less clear as to whether I need to *boot* with it main
(I can try that later).

Is there an explanation for this?  Should I be doing something differently?
Is there a bug?  Thanks for any insight you can offer!  Eliot Moss

Here are further details of my setup:

I use xlaunch to get my X windows going.  The command in the Windows short-cut
that I click reads:

==================================================
C:\cygwin64\bin\run.exe /bin/xlaunch -p /usr/bin -run /home/moss/config.xlaunch
==================================================

My config.xlaunch reads:

==================================================
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="MultiWindow" ClientMode="StartProgram" LocalClient="True" Display="0" 
RemoteProtocol="" LocalProgram=".startxwinrc" RemoteProgram="xterm" RemoteHost="" RemoteUser="" 
XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ExtraParams="-unixkill 
-listen tcp -clipboard -resize -engine 1 -emulate3buttons 100" Wgl="False" DisableAC="True" 
XDMCPTerminate="False" SSHKeyChain="False" SSHTerminal="True" ExtraSSH=""/>
==================================================

My .startxwinrc reads:

==================================================
#!/bin/bash
#PATH="${PATH}:/usr/bin"

xrdb -merge ${HOME}/.Xdefaults
xmodmap ${HOME}/.Xmodmap

UC="${USER} console"
set > ~/set-output.txt
xterm +tb -geometry 110x62+4+0  -T "${USER}" -n "${USER}" -name "${USER}" -bg rgbi:.0/.2/.2    -ls 
-iconic &
xterm +tb -geometry 110x62-10+0 -T "${UC}"   -n "${UC}"   -name "${UC}"   -bg rgbi:.5/.0/.1    -ls 
-iconic &
emacs --chdir=${HOME} --no-splash --iconic --geometry=130x60+100+100 -T emacs &
# xemacs -iconic -geometry 110x61+0+0  -T xemacs &
wait
==================================================

My .XWinrc reads:

==================================================
MENU systray {
   elnux1     EXEC "xterm -tn xterm-256color -display %display% -ls -title elnux1     -bg 
rgbi:.1/.10/.1 -e /usr/bin/ssh moss AT elnux1 DOT cs DOT umass DOT edu"
   elnux7     EXEC "xterm -tn xterm-256color -display %display% -ls -title elnux7     -bg 
rgbi:.1/.10/.1 -e /usr/bin/ssh moss AT elnux7 DOT cs DOT umass DOT edu"
   roc        EXEC "xterm -tn xterm-256color -display %display% -ls -title roc        -bg 
rgbi:.2/.20/.0 2> /home/moss/term-start-err.txt -e /usr/bin/ssh moss AT roc DOT cs DOT umass DOT edu"
   swarm      EXEC "xterm -tn xterm-256color -display %display% -ls -title swarm      -bg 
rgbi:.0/.20/.0 -e /usr/bin/ssh moss AT swarm DOT cs DOT umass DOT edu"
   swarm2     EXEC "xterm -tn xterm-256color -display %display% -ls -title swarm2     -bg 
rgbi:.1/.20/.0 -e /usr/bin/ssh moss AT swarm2 DOT cs DOT umass DOT edu"
   moa        EXEC "xterm -tn xterm-256color -display %display% -ls -title moa        -bg 
rgbi:.0/.03/.0 -e /usr/bin/ssh moss AT moa DOT cs DOT umass DOT edu"
   deepgreen  EXEC "xterm -tn xterm-256color -display %display% -ls -title deepgreen  -bg 
rgbi:.0/.03/.0 -e /usr/bin/ssh moss AT deepgreen DOT cs DOT umass DOT edu"
   balder     EXEC "xterm -tn xterm-256color -display %display% -ls -title balder     -bg 
rgbi:.2/.00/.0 -e /usr/bin/ssh moss AT balder DOT cs DOT umass DOT edu"
   lithos     EXEC "xterm -tn xterm-256color -display %display% -ls -title lithos     -bg 
rgbi:.1/.10/.1 -e /usr/bin/ssh moss AT lithos DOT cs DOT umass DOT edu"
   supercloud EXEC "xterm -tn xterm-256color -display %display% -ls -title supercloud -bg 
rgbi:.1/.40/.0 -e /usr/bin/ssh emoss AT supercloud"
   SEPARATOR
   console  EXEC "xterm -display %display% -ls +tb -geometry 110x62-10+0 -T 'Eliot console' -n 
'Eliot console' -name 'Eliot console' -bg rgbi:.5/.0/.1"
   login    EXEC "xterm -display %display% -ls +tb -geometry 110x62+4+0  -T 'Eliot'         -n 
'Eliot'         -name 'Eliot'         -bg rgbi:.0/.2/.2"
   xterm    EXEC "xterm -tn xterm -display %display% -ls -title xterm"
   cygwin32 EXEC "HOME=/cygdrive/c/cygwin/home/moss /cygdrive/c/cygwin/bin/xterm -display %display% 
-ls -title 'Cygwin 32' -bg rgbi:.05/.05/.05"
   SEPARATOR
   xemacs  EXEC "xemacs"
   emacs   EXEC "emacs --geometry=130x62+100+100"
   xpdf    EXEC "xpdf"
   SEPARATOR
   "Reload .XWinrc" RELOAD
}

ROOTMENU systray

STYLES {
   # console MINIMIZE  # minimization handled in .startxwinrc
   # Eliot   MINIMIZE  # minimization handled in .startxwinrc
   task    MINIMIZE
   xemacs  MINIMIZE # Note: class is emacs; default name is emacs; this matches window with title xemacs
}

SILENTEXIT
==================================================

My XWin.0.log is:

==================================================
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.20.12.0
OS: CYGWIN_NT-10.0-19043 EM-SURFACE-2020 3.2.0-340.x86_64 2021-03-29 08:42 UTC x86_64
OS: Windows 10  [Windows NT 10.0 build 19043] (Win64)
Package: version 1.20.12-1 built 2021-07-11

XWin was started with the following command line:

XWin :0 -multiwindow -clipboard -nowgl -ac -unixkill -listen tcp
  -clipboard -resize -engine 1 -emulate3buttons 100

ddxProcessArgument - Initializing default screens
winInitializeScreenDefaults - primary monitor w 3240 h 2160
winInitializeScreenDefaults - native DPI x 192 y 192
[  1023.906] (II) xorg.conf is not supported
[  1023.906] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[  1023.906] LoadPreferences: Loading /home/moss/.XWinrc
[  1023.906] winDetectSupportedEngines - RemoteSession: no
[  1023.921] winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
[  1023.937] winDetectSupportedEngines - Returning, supported engines 00000005
[  1023.937] winSetEngine - Multi Window or Rootless => ShadowGDI
[  1023.937] winScreenInit - Using Windows display depth of 32 bits per pixel
[  1023.953] winAllocateFBShadowGDI - Creating DIB with width: 5800 height: 2674 depth: 32
[  1023.953] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[  1023.953] winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
[  1023.953] MIT-SHM extension disabled due to lack of kernel support
[  1023.953] XFree86-Bigfont extension local-client optimization disabled due to lack of shared 
memory support in the kernel
[  1023.953] (II) IGLX: Loaded and initialized swrast
[  1023.953] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[  1024.156] winPointerWarpCursor - Discarding first warp: 2900 1337
[  1024.156] (--) 5 mouse buttons found
[  1024.156] (--) Setting autorepeat to delay=500, rate=31
[  1024.156] (--) Windows keyboard layout: "00000409" (00000409) "US", type 4
[  1024.156] (--) Found matching XKB configuration "English (USA)"
[  1024.156] (--) Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[  1024.156] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[  1024.156] winInitMultiWindowWM - DISPLAY=:0.0
[  1024.156] winMultiWindowXMsgProc - DISPLAY=:0.0
[  1024.171] winMultiWindowXMsgProc - xcb_connect() returned and successfully opened the display.
[  1024.171] [  1024.171] winProcEstablishConnection - winInitClipboard returned.
winClipboardThreadProc - DISPLAY=:0.0
[  1024.171] Using Composite redirection
[  1024.171] winInitMultiWindowWM - xcb_connect () returned and successfully opened the display.
[  1024.187] winClipboardProc - xcb_connect () returned and successfully opened the display.
[  1026.828] winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState
[  1026.828] winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState
[  1028.484] winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState
[  1028.531] OS has icon alpha channel support: yes
[  1035.750] winWindowProc - WM_DISPLAYCHANGE - new width: 2560 new height: 2048 new bpp: 32
[  1035.750] winWindowProc - RemoteSession: no
[  1037.140] winInitNotifyIcon - Shell_NotifyIcon Failed
==================================================

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019