Recent

Author Topic: Virtual monitor on linux and screenshot  (Read 357 times)

backprop

  • Full Member
  • ***
  • Posts: 119
Virtual monitor on linux and screenshot
« on: January 26, 2025, 09:46:18 am »
I have never tried that, but I have read that with xrandr can be created virtual monitor. To be clear, not to split actual monitor on 2, but absolutely virtual.

How then switching between actual and virtual monitor works? Is it possible to make screenshot of virtual monitor with Lazarus?
And how to switch between actual and virtual monitor in order to see what is on virtual monitor?
Is it necessary to call app. with xrandr which will be able to get screenshot with DC(0) or virtual monitor will be capture as DC(1) ?

Example how to create and work with such configuration would be useful.

Used KDE distro.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8231
Re: Virtual monitor on linux and screenshot
« Reply #1 on: January 26, 2025, 09:53:48 am »
I'm a KDE user on Debian 12, still using X11.

What do you mean by "virtual monitor" in this context? Are you talking about something roughly comparable with xnest or xephyr?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

backprop

  • Full Member
  • ***
  • Posts: 119
Re: Virtual monitor on linux and screenshot
« Reply #2 on: January 26, 2025, 11:00:39 am »
I need to do some image processing from live video signal which can't be obtain otherwise, except doing screenshots in background. On actual monitor some other task is doing and for that require full screen. For that background task I need virtual monitor.
« Last Edit: January 26, 2025, 11:08:33 am by backprop »

MarkMLl

  • Hero Member
  • *****
  • Posts: 8231
Re: Virtual monitor on linux and screenshot
« Reply #3 on: January 26, 2025, 11:24:29 am »
OK, so really just "another X11 session". I think you could do this via Xephyr or (possibly) XNest, however particularly if the software gets the idea that it has to work over a network connection rather than using shared memory this could be slow... seriously slow, I thing it's something that crops up every so after where the widget set is polling the input devices excessively.

Have you tried tunneling over SSH? You'll probably have a single window rather than the full desktop, but it might do what you want and will be relatively painless.

VNC will generally perform better, and these days is fairly compatible in terms of supported APIs. If you're running lightdm as the display manager you'll find that it has the facility to map a root window (i.e. with the full desktop environment) between systems, otherwise while I don't know the "proper" way to set this up I've somewhere got scripts that will make a VNC session available on a predetermined port completely separate from anything else going on on the same system.

Finally, if you use Leave -> Switch User it will give you a completely separate session on <Ctrl><Alt><F8> with your original still on <Ctrl><Alt><F7>. However KDE has a quirk in that it won't actually allow the same user to login twice (i.e. you'll need to set up a second local user and designate a shared-accessible directory), and my experience it that you /really/ need to prevent either session from going into a screensave state since getting out can be tricky.

Quite a lot distilled into a handful of paras there...

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018