0
I'm running Cygwin on Windows XP. I want XWin to start as a Windows service. How can I configure this?
0
I'm running Cygwin on Windows XP. I want XWin to start as a Windows service. How can I configure this?
2
You don't. Services are not supposed to have access to the1 user's desktop – this was actually removed in Vista – and without it, XWin is sort of useless.
Just put XWin in your "Startup" folder.
(1 I said "the", but Windows XP has "Fast User Switching" on by default. There may be multiple users logged in at the same time. Which session would XWin run on?)
[Now, I'm going to hate myself for this, but] you can run arbitrary programs as Windows services by using a Microsoft tool srvany
, as described in Microsoft's KB article "How To Create a User-Defined Service". Along with it comes instsrv
for easy installation. Do not forget to change the account your service runs on. Later, mark the service as "interactive" via sc config svcname type= interact
, or via the Services manager (services.msc
).
Great idea with the "Startup" folder; something so obvious, but I never thought about it. – Javid Jamae – 2011-10-14T19:02:00.207