public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Mark Hansen <meh@winfirst.com>
To: cygwin-xfree@cygwin.com
Subject: Re: Launching Cygwin/X in background with no clients
Date: Tue, 03 Feb 2015 14:13:00 -0000	[thread overview]
Message-ID: <54D0D77E.3080303@winfirst.com> (raw)
In-Reply-To: <54D058B1.90507@jhmg.net>

On 2/2/2015 9:12 PM, Jim Garrison wrote:
> On 2/2/2015 5:21 PM, Yaakov Selkowitz wrote:
>>  On Mon, 2015-02-02 at 16:52 -0800, Jim Garrison wrote:
>>>  I updated Cygwin (which pulled in a bunch of Cygwin-X updates) and
>>>  now startxwin no longer works.  According to the log (below) it starts
>>>  the XServer successfully but then shuts down.
>>>
>>>  My .startxwinrc is an empty (zero-length) file to prevent automatic
>>>  launching of the default clients, which I don't need.
>>
>>  http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-startxwinrc-exit
>
> Thanks.
>
> I want to start an X server in the background, with no visible
> clients, if it's not already running, whenever I launch a mintty
> session. X should continue to run even if the mintty session that
> started it is closed.
>
> Currently I have the following in my .bash_profile
>
>     ps -ef|grep -q XWin || nohup setsid startxwin 2>startxwin.log&
>
> This now works again after adding "exec sleep infinity" in
> .startxwinrc, but I can't help feel my whole approach is a bad hack.
> Both nohup and setsid seem to be required. Without setsid the mintty
> will hang if I attempt to close it with exit or ^D, and without nohup
> the X server terminates whenever the first mintty session is closed.
>
> Is there a cleaner way to accomplish this objective?
>

Are you willing to have the X Server launch when you log into windows and just keep it
running? This is what I do and I find it very useful. I launch the X server when I log
in using a shortcut with the following target:

   C:\Apps\cygwin\bin\run.exe /usr/bin/bash.exe -l -c "/usr/bin/startxwin.exe -- -emulate3buttons 100 -multiwindow -clipboard 
-swcursor"

I then place this shortcut into the Startup folder of my Start menu.

I hope this helps.

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


      reply	other threads:[~2015-02-03 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03  0:53 startxwin failing after most recent updates Jim Garrison
2015-02-03  1:21 ` Yaakov Selkowitz
2015-02-03  5:12   ` Launching Cygwin/X in background with no clients Jim Garrison
2015-02-03 14:13     ` Mark Hansen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D0D77E.3080303@winfirst.com \
    --to=meh@winfirst.com \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).