public inbox for
help / color / mirror / Atom feed
* new start method questions
@ 2016-06-09 23:32 mathog
  2016-06-10  0:55 ` mathog
  0 siblings, 1 reply; 5+ messages in thread
From: mathog @ 2016-06-09 23:32 UTC (permalink / raw)
  To: cygwin-xfree


With an older version of Cygwin I had constructed a cut down 
distribution which included only the minimum pieces needed to run X11.  
It was about 40Mb, installed.

Since the X11 server update the start method changed.  The .bat file 
which starts things now has this as its active line:

C:\cygwinX\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; exec 

Unfortunately this method creates a "/home/username" directory.  The 
startxwin part
isn't the culprit, just starting bash does it.  This is sufficient:

C:\cygwinX\bin\run.exe --quote /usr/bin/bash.exe -l -c "cd; ls"

Is there a way to run startxwin without allowing bash to make a new home 
directory? Leaving off the "-l" does not create the home directory - it 
also does not start the X11 server.

This distribution is intended to work with putty's ssh, not the ssh in 
cygwin.  To get putty to work these changes were made to startxwin:

defaultserverargs=" -listen tcp"


eval xinit \"$client\" $clientargs -- \"$server\" $display $serverargs


#rotate the log files, keep 2 older ones
cp -f /var/log/xwin/XWin.0.log.1 /var/log/xwin/XWin.0.log.2
cp -f /var/log/xwin/XWin.0.log /var/log/xwin/XWin.0.log.1
(sleep 5; export DISPLAY=$defaultdisplay; xhost +localhost)&
eval xinit \"$client\" $clientargs -- \"$server\" $display $serverargs

I really don't like the cludgy way xhost is started.  However, it does 
work, or at least it works the "most of the time" when the X11 server 
starts within 5 seconds. Ideally it would be more like this:

(xinit \"$client\" $clientargs -- \"$server\" $display $serverargs)&
export DISPLAY=$defaultdisplay;
xhost +localhost

This doesn't work though.  The first line throws an error with that 
syntax, the part within the parens doesn't just use eval, it apparently 
requires it.  Anybody know the correct syntax for this variant?  xhost 
might fail because it starts before the X11 server is working, but I can 
deal with that once the background start is going.


David Mathog
Manager, Sequence Analysis Facility, Biology Division, Caltech

Unsubscribe info:
Problem reports:

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-13 13:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 23:32 new start method questions mathog
2016-06-10  0:55 ` mathog
2016-06-10  2:27   ` Marco Atzeri
2016-06-10 17:05   ` mathog
2016-06-13 13:07     ` Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).