public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* possible to run XWin as windows service?
@ 2012-07-26 22:33 Paul Maier
  2012-07-26 22:46 ` Matt Seitz (matseitz)
  2012-07-27 12:19 ` Jon TURNEY
  0 siblings, 2 replies; 9+ messages in thread
From: Paul Maier @ 2012-07-26 22:33 UTC (permalink / raw)
  To: cygwin-xfree

Hi,

I would like to start XWin automatically on Windows startup (Windows user login).
I couldn't find any hint in the manual.

Is it possible to run (and automatically start) XWin as windows service?
I tried these attempts, but they don't work:

sc create testabc1 binpath= "D:\Programme\cygwin\bin\startxwin.exe -- /bin/XWin -clipboard -emulate3buttons 100 -nounixkill
-nowinkill -xkboptions nbsp:level3" displayname= "testabc1" start= demand

sc create testabc2 binpath= "D:\Programme\cygwin\bin\XWin.exe -clipboard -emulate3buttons 100 -nounixkill -nowinkill -xkboptions
nbsp:level3" displayname= "testabc2" start= demand


... they all come with the same error message on startup:

sc start testabc2
[SC] StartService FEHLER 1053:
Der Dienst antwortete nicht rechtzeitig auf die Start- oder Steuerungsanforderung.


Thank you very much for ideas!

Regards,
  Paul



--
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] 9+ messages in thread

* RE: possible to run XWin as windows service?
  2012-07-26 22:33 possible to run XWin as windows service? Paul Maier
@ 2012-07-26 22:46 ` Matt Seitz (matseitz)
  2012-07-27 12:19 ` Jon TURNEY
  1 sibling, 0 replies; 9+ messages in thread
From: Matt Seitz (matseitz) @ 2012-07-26 22:46 UTC (permalink / raw)
  To: Paul Maier, cygwin-xfree

> From: Paul Maier 
> I would like to start XWin automatically on Windows startup (Windows user
> login).
> I couldn't find any hint in the manual. 


How about just adding the "XWin Server" shortcut to the "Startup" program group?


--
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] 9+ messages in thread

* Re: possible to run XWin as windows service?
  2012-07-26 22:33 possible to run XWin as windows service? Paul Maier
  2012-07-26 22:46 ` Matt Seitz (matseitz)
@ 2012-07-27 12:19 ` Jon TURNEY
  2012-07-28 12:18   ` AW: " Paul Maier
  1 sibling, 1 reply; 9+ messages in thread
From: Jon TURNEY @ 2012-07-27 12:19 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: Paul Maier

On 26/07/2012 23:30, Paul Maier wrote:
> I would like to start XWin automatically on Windows startup (Windows user login).
> I couldn't find any hint in the manual.
> 
> Is it possible to run (and automatically start) XWin as windows service?

Possible? Yes.

You can't run an arbitrary executable as a service, you need to use the cygwin
service wrapper cygrunsrv to make it respond to service control messages.

However, this is not the way to achieve what you want to do. Google "Allow
service to interact with desktop" to learn why...

Running it from the "Startup" program group is the correct approach.

-- 
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] 9+ messages in thread

* AW: possible to run XWin as windows service?
  2012-07-27 12:19 ` Jon TURNEY
@ 2012-07-28 12:18   ` Paul Maier
  2012-07-28 12:58     ` Eliot Moss
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Maier @ 2012-07-28 12:18 UTC (permalink / raw)
  To: 'cygwin-xfree'; +Cc: jon.turney


> > I would like to start XWin automatically on Windows startup (Windows user login).
> > I couldn't find any hint in the manual.
> >
> > Is it possible to run (and automatically start) XWin as windows service?
> 
> Possible? Yes.
> 
[...]
> 
> Running it from the "Startup" program group is the correct approach.
> 


Hi Jon,

running it from the Startup program group worked fine as long as my ~/.startxwinrc has been empty.

But I had to add the line
  /bin/ico -r -obj cube -sleep .05 &
to ~/.startxwinrc to fix http://cygwin.com/ml/cygwin-xfree/2012-07/msg00012.html

That workaround is perfect, but as a side effect, startxwin won't terminate any more; it blocks as long ico runs, and ico runs
forever,
so startxwin never terminates.
This results in an annoying task bar entry staying there all day.
This X Server task bar entry is (obviously) not being attached to any visible window or application, so this entry shouldn't exist
in the task bar.

Can you recommend me how to start the X Server without getting a task bar entry?

Thank you & regards,
  Paul



--
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] 9+ messages in thread

* Re: AW: possible to run XWin as windows service?
  2012-07-28 12:18   ` AW: " Paul Maier
@ 2012-07-28 12:58     ` Eliot Moss
  2012-07-28 13:10       ` AW: " Paul Maier
  2012-07-28 18:48       ` Eliot Moss
  0 siblings, 2 replies; 9+ messages in thread
From: Eliot Moss @ 2012-07-28 12:58 UTC (permalink / raw)
  To: cygwin-xfree

On 7/28/2012 8:15 AM, Paul Maier wrote:

> Can you recommend me how to start the X Server without getting a task bar entry?

The cygwin program run.exe is designed to do just that.
It's what I use for this purpose :-) ...

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] 9+ messages in thread

* AW: AW: possible to run XWin as windows service?
  2012-07-28 12:58     ` Eliot Moss
@ 2012-07-28 13:10       ` Paul Maier
  2012-07-28 18:53         ` Eliot Moss
  2012-08-06 13:07         ` Jon TURNEY
  2012-07-28 18:48       ` Eliot Moss
  1 sibling, 2 replies; 9+ messages in thread
From: Paul Maier @ 2012-07-28 13:10 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: moss


> 
> The cygwin program run.exe is designed to do just that.
> It's what I use for this purpose :-) ...
> 



Hi Eliot,

thank you for your input. 8-)

I was using run.exe too. run.exe used to hide the window and the task bar entry.
But since my upgrade from Cygwin 1.7.9 to 1.7.15, run.exe only hides the window but not the task bar entry, when invoked from the
Startup menu in some cases.

This seems buggy, see my thread: 
http://cygwin.com/ml/cygwin/2012-07/msg00473.html
But I don't have the impression that a developer accepted this as bug.

Do you have a suggestion how to avoid this situation?

Regards,
  Paul



--
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] 9+ messages in thread

* Re: AW: possible to run XWin as windows service?
  2012-07-28 12:58     ` Eliot Moss
  2012-07-28 13:10       ` AW: " Paul Maier
@ 2012-07-28 18:48       ` Eliot Moss
  1 sibling, 0 replies; 9+ messages in thread
From: Eliot Moss @ 2012-07-28 18:48 UTC (permalink / raw)
  To: cygwin-xfree

On 7/28/2012 8:57 AM, Eliot Moss wrote:
> On 7/28/2012 8:15 AM, Paul Maier wrote:
>
>> Can you recommend me how to start the X Server without getting a task bar entry?
>
> The cygwin program run.exe is designed to do just that.
> It's what I use for this purpose :-) ...

... and I just tried it in the Startup folder and it works fine.

Here is the "Target" of the shortcut:

C:\cygwin\bin\run.exe /usr/bin/xlaunch.exe -p /usr/bin -run ***cygwin-path-to***/config.xlaunch

I find the -p makes it easier to write the various files, since it allows cygwin
programs to be found.

The "Start in" is: C:\cygwin\bin

My cygwin installation is in C:\cygwin

Regards -- 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] 9+ messages in thread

* Re: AW: AW: possible to run XWin as windows service?
  2012-07-28 13:10       ` AW: " Paul Maier
@ 2012-07-28 18:53         ` Eliot Moss
  2012-08-06 13:07         ` Jon TURNEY
  1 sibling, 0 replies; 9+ messages in thread
From: Eliot Moss @ 2012-07-28 18:53 UTC (permalink / raw)
  Cc: cygwin-xfree

On 7/28/2012 9:08 AM, Paul Maier wrote:

>> The cygwin program run.exe is designed to do just that.
>> It's what I use for this purpose :-) ...

> I was using run.exe too. run.exe used to hide the window and the task bar entry.
> But since my upgrade from Cygwin 1.7.9 to 1.7.15, run.exe only hides the window but not the task bar entry, when invoked from the
> Startup menu in some cases.
>
> This seems buggy, see my thread:
> http://cygwin.com/ml/cygwin/2012-07/msg00473.html
> But I don't have the impression that a developer accepted this as bug.
>
> Do you have a suggestion how to avoid this situation?

I used to have difficulty like that with startxwin, but it does not
happen any more for me with xlaunch.  It did look like a race condition
or something ... Eliot

--
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] 9+ messages in thread

* Re: AW: AW: possible to run XWin as windows service?
  2012-07-28 13:10       ` AW: " Paul Maier
  2012-07-28 18:53         ` Eliot Moss
@ 2012-08-06 13:07         ` Jon TURNEY
  1 sibling, 0 replies; 9+ messages in thread
From: Jon TURNEY @ 2012-08-06 13:07 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: Paul Maier

On 28/07/2012 14:08, Paul Maier wrote:
>>
>> The cygwin program run.exe is designed to do just that.
>> It's what I use for this purpose :-) ...
>>
> 
> thank you for your input. 8-)
> 
> I was using run.exe too. run.exe used to hide the window and the task bar entry.
> But since my upgrade from Cygwin 1.7.9 to 1.7.15, run.exe only hides the window but not the task bar entry, when invoked from the
> Startup menu in some cases.
> 
> This seems buggy, see my thread: 
> http://cygwin.com/ml/cygwin/2012-07/msg00473.html
> But I don't have the impression that a developer accepted this as bug.
> 
> Do you have a suggestion how to avoid this situation?

You might try the patched run from [1] and see if that improves matters.

--
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] 9+ messages in thread

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

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-26 22:33 possible to run XWin as windows service? Paul Maier
2012-07-26 22:46 ` Matt Seitz (matseitz)
2012-07-27 12:19 ` Jon TURNEY
2012-07-28 12:18   ` AW: " Paul Maier
2012-07-28 12:58     ` Eliot Moss
2012-07-28 13:10       ` AW: " Paul Maier
2012-07-28 18:53         ` Eliot Moss
2012-08-06 13:07         ` Jon TURNEY
2012-07-28 18:48       ` Eliot Moss

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