-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
win32 system service #1527
Comments
Blocked by #1528. |
With the cx_freeze 5 workarounds added in #1528#comment:2 and the service stub added in r15933 +
Problem is that this fails with:
What log file you ask? Well "./.log" obviously, NOT. This file contains:
Fine, let's run it as administrator:
At least the service is registered and visible in the "Services" control tool, and the same error message is available in the "eventvwr". |
OK, the reason why this fails with the cryptic error 0x57 is because the path to the service binary is empty (for whatever reason).
The path can then be changed using regedit, or using Sc config.
Change the path:
We can now also set it to auto-start:
With these changes, starting the service takes longer to fail.. but fail it does with: Error 1053: The service did not respond to the start or control request in a timely fashion
Then kill it with:
We could workaround the broken path installation by running the "sc config" commands after the service registration, still as part of the EXE / MSI But the fact that the process does not respond is more problematic...
|
Difficulties in building the Complete Service Example with mingw:
|
2017-05-24 17:31:26: antoine uploaded file
|
Stub cx_freeze5 service removed in r15960 (#1528 re-scheduled), replaced in r15962 by a shim implemented in C. Still TODO:
Notes:
|
2017-05-25 15:21:27: antoine uploaded file
|
2017-05-26 12:30:43: antoine uploaded file
|
The ugly and incomplete patch above does:
And adds a small Some useful links:
|
2017-05-27 10:12:19: antoine uploaded file
|
With the patch above, I could logon but when trying to start the server, or even a test application like
The environment looked suspicious, but since we use the |
r15980 adds all the hooks for starting the shadow process from the service.
|
2017-05-28 07:15:54: antoine uploaded file
|
See #389 comment 23 for |
See Another Windows 10 SKU is on its way, this time for remote desktops: With the new SKU, the multi-session capability is now a part of desktop Windows |
See also: python-win32: runas analog: Starting a subprocess in Windows is somewhat of a black art, I fear. |
Fixes and updates:
The service somehow fails to find the glib typelib. |
The gi bindings error is an unrelated packaging blocker bug: #2393. |
aUpdates:
Some related pointers:
|
aUpdates:
The shadow we start creates a named-pipe, but the proxy server running as "system" cannot connect to it.
|
Updates:
With these changes, the proxy manages to start a shadow subprocess, but it doesn't seem to reach a usable state. |
|
2019-09-01 12:32:06: @totaam uploaded file
|
We need to either shadow the console (so remote users can login from the login screen) or find a way to create a session programmatically. More pointers: |
Progress made using the openssh server (#2711): we can shadow the More pointers:
|
r25977 starts the shadow server on the To make more progress, it would be useful to:
As for the change of desktop, that's going to be harder. |
r25980: we can now easily start new commands when connected to a shadow server |
Maybe the blank display problems (comment:17 IIRC), can be fixed by using a Also: CreateProcessAsUser creates blank/black window: The call to LogonUser generates a new session (and associated logon SID) rather than reusing the existing one, so your process does not have access to the desktop, and only has minimal access to the window station |
r26188 uses paexec (as per #2711) to start the shadow server. Tested by reverting r25977 and then connecting to the proxy server using:
Progress! If the user is not already logged in, the shadow command will just fail:
So we need some other call to create the GUI session. No idea which one. Pointers: |
creating window station and windows desktop using c# Programmatically create and launch and RDP session (without gui) All of those solutions use windows forms (GUI based), Creating a Remote Desktop Client Application without using Windows Forms (C#), How to use ActiveX component in ClassLibrary without Winforms. To compile any of those C# based solutions, we need the To logoff once we're done: WTSLogoffSession function Eventually, I would like to compile this DLL from the command line (Command-line build with csc.exe), as part of the build process. |
Next difficulty: calling this dotnet code from the python server without using pythonnet since that's not supported under mingw. Options:
|
Updates in r26196 + r26197 including the VS project to create the The server log files can be located using |
2020-05-01 15:49:42: @totaam uploaded file
|
With the patch above, the proxy tries to run:
When trying this command from an ssh session, paexec now fails (used to work?!):
Then I also got |
2020-05-02 06:53:59: @totaam uploaded file
|
Sort of working after:
TODO:
Other APIs and projects which may still be useful:
|
Updates:
New weird bug: the service responds on boot (if auto-start is on), responds if started using the service manager when logged in, but it seems to die when a user logs out? (only if it had started a shadow server? even if that process is now gone.. maybe a So the New links:
|
This will have to do for this release, follow up in #2756. The proxy server does work and can start a shadow server for any user, but it is unable to create the station / desktop if one does not exist already.. |
Split from #389, similar to #1105 for Linux, we want to have a system wide service running even before the user logs in.
Users can then trigger a login.
Some links already added in #389 comment 23.
The text was updated successfully, but these errors were encountered: