Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running Cygwin on Windows XP. I want XWin to start as a Windows service. How can I configure this?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
    
Great idea with the "Startup" folder; something so obvious, but I never thought about it. –  Javid Jamae Oct 14 '11 at 19:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.