Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Windows Terminal Services via VNC (instead of RDP/ICA)

Any features you would like to see in UltraVNC? Propose it here
Post Reply
The1stImmortal
Posts: 6
Joined: 2008-08-08 14:00

Windows Terminal Services via VNC (instead of RDP/ICA)

Post by The1stImmortal »

Hi all,

I've been doing some research into the architecture of Windows Terminal Services lately and it strikes me that it would be entirely possible to develop a pack of drivers and services to present a Windows Terminal Server via the VNC protocol instead of/as well as the RDP (native windows remote desktop protocol) or ICA (god knows what it actually stands for but the citrix protocol).

Essentially, this would mean you could connect to any terminal services-enabled system, login using the graphical prompt, and get your own desktop, which if disconnected from you could reconnect to exactly as it was at any time. It would decouple the user numbers from enforced TS-Client Access licensing since VNC has no inherent support for licensing (and forcing it on the protocol would defeat the purpose). Not that I'm endorsing exceeding licensed limits on clients of course :)
Using UVNC specifically as a starting codebase would also ensure later availability of direct login credentials (Winlogon), encryption on the wire, and file transfer.

Should the VNC protocol implementation ever exceed any aspect of RDP in functionality, you'd also avoid the requirement to go to a much more expensive product (eg, Citrix) with yet another layer of client licensing on top.

This would NOT enable multiple-desktop functionality on non-TS systems (ie, 2000/XP/Vista) - it relies on the terminal services components to function (TS has to do all the desktop setup stuff - it's a deep-seated part of windows). Under XP Pro/Vista Bus/Ultimate it would basically do exactly the same as RDPing to it does now, just with VNC as the protocol and client.

So... Brainstorming...


The structure of WTS is as follows:


====WINDOWS COMPONENTS===
(stuff that's provided by windows and we needn't reinvent)

Terminal Server service (windows component)
- Acts as listener on TCP port, does associations of sessions to users

Session Manager (windows component)
- does setup/teardown of desktop login sessions, reconnects new connections to existing, disconnected sessions

CSRSS (windows component)
- manages the login session from windows' point of view (fires off the login process, starts the desktop, etc



===VENDOR/PROTOCOL-SPECIFIC COMPONENTS===
(Stuff we need to write)

Winstation Driver
- Does session setup/negotiation, and "de-multiplexes" the session once setup into Video, Keyboard and Mouse channels (and any other channels in the protocol, eg clipboard, file transfer)

Video Driver
- Presents to the terminal services session as an ordinary video device, but processes and hands off video data to be encapsulated into the protocol (VNC in our case) and sent to the client

Input Driver(s)
- Presents to the terminal services session as ordinary keyboard/mouse devices, but actually receives input from the protocol connection (VNC in our case) via the Winstation Driver



Tentative Roadmap
----------------------

A simple NT-Kernel-mode VNC mux/demuxer would need to be written to form the basis/template for a Winstation driver. Perhaps for testing purposes reading 'screen' data from a file, dumping 'input' to a logfile and connecting via named pipes or something.

The UltraVNC Mirror driver would need to be extended into a full video driver, outputting both into a framebuffer (for screen refreshes) and handing off application updates "upstream" (towards the client). Much like normal really. Alternatively, the framebuffer can be dropped with the disadvantage that full screen refreshes require a redraw message to all session apps (slower but less memory). This can be tested in a normal desktop environment. Where possible it should be kept in sync with the existing UVNC driver.

A simple shim combined keyboard/mouse driver would need to be written to receive input events from the client and pass them on as keyboard/mouse events to the session. This can be tested in a normal desktop environment, and might be worthy of passing back upstream to UVNC as an input optimization.

The big step is this:
Either,
porting the WINVNC service to NT-Kernel-mode, or,
reimplementing UVNC's WINVNC service in NT-Kernel-mode
to serve as the Winstation driver.

After this, there should be a working (if barebones) VNC alternative to RDP and ICA as a WTS connection protocol.


Anyway. Let me know what you all think :)

[mod=494,1225495434]moved from vnc related to feature request[/mod]
Last edited by The1stImmortal on 2008-10-31 23:23, edited 1 time in total.
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: Windows Terminal Services via VNC (instead of RDP/ICA)

Post by JDaus »

i wondered why nobody had thought of this myself, and would be more than willing to offer my limited assistance.

I'm not a programmer, but do understand various sides of windows that may be of benefit, plus i'm good at the conceptual side of things.

this would work in nicely with the vnc2me line of (open source) products that i'm planning (well have ideas for, but will see whether they eventuate or not).

keep me in the loop (check your PM's for my email address)
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
The1stImmortal
Posts: 6
Joined: 2008-08-08 14:00

Re: Windows Terminal Services via VNC (instead of RDP/ICA)

Post by The1stImmortal »

Just FYI, I wrote the above at about 4am and it may not make much sense in parts :)

At this point I'm hoping to just bounce the concept around a bit and find ppl with more experience with TS or better implementation ideas :)

So far as I can tell, the TS protocol API is pretty much totally undocumented so I may have to pick the brains of some WINE/ReactOS guys I know too :)

I'm *strongly* attracted to UVNC as a base for all this, not necessarily for the codebase per se, but rather the protocol extensions and strong windows-orientation (ie UVNC on-the-wire). Ideally, this would all end up being implemented (at the bottom level) as modules of and alternate build options for UVNC.

I'm having a look at vnc2me now :) Ta for the pointer :)
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: Windows Terminal Services via VNC (instead of RDP/ICA)

Post by JDaus »

vnc2me is my pet project, but i have been playing with SSH tunneling for some time, and the idea i have is to get more application using SSH tunneling, thus allowing cross compatibility.

i just found an awesome open-source viewer application that uses flash (called flashlight-vnc) as its medium. most people have flash installed on their computers (including mac and linux users), allowing for easy viewing of collaboration screens.

(sorry the above is a little off-topic)
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Re: Windows Terminal Services via VNC (instead of RDP/ICA)

Post by redge »

exist as xrdp but for linux
need porting the code for windows.
http://xrdp.sourceforge.net/


there exist a alpha test of the code for windows
http://sc.uvnc.com/V2/winvnc+rdp.zip
source code on request to Rudi if available ?

[topic=269][/topic]
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
User avatar
JDaus
Friend of UVNC
Friend of UVNC
Posts: 537
Joined: 2007-03-17 11:00
Location: Sydney, Australia
Contact:

Re: Windows Terminal Services via VNC (instead of RDP/ICA)

Post by JDaus »

Awesome thanks redge ... will try it out when i get some time thanks ...
ask a silly question and remain a fool for 5 minutes...
don't ask, and remain a fool for life - JDaus 2003

without imperfections, neither you nor i would exist - Steven Hawkins
__
JD
SCPrompt - OpenSource Free Remote Screen\Desktop Sharing Solution
SecureTech.com.au
Post Reply