Subject: Re: cygwin x11 doesn't start after windows 10 upgrade
From: Steinar Bang <[email-masked]>
To: [email-masked]
Date: Sat, 13 Jun 2020 17:48:51 +0200
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>

>>>>> Marco Atzeri via Cygwin <[email-masked]>:
>>> It is never a good idea to have the Cygwin Home dir the
>>> same of Windows user dir

>> Why this not a good idea?

> because permissions like the one needed for ssh
> can be screwd by Windows ACL permission inherited

Ok.

FWIW I have used cygwin ssh for two things:
 1. Launching mosh sessions (this still worked after the Win10 upgrade)
 2. Running "ssh -Y " sessions from lxterminal launched with XWin by xlaunch
and it has worked fine until the reboot followed by the Win10 upgrade.

mosh still works, and normal ssh (without -Y) from cygwin terminals
still works, after the Win10 upgrade.

> can you reset the default

> db_home:  /home/%U

> close all processes and try X again ?
> This should use /home/sbang as your new home and
> we can see if it is a permission problem that is causing
> issue to Xwin

I changed the /etc/nsswitch.conf file, and rebooted to ensure all
processes had been killed.  But cygwin still seemed to use the
windows profile directory.  I still have HOME set to the profile
directory.  I have all of my unix-y program setup files there (used by
GNU emacs, git bash, and mingw utilities)

But still no luck in launching XWin, either with xlaunch or from the
command line.

I will unset HOME and reboot and try again.

For now, here's the output from the launch from the cygwin console:
sbang@ITEM-S63383:~$ pwd
/cygdrive/d/Profiles/sbang
sbang@ITEM-S63383:~$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
#    This file is read once by the first process in a Cygwin process tree.
#    To pick up changes, restart all Cygwin processes.  For a description
#    see https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch
#
# Defaults:
# passwd:   files db
# group:    files db
# db_enum:  cache builtin
db_home:  /home/%U
# db_home:  windows
# db_shell: /bin/bash
# db_gecos: <empty>
sbang@ITEM-S63383:~$ ll /home/sbang
ls: cannot access '/home/sbang': No such file or directory
sbang@ITEM-S63383:~$ pwd
/cygdrive/d/Profiles/sbang
sbang@ITEM-S63383:~$ startxwin

Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.20.5.0
OS: CYGWIN_NT-10.0-18363 ITEM-S63383 3.1.5-340.x86_64 2020-06-01 08:59 UTC x86_64
OS: Windows 10  [Windows NT 10.0 build 18363] (Win64)
Package: version 1.20.5-3 built 2019-09-06

XWin was started with the following command line:

/usr/bin/XWin :0 -multiwindow -auth
 /cygdrive/d/Profiles/sbang/.serverauth.652

(II) xorg.conf is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
LoadPreferences: /cygdrive/d/Profiles/sbang/.XWinrc not found
LoadPreferences: Loading /etc/X11/system.XWinrc
LoadPreferences: Done parsing the configuration file...
winDetectSupportedEngines - RemoteSession: no
winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL
winDetectSupportedEngines - Returning, supported engines 00000005
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
sbang@ITEM-S63383:~$

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