mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 13:36:03 +03:00
[GH-ISSUE #662] 希望增强断开远程桌面的时候,不关闭远程UI的功能。 #541
Labels
No labels
area-configuration
area-ct-app
area-ct-rdp
area-ct-remoteapp
area-ct-ssh
area-ct-vnc
area-launcher
area-list
area-tags
area-teamwork
bug
chore
dependencies
general-build/ci
general-performance
general-refactor
general-security
general-supportive
general-ux
meta-documentation
meta-enhancement
meta-enhancement
meta-feature
meta-help-wanted
meta-unknown-error
priority-hi
priority-low
pull-request
question
resolution-duplicate
resolution-invalid
resolution-wontfix
stale
task-put-off
task-still-considering
task-working-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/1Remote#541
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @skyformat99 on GitHub (May 13, 2024).
Original GitHub issue: https://github.com/1Remote/1Remote/issues/662
Originally assigned to: @VShawn on GitHub.
自动化测试的时候,会使用各种python脚本操作鼠标,键盘等等,进行测试工作;
一般会通过rdp登录远程服务器,在服务器上运行 python脚本测试。
这个时候,如果直接断开 1remote,则远端的python脚本不会正确执行了。
原因就是:
https://learn.microsoft.com/zh-cn/azure/devops/pipelines/test/ui-testing-considerations?view=azure-devops&tabs=mstest
如果使用远程桌面访问以自动登录方式运行代理的计算机,则直接断开连接远程桌面会导致计算机锁定,并且在此代理上运行的任何 UI 测试都可能会失败。 为避免故障,请在远程计算机上使用 tscon 命令从远程桌面断开连接。
或者,若要自动查找当前会话 ID,请创建一个包含以下代码的批处理文件:
batch
复制
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)
也可以参考这个方法:
https://blog.csdn.net/qq_51038274/article/details/122223669
总之,希望作者可以集成这个功能,断开的时候,仍然让服务器可以正常执行UI相关的python脚本等功能。
@VShawn commented on GitHub (May 18, 2024):
这种使用场景,是不是用VNC会比较好? VNC 断开后不会锁定UI。
没必要为了特例需求在RDP上实现这种workaround.
@skyformat99 commented on GitHub (May 20, 2024):
不是吧,这个需求非常普遍啊。
大家远程不得需要干活么? 干活搞自动测试很多啊。。。。
@skyformat99 commented on GitHub (May 20, 2024):
不是吧,这个需求非常普遍啊。
大家远程不得需要干活么? 干活搞自动测试很多啊。。。。
@VShawn commented on GitHub (May 20, 2024):
我见到的自动测试,不是用RDP的,而是用一种群控工具,所有虚拟机的鼠标键盘全部同步,本地脚本控制鼠标移动点击一次等于所有虚拟机都点击了一次。还有自动分析工具,自动截图,聚类分析所有虚拟机的UI截图,高亮标记显示效果离群的,加入报警日志保留。
真没听说哪家用远程桌面来做UI测试的。
@skyformat99 commented on GitHub (May 20, 2024):
做个选项也行吧?
有的人需要这个,有的人不需要这个
有用就行
@VShawn commented on GitHub (May 20, 2024):
首先这个功能看上去就没几个人需要(至少项目启动4年了,你是第一个提的)
其次
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)
这个代码看上去会把所有 mstsc 都关闭,无法控制单独关闭某一个。
@skyformat99 commented on GitHub (May 21, 2024):
这个是在目标机器上运行的,把目标机器上的各远程关闭。
不会关闭本软件。
作为选项,总归有用。要不然微软也不会特别发文章提这个方法。
或者你告诉我怎么改,在哪个代码里面改,
@VShawn commented on GitHub (May 22, 2024):
可能是我对这个使用场景实在不太理解吧。
如果你想自己加的话,可以在这里改,把 colse 改成运行脚本就行了。
https://github.com/1Remote/1Remote/blob/main/Ui/Service/SessionControlService.cs#L322-L346