How to simulate the behavior of a remote desktop without showing the screen - windows

I should make a program that simulates the behavior of a remote desktop but without showing the screen of the server to the client.
I can use any programming language, but the client must be on Android mobile device and the server's operating system must be Windows.
I do not know how to Start. I was thinking about two possibilities:
1- Use a socket. But the difficulty was to give commands outside of the programming environment.
2- Use a rdp already done but turn off the display screen (setting is not present in the rdp I know). Who can help me?
Thank you

Related

How can I have a Pcomm session automatically log in to a specific connection..?

We have an AS400 DB2 v7r3m0 system, to which we connect with PComm v6 emulator sessions. For a certain high-throughput printer, there's a stand-alone PC acting as a print server, with a PComm printer session.
I'd like to have that PComm printer session automatically start, make the connection, and log in, so I can have it run from Windows Startup.
I've been able to record & clean up a VBS macro that logs in once the connection is made, but not the connection process. Unless I'm missing something, macros cannot be recorded or run until the connection is made.
Is there a built-in process by which the connection can be made automatically..?
If not, I'm assuming it could be done with autECLConnMgr and related libraries in VBS, but the IBM documentation on that is a little deep for me. If that's the way to go, could someone provide an example..?
EDIT: This is the dialog I speak of. This sometimes precedes the opening of any emulator windows, sometimes from the IBM i control panel applet, and so it cannot be scripted through an emulator window way, and thus my assumption it needs to go through WScript.
Honestly, I think you should look into using the Windows scripting language AutoHotkey to fill in any gaps in functionality that you can't achieve by other means. Virtually anything you can do by hand on a PC can be automated using AutoHotkey, including keyboard and mouse input.

How to set up GUI testing automation on Ubuntu server

I want to set up automated testing of a GUI app (say Qt) on Ubuntu Server distribution (i.e. without phisical monitor and without window manager). How can I accomplish this?
GUI applications - particularly Qt-based ones- usually need some display to connect to. Otherwise they'll have problems rendering the GUI (e.g. fonts) and receive input (e.g. mouse).
The need for a physical display can be avoided through a virtual display however. See this Squish Knowledge Base artcile for hints on the usage of Xvnc, X11vnc, Xvfb and Xnest.
Running a window manager on the virtual display is still recommended. It does not have to be a full desktop environment. A simple WM does. GUI toolkits are not necessarily prepared

How to add an extended workspace on mac without connecting an external monitor?

So, I wanted to cast my extended workspace (on MAC) to my app on iOS. I've been reading on it for a few days and singled out Quartz display services API to capture the screen directly from the GPU for each display connected.
As for my use case, I need to stream it through HTTP on a local wifi network and be able to receive it in my app. The problem is, Mac won't extend the workspace without connecting a compatible device like a projector or a monitor. How do I work around this? I need to be able to cast only the extended workspace through HTTP/tcp and it seems possible from what I've read. I've also looked into IOKit and other related sources but they did not have much of useful info for me. Since the goal is to stream the extended workspace to other devices from the MAC, connecting a real secondary display is useless and does not make sense.
Can we work around this by somehow making the kernel think that there is another display connected?
Is there any other way to spawn an extended desktop and cast it?
Any help will be greatly appreciated.
I found a Github repo which does what I wanted to do to some extent. They have actually written a driver that enables multiple virtual desktops by tricking mac to think it was connected to a physical monitor. For someone like me in the future, take a look into this link.
Any other inputs to achieve this will also be great.

UIAutomation won't work in Windows Server (VPS) if I am not connected via RDP

I have script which uses mircrosoft's UIAutomation to automate an application. The script is inside a VPS running Windows Server 2012. The script works perfectly while I am connected to the VPS via Remote Desktop (RDP).
When I am not connected, the script seems to be stuck on SetFocus for a object... which leads me to believe that the script needs a Display/Screen/Session in order to work... but I am not sure if it is possible to do it while I am not connected to the VPS.
I can see 2 possible solutions here, either modify the script in someway to work in this environment or make the VPS have a virtual desktop while I am not connected (this solution might be more related to Server Fault rather than StackOverflow).
I am very confused, thanks for the help in advance :)
I managed to workaround the issue by actually connecting to the server to itself (to 127.0.0.1) via RDP so that it will always have an active RDP session for the automation script to run.
I am not happy with the results but it works... I cannot give clear instructions on how you would need to modify the settings in Windows to allow RDP connections from self, it was a one big trial and error process, I have to modify some policies in the Group Policy Editor and then some stuff that I don't remember.
There is another downside to this, a Windows server will allow 2 simultaneous connections to it but by using this method we are reserving a slot so only 1 connection at a given time is possible, something to be aware of.

Detecting a Citrix XenDesktop Session

I'm looking to determine if our application is running on a XenDesktop session rather than locally. Here is what I have found so far:
We currently have code to detect a Citrix XenApp session similar to the solution mentioned by Helge Klein in "API for Determining if App is Running on Citrix or Terminal Services".
Sadly that solution in a XenDesktop environment is returning back a WTSClientProtocolType of 0 which signifies a local console session.
In response to the same question Josh Weatherly mentioned checking the sessionname environment variable.
However a quick console check with echo %sessionname% on the XenDesktop environment returns back 'Console'.
From "Detect citrix “application mode”?" John Sibly suggested a solution for detecting a remote session (not Citrix in particular):
GetSystemMetrics(SM_REMOTESESSION) however returns 0 which also means that it is a local session.
Does anyone know of a way to detect that it is a XenDesktop session? So far as you can see all my attempts are returning that the session is a local console session.
I'm using XenDesktop Express 5.5, accessing the desktop using the Citrix Receiver Web Plug-In.
If you are using XenDesktop for VDI, then as far as the application is concerned, the application is executing locally. VDI, or virtual desktop infrastructure, consists of delivering the GUI from a full featured desktop operating system to a remote device. Typically, the desktop O/S executes in a virtual machine on a hypervisor in a data center, and the GUI is transmitted to the remote device using Citrix' ICA stack. For example, this happens in the pooled desktops scenario.
XenApp offers virtual desktops, which is a slightly different concept. Again, the desktop is delivered to a remote device using the ICA stack. However, the desktop is no longer running on a dedicated O/S. Rather, it is one of a number of user sessions on a single Windows Server. There may be any number of users logged on to that server. This places limits on the applications that can be run, which is why applications might want to know that they are on a multi-user O/S.
What you might try to do is determine whether the GUI is being delivered remotely using the ICA stack. A simple check would involve looking for the "ProticaService", which is responsible for implementing the ICA stack.
Alternatively, you may be trying to determine if your machine is running in a VM or native to a machine. Besides the pooled scenario described in the first paragraph, XenDesktop can deliver desktop running native. This overcomes limits on virtualision I/O devices such as graphics cards used by CAD applications. In this case, you need to rule out the presence of a VMM, or hypervisor.
I have updated my answer linked to in the question with a description of how to determine the remoting protocol type in XenDesktop sessions.
You need the (not really well documented) function WFGetActiveProtocol from Citrix' WFAPI SDK. Proceed as follows:
Download the SDK (link)
Install WFApiSDK64-65.msi
In your C++ project include wfapi.h and link to wfapi[64].lib
Use the undocumented function WFGetActiveProtocol
More detail and sample code here.

Resources