Showing posts with label JSON. Show all posts
Showing posts with label JSON. Show all posts

ThinRDP Transforms Web Browsers into Virtual Desktops to Maximize Remote Computing Potential


ThinRDP leverages HTML5 Web browser technology to deliver virtual RDP access to Windows applications from any PC, Mac, Chromebook, iPad, iPhone, or Android tablets.

For Immediate Release

WILMINGTON, DE, August 2, 2011—Cybele Software, Inc. announces the release of ThinRDP Server for Microsoft® Remote Desktop Services, the premier software tool for high-performance, remote access to Windows applications. ThinRDP dramatically expands the possibilities of remote, virtual computing by converting any modern Web browser into a powerful Desktop Client capable of securely accessing Windows applications remotely. With ThinRDP, users can access all of their programs, documents, files, and network resources through their preferred device—PC, iPhone, iPad, Android tablet, Chromebook, or any other device that supports HTML5.

ThinRDP enables secure access to any PC on the corporate LAN through a single, public IP address. This includes access to applications and desktops running Microsoft RDS/ Terminal Services and RDS/VDI platforms, such as session-based applications and virtual desktops.

ThinRDP facilitates the complete spectrum of cross-browser, cross-platform access. With ThinRDP, users of Windows, Mac OS X, Linux, Android, and iOS can connect remotely into their Windows desktops through their favorite browser. ThinRDP supports Internet Explorer 9, Firefox, Chrome, Safari, and all other HTML5-capable Web browsers. Earlier versions of Internet Explorer may be enhanced with HTML5 features by the addition of the Google ChromeFrame plug-in.

ThinRDP is remarkably simple to set up. It does not require Flash, Java, ActiveX, Silverlight or any other setup on the end-user side. Through its exclusive use of standard Web technologies like Ajax, WebSockets, and JavaScript, ThinRDP provides pure Web access. Because no additional software is required, ThinRDP provides both a simplified implementation and optimal performance.

ThinRDP Architecture

The ThinRDP architecture is comprised of the ThinRDP Windows Server and the ThinRDP Web Client. The ThinRDP Windows Server is a secure, high-performance HTTP/WebSockets server which serves the Web pages needed to run the ThinRDP Web Client. The ThinRDP Windows Server also acts as a gateway between the ThinRDP Web Client and the remote RDP server.

When an end user accesses the ThinRDP main page and enters the appropriate connection parameters, the ThinRDP Web Client connects to the ThinRDP Windows Server using Ajax or WebSockets. After the connection is established, ThinRDP Windows Server interprets RDP commands, optimizes them for the Web, and sends the resulting data stream to the ThinRDP Web Client.

ThinRDP Highlights
  • Web RDP, HTML5 RDP
  • Enables access to applications and desktops running on Windows Terminal Services
  • Allows users to remotely connect to RDS/VDI platforms (i.e. virtual desktops or applications)
  • Allows companies to publish their Windows applications to the Web
  • Works with any HTML5-compliant Web browser
  • Supports PC, Mac, iPad, iPhone, Chromebook, and Android devices
  • Driven by a high-performance, firewall-friendly, HTTP/WebSockets server
  • Provides secure access through just one public IP address and port
  • Compatible with all 32-bit/64-bit versions editions of Windows XP and newer
  • Compatible with XRDP Server

ThinRDP Requirements
- ThinRDP Web RDP Client
  • OS-independent
  • HTML5 Web browser-compliant
  • Works from any PC, Mac, Chromebook, iPad, iPhone, or Android tablet.
- ThinRDP Windows Server
  • Windows XP 32-bit/Windows XP 64-bit
  • Windows Vista 32-bit/Windows Vista 64-bit
  • Windows 7 32-bit/Windows 7 64-bit
  • Windows Server 2008 32-bit/Windows Server 2008 64-bit

Free 30-Day Trial Available
You can explore the possibilities of ThinRDP Server for yourself by downloading a free, fully featured 30-day trial version. Go to the product page for full details.


Contact
For more information about ThinRDP Server, contact Cybele Software, Inc.
3422 Old Capitol Trail, Suite 1125, Wilmington, DE 19808 USA.
Phone: (302) 892-9625 or (866) 462-9768
Email: info@cybelesoft.com
Website: www.cybelesoft.com

Next-Generation ThinVNC Access Point Delivers Unique Web Access to LAN Computers through RDP Connections

Cybele Software, Inc. releases the new ThinVNC Access Point, providing remote users an HTML5 Remote Desktop access point to any PC via a secure HTTPS/Websockets connection

For Immediate Release

WILMINGTON, DE, May 31, 2011—Cybele Software, Inc. announces the release of ThinVNC Access Point, a leading edge software tool that provides a single entry point for Remote Desktop access to any PC in the corporate LAN using a secure, firewall-friendly connection.

With ThinVNC Access Point, users gain an expanded range of telecommunicating and remote communication options. The HTML5-to-RDP Gateway allows users with an Internet connection and an HTML5 Web Browser to access business computers through an intuitive Web user interface. ThinVNC Access Point elevates business communication to a whole new level by allowing users to share their full Windows Desktop, or a single application in it, while using their preferred tablet, laptop, or computer.

ThinVNC Access Point ensures that IT personnel retain control of security and access. After completing a credentialed log in, system administrators designate PC(s) in the LAN/WAN as accessible on a user-by-user basis. Users select the computer to access through a secure HTTPS address.

ThinVNC Access Point comes with a Remote Installation Tool that allows IT personnel easily complete installation. After installation, IT personnel can access the PC at all times through a Wake-on-LAN link. This feature streamlines routine maintenance tasks and ensures that emergency situations can be handled in an efficient and timely manner.

ThinVNC Access Point Highlights

  • Single access point for Remote Desktop access to any PC in the LAN
  • ThinVNC bridge extends ThinVNC to allow access through just one public IP address
  • HTML5-to-RDP gateway allows access to any Windows PC or RDP server from a HTML5-compliant web browser
  • Secure (HTTPS / WebSockets+SSL) firewall-friendly access point
  • Web user interface for users and PCs administration
  • Windows Login Support
  • Remote Installation Tool allows for easy ThinVNC setup on a remote PC
  • Wake-On-LAN (WOL) link enables administrators to remotely turn on any listed PCs

ThinVNC Access Point Requirements

- Server:
  • Any PC with Windows XP and higher

- LAN PC:
  • ThinVNC running on any PC with Wndows XP and higher
  • For RDP access, any Windows PC with Remote Desktop service configured
  • Any Linux running XRDP or any other RDP server

- Client:
  • Any PC or tablet with an HTML5-compliant Web browser (i.e. IE 9, Google Chrome, Firefox, Safari, Opera, etc.)

Contact

For more information about our WEB RDP solutions contact Cybele Software, Inc.
3422 Old Capitol Trail, Suite 1125, Wilmington, DE 19808 USA.
Phone: (302) 892-9625 or (866) 462-9768
Email: info@cybelesoft.com
Website: www.cybelesoft.com

Meet ThinVNC, The HTML5 Remote Desktop


ThinVNC brings pure-web Remote Desktop Access to a MS Windows PC from any OS, using any HTML5-compliant browser. ThinVNC is free for non-commercial use.

Wilmington, DE – Cybele Software, Inc. is pleased to announce the final release of ThinVNC 1.0, a software solution that allows users to remotely access a PC desktop using just a standard Web Browser. Regardless of the computer or mobile operating system, ThinVNC provides native, secure data transmission using HTTP and SSL.
ThinVNC works on any HTML5-compliant web browser and does not require any additional plugin, add-on or installation of any kind on the client side. ThinVNC exploits HTML5 canvas to display a remote PC desktop, taking full advantage of WebSockets, AJAX, JSON and HTML5 technologies. The implementation of techniques not available in traditional AT&T RFB protocol impart ThinVNC a remarkable performance, rivaling with any traditional VNC.
ThinVNC is composed by a server-side executable program and an HTML5 JavaScript client. The web client connects to ThinVNC server using AJAX and WebSockets (when available) over SSL and displays the remote PC desktop, enabling full remote mouse and keyboard control.
ThinVNC also includes a Presentation Manager to organize demonstrations, meetings or trainings on the host computer. Running on the web browser, ThinVNC removes the need of a “viewer” download, making non-tech people attendance a smooth experience, free of any setup issue.
On corporate environments, ThinVNC can be setup as a gateway to proxy other ThinVNC instances. While publishing just one IP, users can remotely gain access to PC desktops across the LAN just by entering the internal IP address/PC name on the welcome screen.

ThinVNC Highlights:

- High-performance, pure HTML5 Remote Desktop
- Native HTTP and HTTPS using WebSockets and AJAX protocols
- Gateway mode
- Presentation Tool
- Clipboard Support
- Video Driver Support
- Windows Vista / Windows 7 UAC Support
- Multi-Monitor Support

ThinVNC server works on Windows 2000/XP/2003/Vista/Win 7/Windows Server 2008. ThinVNC client is compatible with any Operating System and any HTML5-compliant Web Browser such as Mozilla Firefox, Google Chrome, Opera, Safari, etc.

ThinVNC is free for non-commercial use and there’s an open source version downloadable under GPL terms.

Contact us for more information!

ThinVNC HTML5 Remote Desktop, now with WebSockets and Seamless Windows

ThinVNC newest beta build is now available on the product site. With this build, added to its pure HTML5 web browser client, ThinVNC brings a brand new native MS Windows client with Seamless Windows support. Now, you can access a remote computer and work with remote and local applications seamlessly integrated on the same local desktop.

The new ThinVNC Windows Client connects to ThinVNC server using the WebSockets protocol, enabling native HTTP(S) firewall-friendly connections without the typical overhead of an HTTP encapsulation. A new WebSockets-enabled HTTP(S) Server is now in place to allow parallel WebSockets and AJAX long-poll implementation.

Additionally, ThinVNC gateway functionality has been enhanced to proxy other ThinVNC servers using WebSockets protocol, easing the external access to intranet PCs using pure HTTP and SSL3/TLS1.

On its pure-web remote access mode, this new build brings full clipboard support and several fixes. A WebSockets native browser client is under development and expected to be released soon.

What’s new?

· New WebSockets-enabled HTTP(S) Server.

· New Windows Client with WebSockets and Seamless Windows support

· HTML5 browser client clipboard support

· Fixed scale issues on Firefox

· Optimized Google Chrome Frame installation for IE

· Solved drawing delay when switching tabs during a presentation

· Fixed other miscellaneous errors

Are you a developer or beta tester working with ThinVNC? We want to hear from you! Send your feedback to support@cybelesoft.com or join us on Twitter to let us know your experiences: @cybelesoft


ThinVNC - Digging into the code, Part II

Introduction

In the first part of this article I showed how to do the screen capture, window by window and, using clipping regions and bitmap comparison, how to build a list of changed bitmap regions to send to the client. In this second part, we'll see how to send all this information to the client. 

The code - Part II

The following JSON is an example of a desktop capture.  
 Collapse
{"status:":1,"desktopWidth":1280,"desktopHeight":800,"cursor":"default","cursorX":241,"cursorY":525,
 "windows": [ { "hwnd":"196724","zidx":1,"desktop":"Default","left":0,"top":0,"width":1280,"height":800},
    { "hwnd":"8521744","zidx":2,"desktop":"Default","left":364,"top":59,"width":806,"height":667},
    { "hwnd":"8129930","zidx":3,"desktop":"Default","left":-8,"top":-8,"width":1296,"height":776},
    { "hwnd":"1247020","zidx":4,"desktop":"Default","left":244,"top":28,"width":1023,"height":728},
    { "hwnd":"8785068","zidx":5,"desktop":"Default","left":-8,"top":-8,"width":1296,"height":776,"imgs": [ { "x":8,"y":8,"w":1280,"h":123,"img": "data:image/jpeg;base64,/9j/4......" }]},
    { "hwnd":"6033806","zidx":6,"desktop":"Default","left":-1,"top":479,"width":426,"height":22,"imgs": [ { "x":1,"y":0,"w":425,"h":22,"img": "data:image/jpeg;base64,/9j/4AAQ......" }]},
    { "hwnd":"196708","zidx":7,"desktop":"Default","left":0,"top":760,"width":1280,"height":40,"imgs": [ { "x":53,"y":0,"w":1227,"h":40,"img": "data:image/jpeg;base64,/9j/4AA......" }]},
    { "hwnd":"131186","zidx":8,"desktop":"Default","left":0,"top":760,"width":54,"height":40,"imgs": [ { "x":0,"y":0,"w":54,"h":40,"img": "data:image/jpeg;base64,/9j/4AAQSkZJ......" }]}]]}   
The "windows" array contains all the visible windows on the desktop. Each item contains the window handle (for identification purpouses), its bounding rectangle, the desktop to which it belongs, its relative z-order and an array of images. Each image corresponds to changed region on that specific window. If there are no changes, the "imgs" array doesn't exist. 
 Collapse
function reload() {
    scale = getScale();
    var url = baseUrl + "json?id=" + sessionStatus.id;
    clearTimeout(jsonTimeout);
    jsonTimeout = setTimeout(onJsonTimeout,jsonTimeoutValue);
    $.getJSON(url, function (obj) {
        try {

            $.each(obj.windows, function (i, win) {
                processWindow(win);
            })

            for (var i = deskDiv.children.length - 1; i >= 0; i--) {

                var found = false;
                var canvas = deskDiv.children[i];

                $.each(obj.windows, function (i, win) {
                    var canvasid = "canvas" + win.hwnd;
                    if (canvas.id == canvasid) {
                        found = true;
                    }
                })
                if (!found) {
                    canvas.style.display = "none";
                    canvas.innerHTML = '';
                    deskDiv.removeChild(canvas);
                }
            }

        }
        catch (err) {
            if (sessionStatus.active) {
                setTimeout(reload, 1);
            }
        }
    });
}
For each "window" item received, the processWindow method is called, creating or reusing a canvas element. All canvas elements belonging to windows that aren't present in this JSON correspond to windows that have already been closed. These are erased on the "for (var i = deskDiv.children.length - 1; i >= 0; i--)" loop. 
ProcesWindows function creates or reuses a canvas per window, using the hwnd as part its id. It also sets the canvas coordinates and its zindex according to the received information, and iterates over the images array to copy them on the canvas surface.
 Collapse
function createCanvas(win) {
    var canvas = document.createElement("canvas");
    
    canvas.visibility = 'visible';
    canvas.display = 'block';
    canvas.style.position = 'absolute';
    canvas.style.left = (win.left-sessionStatus.viewLeft)+'px';
    canvas.style.top = (win.top-sessionStatus.viewTop)+'px';
    canvas.style.zIndex = win.zidx;
    canvas.width = deskDiv.offsetWidth;
    canvas.height = deskDiv.offsetHeight;
    canvas.id = "canvas" + win.hwnd;
    deskDiv.appendChild(canvas);
    return canvas;
}

function processWindow(win) {
    var canvasid = "canvas" + win.hwnd;
    var canvas = document.getElementById(canvasid);
    if (!canvas) {
        canvas = createCanvas(win);
    }

    deskDiv.style.marginLeft = getDeltaX() + 'px';
    deskDiv.style.marginTop = getDeltaY() + 'px';
    if ((win.width == 0) || (win.height == 0)) {
        canvas.style.visibility = "hidden";
        canvas.style.zIndex = -1;
    } else {
        canvas.style.left = (win.left-sessionStatus.viewLeft) + 'px';
        canvas.style.top = (win.top-sessionStatus.viewTop) + 'px';
        canvas.style.clip = 'rect(0px,' + win.width + 'px,' + win.height + 'px,0px)';

        canvas.style.visibility = "visible";
        canvas.style.zIndex = win.zidx;
    }
    
    if (win.imgs != null) {
        var context = canvas.getContext('2d');
        if (!context || !context.drawImage) {
            alert("no hay canvas");
            return;
        };

        $.each(win.imgs, function (i, imgpart) {
            var img = new Image();
            img.id = "imgcanvas";
            img.style.display = "none";
            img.onload = function () {
                context.drawImage(img, imgpart.x , imgpart.y, img.width, img.height);
            }
            img.src = imgpart.img;
        })
    }
};  

The updated source code can always be found here.   

VNC got thin! New pure-web remote desktop solution

Cybele Software, Inc. introduces ThinVNC, a new remote desktop solution that boosts and enhances remote technical support and administration tasks, allowing users to remotely access a desktop using just a web browser.

ThinVNC was built from the ground up taking full advantage of AJAX, JSON and HTML5 technologies. By implementing a number of techniques not available in traditional AT&T RFB protocol, it achieves a remarkable performance, rivaling any traditional VNC.

ThinVNC exploits HTML5 canvas to display a remote PC desktop, not requiring any additional plugin, add-on or installation of any kind on the client side. Regardless of the computer or mobile operating system, ThinVNC provides native, secure data transmission using HTTP and SSL.

Users can use the ThinVNC Presentation Manager to invite people to attend online demonstrations or trainings. Running on the web browser, ThinVNC removes the need of a “viewer” download making the attendance of non-tech people smooth and free of any setup issue.

On corporate environments, ThinVNC can be set up as a gateway to proxy other ThinVNC instances. By publishing only one IP, users can remotely get access to desktops on the LAN just by entering the internal IP/PC name in the welcome screen.

ThinVNC Server works on Windows 2000/XP/2003/Vista/Win 7/Windows Server 8. On the client side, ThinVNC is compatible with any Operating System and an HTML5 compliant browser such as Mozilla Firefox, Chrome, Internet Explorer, Opera, Safari, etc.


Recent news (2022):


- ThinVNC has evolved into Thinfinity VNC.

- Full ThinVNC SDK 2.0 can be downloaded, being available on a royalty fee basis. Contact us for pricing and licensing information.
-The old ThinVNC Open Source (version 0.9) must be taken as a technology preview, you can download the latest zip file from Source Forge



ThinVNC - Digging into the code, Part I

Introduction

I found interesting the idea of a pure HTML5 Remote Desktop client for cross-browser cross-platform access to a PC. Despite that there are some AJAX VNC/RFB implementations, I thought in a simpler way to build a remote desktop solution using web standards and simple image processing.

This solution is built using AJAX, HTML5, JSON and simple JPEG/PNG images. The required server-side code is written in Delphi 2010.

The code - Part I

In this first part we'll see the code to do the screen capture. The standard aproach is to capture the whole desktop. However, in this case, we'll capture every window individually, applying clipping regions and saving the individual bitmap for later comparison and difference extracting.

Firstly we need to enumerate all visible top windows:

TWin = class(TObject)
private
  Wnd : Hwnd;
  Rect : TRect;
  Pid : Cardinal;
public
  constructor Create(AWnd:HWND;ARect:TRect;APid:Cardinal);
end;

function EnumWindowsProc(Wnd: HWnd; const obj:TList<TWin>): Bool; export; stdcall;
var ProcessId : Cardinal;
  R,R1 : TRect;
  Win : TWin;
begin
  Result:=True;
  GetWindowThreadProcessId(Wnd,ProcessId);
  if IsWindowVisible(Wnd) and not IsIconic(wnd)then begin
    GetWindowRect(Wnd,R);
    IntersectRect(R1,R,Screen.DesktopRect);
    if not IsRectEmpty(R1) then begin
      win := TWin.Create(Wnd,R,ProcessId);
      obj.Add(win);
    end;
  end;
end;

procedure GetProcessWindowList(WinList:TList<TWin>);
begin
  WinList.Clear;
  EnumWindows(@EnumWindowsProc, Longint(WinList));
end;

We want to keep a list of windows, with their basic attributes and their
bitmaps, so we can compare with the new ones and send the differences to the
client. Here we merge the window list into a list of TWindowMirror:

TWindowMirror = class
private
  FIndex : Integer;
  FRgn : HRGN;
  FHandle : THandle;
  FBoundsRect : TRect;
  FProcessId : Integer;
  FImage : TBitmap;
  FDiffStreamList : TList<TImagePart>;
  ...
  ...
end;

procedure TMirrorManager.RefreshMirrorList(out OneMoved:Boolean);
  procedure GetProcessWindowList(WinList:TList<TWin>);
  begin
    WinList.Clear;
    EnumWindows(@EnumWindowsProc, Longint(WinList));
  end;

var
  wl : TList<TWin>;
  n : Integer;
  wm : TWindowMirror;
begin
  OneMoved:=False;

  wl := TList<TWin>.Create;
  try
    // Enumerates top windows
    GetProcessWindowList(wl);
    try
      for n := wl.Count - 1 downto 0 do begin
        // Looks for a cached window
        wm:=GetWindowMirror(FMirrorList,wl[n].Wnd);
       if assigned(wm) then begin
        if IsIconic(wl[n].Wnd) then
           wm.SetBoundsRect(Rect(0,0,0,0))
       else wm.SetBoundsRect(wl[n].Rect);

          // Returns true when at least one window moved
       OneMoved:=OneMoved or (DateTimeToTimeStamp(Now-wm.FMoved).time<MOVE_TIME);
        end else begin
         // Do not create a TWindowMirror for invisible windows
         if IsIconic(wl[n].Wnd) then Continue;

       wm:=TWindowMirror.Create(Self,wl[n].Wnd,wl[n].Rect, wl[n].pid);
       FMirrorList.Add(wm);
        end;
        // Saves the zIndex
        wm.FIndex:=wl.Count-n;
        // Generates clipping regions
        wm.GenRegions(wl,n);
      end;
    finally
      ClearList(wl);
    end;
    // Sorts the mirror list by zIndex
    FMirrorList.Sort;
  finally
    wl.free;
  end;
end;

Finally we do the capture:

function TWindowMirror.Capture(ANewImage:TBitmap): Boolean;
  function BitBlt(DestDC: HDC; X, Y, Width, Height: Integer; SrcDC: HDC;
                   XSrc, YSrc: Integer; Rop: DWORD): BOOL;
  begin
    // Capture only visible regions
    SelectClipRgn(DestDC,FRgn);
    result:=Windows.BitBlt(DestDC, X, Y, Width, Height, SrcDC,
                           XSrc, YSrc, Rop);
    SelectClipRgn(DestDC,0);
  end;

var
  DC : HDC;
  RasterOp,ExStyle: DWORD;
begin
  RasterOp := SRCCOPY;
  ExStyle:=GetWindowLong(FHandle, GWL_EXSTYLE);
  if (ExStyle and WS_EX_LAYERED) = WS_EX_LAYERED then
  RasterOp := SRCCOPY or CAPTUREBLT;

  DC := GetDCEx(FHandle,0,DCX_WINDOW or DCX_NORESETATTRS or DCX_CACHE);
  try
    Result:=BitBlt(ANewImage.Canvas.Handle,0,0,
    Width(FBoundsRect),Height(FBoundsRect),DC,0,0, RasterOp)
  finally
    ReleaseDC(FHandle,DC);
  end;
end;

Now that we have captured all visible regions we need to get the bitmap
differences against the previous capture. We do this by looping through the
windows, then their visible regions and finally calculating the regions where we
find bitmap differences:

function TWindowMirror.CaptureDifferences(reset:boolean=false): Boolean;
  ....
begin
 ...
 result:=Capture(TmpImage);
 if result then begin
   ...
   ra:=ExtractClippingRegions(Rect(0,0,TmpImage.Width,TmpImage.Height));
   for n := 0 to Length(ra) - 1 do begin
     ra2:=GetDiffRects(FImage,TmpImage,ra[n]);
     for m := 0 to Length(ra2) - 1 do begin
       Jpg := TJpegImage.Create;
       ...
       CopyBmpToJpg(Jpg,TmpImage,ra2[m]);
       FDiffStreamList.Add(TImagePart.Create(rbmp,'jpeg'));
       Jpg.SaveToStream(FDiffStreamList[FDiffStreamList.Count-1].FStream);
       ... 
       Bitblt(FImage.Canvas.Handle,
       ra2[m].Left,ra2[m].Top,Width(ra2[m]),Height(ra2[m]),
       TmpImage.Canvas.handle, rbmp.Left,ra2[m].Top,SRCCOPY);
     end;
   end;
   ...
end;

On the next post we'll focus on the protocol with the client and the client code.

HTML5 remote desktop open source

You can download the full source code from Source Forge.


UPDATE: There's a commercial version with PRO features available here.