raspberry pi3 can not launch application on primary HDMI Display, can launch on remote using ssh -x - raspberry-pi3

I had built console core image for raspberry Pi3, and I am able to boot the Rpi3 successfully using SD card.
I have created an electron app which is able to launch on remote display over ssh.
However when I launch the application on Monitor connected through HDMI Cable, It gives following error
Can not open Display :0.0
I have seen many people asking this question for not able to launch on remote display, which works fine in my case.
Can anyone help in this?

With console core, you don't have an X server running to display on.
You can upgrade your system to include the X installation -- search for 'install pixel desktop' -- or you could just refresh the card with the lite or full image.
If you set the Pi to auto login to the pi account, you can start your application on login by adding it to the bottom of .xinitrc. You could also start it from a remote ssh, displaying on the local display, by setting DISPLAY=:0 in the environment before you start. You'll need to explore the world of X Windows authentication to make this work. See the man page for the xhost command, for instance.
(This is an expansion of LetoThe2nd's comment, which probably should have been an answer instead.)

Console core image means that there is no xserver running, and hence no display :0. Try getting started with core-image-x11 maybe, or whatever suits the RasPi.

Related

No GUI with Centos 7 running on AWS

I am trying to get a GUI running on an AWS Centos 7 instance. Tiger vnc seems to run fine and I can get connected with the tigervnc viewer. However, all I get is a grey screen with 4 checkboxes in the upper right hand corner.
I installed Gnome and Server with GUI and I have tried changing my xstartup a hundred different ways, but I always get a grey screen. See the screenshot.
How can I get the gnome gui to work over my vnc session?
thanks
I found out that you will get this issue when using cPanel and WHM if you have the user in a jailed root. Open up the access and the full OS will load.
I would imagine that there is some way to work around this to keep a jailed root, but I am not a linux guru, so I don't know how to accomplish that.

Windows Containers - Is it possible to interact with desktop apps running in a container using the Desktop Sharing API?

I understand that desktop/GUI apps are not supported in Windows containers. They do run but there's no built-in way to interact with them. I had the following idea - maybe I could use the Desktop Sharing API (https://learn.microsoft.com/en-us/windows/win32/api/_rdp/) for this purpose, the idea is to run a desktop app, then run a sharing program that uses the Desktop Sharing API, and connect to it using a Desktop Sharing API viewing program from the host.
I had to do some recap about window stations and desktops, and I noticed that when starting the container with cmd in interactive mode, I'm logged with ContainerAdministrator as a service (logon type 5). I tried running some WinAPI functions that deal with desktops and winstation and got some access denied results, so I switched to running cmd as system.
The window station of the cmd process (and other child processes) is not the interactive WinSta0, but instead some other service window station, which makes sense since I'm logged on as a service, and I figured that I can't use this window station, so I used a little program I wrote to run notepad in Winsta0 in the Default desktop. Afterwards I ran another program that enumerates the windows on WinSta0\Default, and the notepad window does get enumerated and I also get it's title, so it's running somewhere.
So now I tried running the desktop sharing API program (also on WinSta0\Default). It runs and I can connect from the host, but I only get a black screen without anything on it. I also tried running a program that takes a screenshot of the windows but I get an empty bitmap.
So I thought maybe the Default desktop is not the active desktop, and by using the OpenInputDesktop function I could confirm it - the current desktop was the Winlogon desktop, so I used the SwitchDesktop function to switch to the Default desktop (I used OpenInputDesktop again to verify that it actually worked).
Unfortunately, this didn't change anything, I still get an empty screen and empty bitmaps.
I know that containers are built for micro services and are not supposed to run GUI apps and so, but still - is there a way to make this work? Or any ideas of what else I can check? Alternatively, if you know that it can't work - I would also be happy to hear a good technical explanation of why it doesn't work.

Systemd create service who is able to display itself in a full screen terminal

i've made a CLI app with node js.
How can i create a service who display it in a full screen terminal in case it crashes and need to be restarted?
I'm using lxterminal in a raspberry pi.
(Yes, i need the desktop environement for other reasons)
Thanks.

Is a mouse click on a remote desktop possible using AutoIt or alternatives?

I want to write a script that involves mouse click and stuff. I am little confused though. Is there a way mouse clicks (in the form of x and y co-ordinates) would work on a VPS which is logged on, but disconnected from the client?
Example:
MouseClick("left",588, 268)
To my knowledge, these VPSes don't have their own native screen resolution. I have already written the script for my local pc and it's working fine on my resolution. But when tried with the VPS, it doesn't work.
PS: I am running the script from the remote desktop itself and not from my local pc. Please correct me if there's anything I am doing wrong :)
Update: For anyone still looking for an answer, consider installing a vnc server, that way the screen resolution you specify is preserved even when not connected to the server.
Ex: https://www.realvnc.com/en/connect/download/vnc/
It's relevant to almost any automation tool, not only AutoIt.
Remote Desktop has its own GUI context only if it's connected to the remote PC. But you can lose focus for a Remote Desktop window (without disconnection & without minimizing) and continue other local work.
The same effect takes place for VNC server software.
One team in our organization uses it for massive test runs automation: a master server creates a remote session for each test machine and keeps them all connected until tests passes.
Use ControlClick to have the mouse click over RDP connections, even when you're not connected. For some reason it can still be iffy for me, but at least it worked more so that Click which was none at all.

Selenium Grid, Capturing Screenshots

Capture screenshot using selenium command captureScreenshottoText or capture screenshot works fine if display/monitor is ON
But if Monitor is OFF it captures blank/Black images
How to get Proper images when display is off
This happens when the session is locked out or when the machine goes to sleep mode. Workaround that we use is to make sure that the machine never goes into this state. You can find more details here on how to disable the screen lock - http://www.howtogeek.com/howto/windows-vista/disableenable-lock-workstation-functionality-windows-l/
If you are connecting to a remote computer, use a VNC server/viewer to open your Selenium Server so that the display doesn't get killed. If you are using Remote Desktop, the display will close whenever you quit.
Connecting via VNC should fix your issues

Resources