summaryrefslogtreecommitdiffstats
path: root/src/windows
Commit message (Collapse)AuthorAgeFilesLines
* src: add support for direct command executionv1.3.2-25Alejandro Sirgo Rica2 days1-14/+21
| | | | | | | | | | | | | | | | Update live shell run mode for the new REST API interface. Evaluate the "inline" field to diferentiate between execution of script in /opt/opengnsys/shell/ and a cmd execution. Remove usage of echo argument of the API REST. Update Windows and Linux mode for direct command execution. Set OutputEncoding environment variable to 'utf-8' in Windows to unify the encoding of stdout for the invoked programs. Decode stdout to utf-8-sig to remove potential BOM. While at this, remove strange legacy ;|\n\r terminator.
* src: add user session detection implementationAlejandro Sirgo Rica3 days1-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | Detect user login and logout for Linux and Windows. Report an active interactive session through the /refresh response so a new ogserver instance can update the session status. Poll the session change in 5 second intervals in a thread. Use the same event socket previously used by the old session detection mechanism to notify a session change. Use the method check_interactive_session_change in each ogOperations.py to report the session status. Return values: None: no session changes are found True: login False: logout Windows Verify if psutil.users() has any value. Linux Verify all the psutil.users() asociated to a terminal.
* windows: bind the systray process lifetime to ogClientAlejandro Sirgo Rica3 days1-1/+1
| | | | | Add daemon=True to the systray process in order to make it close when the ogClient process closes.
* windows: make the systray reference local to OgWindowsOperationsAlejandro Sirgo Rica3 days1-6/+4
|
* windows: use a better systray default iconAlejandro Sirgo Rica3 days1-10/+13
| | | | | Draw a blue circle as default icon in the systray. Use the same blue color as the one shown in ogCP for an ogClient Windows instance.
* src: update functions for every ogClient modeAlejandro Sirgo Rica3 days1-2/+5
| | | | | Add missing ogClient mode functions and show an error in every unimplemented function.
* live: remove unused probeOpenGnSys Support Team2024-09-301-3/+0
| | | | unused since ogserver's commit 87be2ce08 #980 Change initial probe to refresh
* src: log without backtrace in not implemented functionsAlejandro Sirgo Rica2024-08-091-8/+9
| | | | | | Don't log a backtrace when a not implemented function is called in ogClient. Log a "Function not implemented" message.
* src: add POST cache/fetch methodAlejandro Sirgo Rica2024-08-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | Add API REST method to fetch an image. Consolidate image fetch loging for cache/fetch and image/restore. Resquest payload structure: { 'image': 'linux.img' 'type': 'TIPTORRENT' 'repository': '12.141.10.2' } The client will try to fetch'image' from 'repository' into cache. Resquest response structure: { 'cache': [ {'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'}, {'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'} ] }
* rest: add cmd field to POST /shell/runOpenGnSys Support Team2024-06-211-1/+1
| | | | | echo command that has been run for storage in ogserver, until GET /shell/output is invoked.
* rest: add retcode field to POST /shell/runOpenGnSys Support Team2024-06-211-1/+1
| | | | | | | | provide return code as result to ogserver. Update virtual mode driver to return dummy value, although this command is unimplemented, this seems to be broken due to possible TypeError when accessing result from caller.
* src: add POST cache/delete methodAlejandro Sirgo Rica2024-05-301-0/+3
| | | | | | | | | | | | | | | | | | | | Add API REST method to delete cache contents. Resquest payload structure: { 'images': ['windows.img', 'linux.img'] } The client will try to delete as many images in cache as available with names matching the list of filenames in the 'images' field. Resquest response structure: { 'cache': [ {'name': 'windows.img', 'size': 2432370213, checksum: '5d4dcc677bc19f40a647d0002f4ade90'}, {'name': 'linux.img', 'size': 243234534213, checksum: '3eb22f888f88a55ad954f55644e1192e'} ] }
* #1065 windows: use shutdown for poweroff and reboot operationsJose M. Guisado2021-12-101-8/+2
| | | | | | | | | | | Running ogClient as a service (non interactive user) breaks poweroff and reboot using ExitWindowsEx function in user32.dll. Spawn a subshell using os.system and use the 'shutdown' command instead. This is a terminating command, we don't need fine grain from subprocess module.
* #1065 Support pyinstaller for WindowsJose M. Guisado2021-11-221-1/+2
| | | | | | | | | Add required function call before running any process with multiprocessing. This is required for windows executables to work properly when using pyinstaller. See: https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing
* #1065 windows: add poweroff and rebootJose M. Guisado2021-11-191-0/+9
| | | | | | Uses ExitWindowsEx from user32.dll. Library is loaded using ctypes. See https://stackoverflow.com/a/50824776
* #1065 Add windows modeJose M. Guisado2021-11-182-0/+114
Add agent mode for windows platform. Subprocess module for shell/run is cross-platform an no change was needed. The subprocess will run with the same privilege as its parent, ogclient. TODO: Provide a windows installer. As of now, an administrator needs to install python and required libraries for this mode to be usable.