Screenshot of a virtual terminal when it is not focused (in the background) - background

This is on Ubuntu. I have two xsessions, one on tty7 (display :0) and one on tty8 (display :1). For the record, :0 is Unity and :1 is Fluxbox. I would like to be able to take a screenshot on display :1 while working on display :0.
I'm using the Java Robot class. I've written a small screen scraping bot. The mouse movements work when I'm switched to the other virtual terminal, but the screengrabs are coming out all black (the bot has no image to act on).
I'm spawning the second xsession with:
startx /usr/bin/fluxbox -- :1
Is there a way to make the screenshots work? Is there a workaround for keeping the display active (remote desktop to it?)? Would someone be kind enough to explain why these go black when the virtual terminal is not focused?
I'm looking for the least intensive way to have a second display, mouse, and keyboard running. The path of least resistance would be a way to keep the display active when not focused.
Thanks! Sorry if any of my terminology is off, new to using a second virtual terminal.

You get a black image simply because the image you want to capture does not exist anywhere.
When a virtual terminal is active, each program that is on your display will generate its own image, and the image gets put into the video memory. When the virtual terminal is not active, the programs do not generate their image (since it would be superfluous), nothing stores those images, so you cannot capture them.

Related

Programmatically signal LXDE desktop manager to hide its start panel?

I'm working on a RaspberryPi with a 3.5 inch LCD screen. I have a Qt 5 based application that operates in kiosk mode without a title bar. The app uses the entire 320x480 screen. I want to hide the LXDE start panel to reclaim the pixels for my app.
I found several posts that detail configuration changes for LXDE to hide the start panel. For example, here and here. They provide answers like edit /etc/xdg/lxsession/LXDE-pi/autostart and restart.
I'm trying to do the same programmatically. LXDE has a Wiki but I don't see an API to dynamically configure it.
My first question is, how do tell LXDE to hide its start panel? I'd like the start menu go away, or ensure my app is layered on top of the start panel. I would like to do something like this:
MainForm::MainForm(QDialog *parent)
: QDialog(parent)
{
ui.setupUi(this);
LXDE* lxde = getDesktopManager();
lxde->hideDesktopPanel();
}
If it is not possible to do at runtime, then my next question is, can I run the RPI with only X11? In this case I can remove the desktop manager because I don't need it. Qt can talk to X11 the window manager directly.
PCManFM and friends are pretty much useless on the 3.5 screen, so I don't really care if the solution is to remove the desktop manager.
A workaround is to use showFullScreen() that makes the GUI occupy the entire window.

Use my own default picture on roboter Peppers tablet

I am using Aldebaran-Softbanks Pepper robot. Per default it's tablet shows an animtion with colored dots.
I want to change that to my own png-picture.
I still have a project/package with a "Show Image" behaviour which displays my picture without problems. I installed this package to the robot and set the autostart flag.
While starting Pepper the picture is shown for some seconds and then it disapears because of the deffault-start-pepper-behaviour which shows a softbank logo, an animated cloud of colored dots and fancy things like that.
My current workaround is to add a "Wait" box between the start-event and the "ShowImage" box. The wait is 22 seconds.
There is a similar looking question but the topic doesn't really fit.
Create empty application. Make a folder named 'html' and place your image inside it.
Add this setup to your robots database either here or via SSH
Restart the robot

How do you force shutdown a unresponsive VM with VMWare with a IOS host?

enter image description hereenter image description hereI have windows 10 running on VMWare Fusion on my MacBook pro. I've used it without problem for the past year then today in my class the screen just went black. I cant even see the mouse I scrolled my mouse to the top and was able to get the mac top task bar and was able to close out of the VM and it was suspended but it wont let me shut it down. Anyone know the process I need to take to do this? I know I could always shut the mac down and entirely and restart but don't want to risk damaging the windows image. any help would be appreciated.
Maybe this could work, I used it a few times as well.

In GNU screen, is it possible to programmatically read the status message?

I am considering writing a graphical tool that will show you what gnu-screen sessions you have and what windows are available in them. You would then be able to, for example, click on the window title and it would take you there. I do not want to modify gnu-screen in any way so that my tool can work with existing installations on other machines and so on.
I can get ordinary output from programs running inside screen out of the screen session by using a log-file, or by copying the last few lines into the exchange-buffer. What I really need in order to make a nice user interface though is the contents of the status line (the line that temporarily appears at the bottom of the window). For example, to get the list of windows in a session I can send the windowlist command, but the result is never part of the output. Does anyone know if there is a way to make screen put its messages into the log, into a paste-buffer, into the current window, or anything similar where I can grab it from another program?

Detach and reattach a complete Screen session with multiple windows

I am writing a client/server-application and when I'm testing the code I want to be able to have both the server and client in a separate terminal (+ vim). For this I thought I could use GNU Screen and divide the terminal in multiple windows (and it works great!). But I have a problem when I want to detach the whole session with windows and all. When I try to reattach the session I don't get them in windows like I arranged it, but instead they attaches like "normal" screen instances.
Also, is there a way to change the size of a screen window? Like change the height proportions of two windows splitted vertically.
your first question isn't possible because the regions (the way the windows are displayed) are bound to a single screen instance and not to a screen session.
C-a :
resize
see man screen for more explanation of the resize command