public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Automatic X server startup
@ 2014-05-27 12:52 Pavel Fedin
  2014-05-27 13:38 ` Eliot Moss
  2014-05-27 15:20 ` Jon TURNEY
  0 siblings, 2 replies; 6+ messages in thread
From: Pavel Fedin @ 2014-05-27 12:52 UTC (permalink / raw)
  To: cygwin-xfree

 Hello!

 Recently i have started using Insight (https://sourceware.org/insight/)
under Cygwin/X. Everything is quite good except one thing.
 I remember once upon a time i worked on MacOS X. There, X server starts up
automatically if there is some program requesting it. On Cygwin i still have
to run it by hands. Is is possible to set up autostart of the X server ? May
be i just don't know how to do it ?

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



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


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

* Re: Automatic X server startup
  2014-05-27 12:52 Automatic X server startup Pavel Fedin
@ 2014-05-27 13:38 ` Eliot Moss
  2014-05-27 15:20 ` Jon TURNEY
  1 sibling, 0 replies; 6+ messages in thread
From: Eliot Moss @ 2014-05-27 13:38 UTC (permalink / raw)
  To: cygwin-xfree

On 5/27/2014 8:52 AM, Pavel Fedin wrote:
>   Hello!
>
>   Recently i have started using Insight (https://sourceware.org/insight/)
> under Cygwin/X. Everything is quite good except one thing.
>   I remember once upon a time i worked on MacOS X. There, X server starts up
> automatically if there is some program requesting it. On Cygwin i still have
> to run it by hands. Is is possible to set up autostart of the X server ? May
> be i just don't know how to do it ?

I use the xlaunch program and have it set to start when I log in.
It can start programs for you, if you want anything started from
the beginning, but you can have it run no programs and simply wait
for any X programs to come along.

If you run xlaunch with no arguments it pops up a short interactive
GUI for setting up the configuration.  And of course "man xlaunch"
will tell you more.

Best wishes -- Eliot Moss

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


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

* Re: Automatic X server startup
  2014-05-27 12:52 Automatic X server startup Pavel Fedin
  2014-05-27 13:38 ` Eliot Moss
@ 2014-05-27 15:20 ` Jon TURNEY
  2014-05-28 12:57   ` Pavel Fedin
  1 sibling, 1 reply; 6+ messages in thread
From: Jon TURNEY @ 2014-05-27 15:20 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: p.fedin

On 27/05/2014 13:52, Pavel Fedin wrote:
>   Recently i have started using Insight (https://sourceware.org/insight/)
> under Cygwin/X. Everything is quite good except one thing.
>   I remember once upon a time i worked on MacOS X. There, X server starts up
> automatically if there is some program requesting it. On Cygwin i still have
> to run it by hands. Is is possible to set up autostart of the X server ? May
> be i just don't know how to do it ?

I believe this is arranged using launchd on OS X, which listens on the 
socket the X server will use, and starts the X server when something 
connects.

Unfortunately, there is no similar system facility on Windows.

You can achieve a somewhat similar effect by copying the X server 
shortcut to the startup group to start it automatically at login, at the 
cost of slowing down system startup somewhat.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

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


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

* RE: Automatic X server startup
  2014-05-27 15:20 ` Jon TURNEY
@ 2014-05-28 12:57   ` Pavel Fedin
  2014-06-02 13:57     ` Jon TURNEY
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Fedin @ 2014-05-28 12:57 UTC (permalink / raw)
  To: cygwin-xfree

 Hello!

> I believe this is arranged using launchd on OS X, which listens on the
> socket the X server will use, and starts the X server when something
> connects.
> 
> Unfortunately, there is no similar system facility on Windows.

 But it should be possible to make xlib a little bit more smart, isn't it ? It could automatically run X server when a connection is attempted but refused. So we would achieve the same effect as on MacOS.
 We could e. g. have some directory like /etc/X11/autostart, to be examined by xlib. If it detects that e. g. :0 screen is not accessible, it would attempt to look up 0.xlaunch file there and run "xlaunch -run /etc/X11/autostart/0.xlaunch" command.
 What do you think ? I could implement this idea if you have no time to work on that, i believe it should be very easy.

> You can achieve a somewhat similar effect by copying the X server
> shortcut to the startup group to start it automatically at login, at
> the cost of slowing down system startup somewhat.

 Heh, it's already slow because of antivirus and other corporate stuff (i cannot disable it). Running on demand would be better.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



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


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

* Re: Automatic X server startup
  2014-05-28 12:57   ` Pavel Fedin
@ 2014-06-02 13:57     ` Jon TURNEY
  2014-07-03 22:54       ` Matt D.
  0 siblings, 1 reply; 6+ messages in thread
From: Jon TURNEY @ 2014-06-02 13:57 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: p.fedin

On 28/05/2014 13:57, Pavel Fedin wrote:
>> I believe this is arranged using launchd on OS X, which listens on the
>> socket the X server will use, and starts the X server when something
>> connects.
>>
>> Unfortunately, there is no similar system facility on Windows.
>
>   But it should be possible to make xlib a little bit more smart, isn't it ? It could automatically run X server when a connection is attempted but refused. So we would achieve the same effect as on MacOS.
>   We could e. g. have some directory like /etc/X11/autostart, to be examined by xlib. If it detects that e. g. :0 screen is not accessible, it would attempt to look up 0.xlaunch file there and run "xlaunch -run /etc/X11/autostart/0.xlaunch" command.
>   What do you think ? I could implement this idea if you have no time to work on that, i believe it should be very easy.

Patches are always welcome, so please feel free to work on this if you like.

I have my doubts that that it's straightforward to add this in libX11 in 
a way that is generally useful (for e.g.: there would be a race 
condition if two processes both try to start the server at the same 
time, there's much room for confusion about how to specify the X server 
options to be used, if it could be started explicitly for the start 
menu, or implicitly by libX11,...)

>> You can achieve a somewhat similar effect by copying the X server
>> shortcut to the startup group to start it automatically at login, at
>> the cost of slowing down system startup somewhat.
>
>   Heh, it's already slow because of antivirus and other corporate stuff (i cannot disable it). Running on demand would be better.

You might consider looking at starting it from launchd or perhaps xinitd 
if possible, and then just that can be started by the X server shortcut, 
or at startup.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

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


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

* Re: Automatic X server startup
  2014-06-02 13:57     ` Jon TURNEY
@ 2014-07-03 22:54       ` Matt D.
  0 siblings, 0 replies; 6+ messages in thread
From: Matt D. @ 2014-07-03 22:54 UTC (permalink / raw)
  To: cygwin-xfree

I know this thread is a bit old now but I just wanted to mention my 
solution. I've added X to start in a separate "screen" in my 
.bash_profile. That way every time I log into Cygwin, X is always available.

It's kind of like the previous suggestion of adding it to Windows 
startup, but I have it more closely coupled to Cygwin.


Matt D.

On 6/2/2014 9:57 AM, Jon TURNEY wrote:
> On 28/05/2014 13:57, Pavel Fedin wrote:
>>> I believe this is arranged using launchd on OS X, which listens on the
>>> socket the X server will use, and starts the X server when something
>>> connects.
>>>
>>> Unfortunately, there is no similar system facility on Windows.
>>
>>   But it should be possible to make xlib a little bit more smart,
>> isn't it ? It could automatically run X server when a connection is
>> attempted but refused. So we would achieve the same effect as on MacOS.
>>   We could e. g. have some directory like /etc/X11/autostart, to be
>> examined by xlib. If it detects that e. g. :0 screen is not
>> accessible, it would attempt to look up 0.xlaunch file there and run
>> "xlaunch -run /etc/X11/autostart/0.xlaunch" command.
>>   What do you think ? I could implement this idea if you have no time
>> to work on that, i believe it should be very easy.
>
> Patches are always welcome, so please feel free to work on this if you
> like.
>
> I have my doubts that that it's straightforward to add this in libX11 in
> a way that is generally useful (for e.g.: there would be a race
> condition if two processes both try to start the server at the same
> time, there's much room for confusion about how to specify the X server
> options to be used, if it could be started explicitly for the start
> menu, or implicitly by libX11,...)
>
>>> You can achieve a somewhat similar effect by copying the X server
>>> shortcut to the startup group to start it automatically at login, at
>>> the cost of slowing down system startup somewhat.
>>
>>   Heh, it's already slow because of antivirus and other corporate
>> stuff (i cannot disable it). Running on demand would be better.
>
> You might consider looking at starting it from launchd or perhaps xinitd
> if possible, and then just that can be started by the X server shortcut,
> or at startup.
>

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


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

end of thread, other threads:[~2014-07-03 22:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27 12:52 Automatic X server startup Pavel Fedin
2014-05-27 13:38 ` Eliot Moss
2014-05-27 15:20 ` Jon TURNEY
2014-05-28 12:57   ` Pavel Fedin
2014-06-02 13:57     ` Jon TURNEY
2014-07-03 22:54       ` Matt D.

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