immense / immense/Remotely

Evaluate user idle time indication and/or desktop thumbnail.

Open
#316 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
5.1k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I'm creating this based on user feedback in other discussions.

Users would like to have a way of determining if a user/workstation is idle without remoting in. Two suggestions proposed are showing a thumbnail of the desktop on the device card and showing an idle time.

With either method, the challenges are the same. Currently, Remotely only has one persistent process (the service) that runs in session 0. Services running in session 0 aren't able to interact with the desktop, take screenshots, or call things like [GetLastInputInfo](https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getlastinputinfo).

The process that captures the screen and simulates input is launched on demand, and it gets launched in the user's specific session. But it is short-lived, by design, and closes after it's no longer being used.

We could add a "startup mode" to the desktop client, capture a single screenshot or idle value, and return. But I would rather not bloat the desktop client's command line options any further. And it has a large start-up time for such a small task.

I would rather create a smaller utility app that runs persistently in the user's session. This app could later be responsible for things like showing a tray icon or displaying a pop-up notification on demand. First, I would want to create a more robust, re-usable IPC mechanism using named pipes for processes to communicate with each other. The chat feature is already doing this, but it's not re-usable or scalable. I recently created such an IPC library at work, but it's closed-source, so I'd have to start from scratch. But at least I know my design works.

Hmm. Another thought I just had is make the desktop client persistent.

Anyway, the other issue here is, on Windows Server, there can be multiple active RDP sessions as well as the console. Which session should be evaluated? Should I follow the same logic as with launching the desktop client for an unattended session? (That is, for standard consumer editions of Windows, it will look for an RDP session. If there is one, it launches there. Otherwise, it goes to the console. For Windows Server, it defaults to the console, and you can switch to a specific session in the sidebar.)

So here's what I think would need to be considered and implemented:
- Create new IPC library
- Create new persistent process or make desktop client persistent?
- If desktop client, thoroughly check for memory leaks and potential re-initialization failures with WebRTC (it can be finnicky)
- Grab thumbnail, check idle time, or both?
- Potential privacy issues with thumbnail? Add option in Server Config to disable it?
- What logic to use for determining which session to target? Does UI/UX need to change to support it?
- How to check idle time on non-Windows OSes?

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by reviewing the persistent desktop-client proposal, the existing chat IPC implementation, and the Server Config and sidebar behavior described in the issue. Done would require a decided approach covering IPC, session selection, idle time or thumbnails, privacy controls, and non-Windows behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, desktop, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.