New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run as Windows Service #17
Comments
This is actually a regression in the current |
Furthermore about "run as a windows service": I'd prefer this to require as few permissions as possible, to allow this to be run on corp computers where the user does not necessarily have admin rights. I don't think there's a great value in this, comparing to just dropping the exe into the startup folder and forget about it. |
I have such corp computers, so fully agree as long as no window is shown 👍 |
@haimgel I don't know if you want to re-open this issue, but after using display-switch for a while there is one niggling issue I have, which is related to it running as a console app. Because display-switch runs as a console app in a user session, you have to login once to the computer before it will switch automatically. This is because before you login, display-switch doesn't start. If instead it ran as a Windows service, it would start when the computer booted. |
Yeah, this is a valid concern. As long as this "service mode" is optional, it could be a useful thing to have. I won't have time for this right now, but I'll keep the ticket open. |
A third party solution to this could be to use https://github.com/winsw/winsw as a service wrapper. I've used this for years (in a different context) and it works great! |
@oddbjornkvalsund I tried this just the other day, but unfortunately it doesn't seem to work. When running as a service, I can see from the logs that display-switch does detect the USB changes, but it logs this with regards to displays:
I tried even running the service as |
@cocowalla Ah, I haven't tried using |
The problem could be that by default windows services are not allowed to access the desktop. You need to enable that explicitly in the service control panel. Maybe some API calls fail because of that. You could try it out. Not sure if this is the solution |
Firstly, thanks for this - it works great with my cheap USB switch!
Similarly to #5, I don't want to have
display-switch.exe
visible in the task bar all the time, taking up space. I understand you prefer not to clutter the tray bar (altho IMO that would be preferable to cluttering the task bar 😄) - could display-switch run as a Windows Service instead?I know absolutely nothing about DDC/CI, so I don't know if perhaps display-switch needs access to the desktop session, or if there might be other barriers.
The text was updated successfully, but these errors were encountered: