Results 1 to 5 of 5

Thread: Taking screenshots in libvirt

  1. #1

    Default Taking screenshots in libvirt

    In a running VM guest, in the console there are menus in the top part of the window. One of them is "Virtual Machine", and one of its options reads "Take shot", or something like that. Is this indeed for taking a screenshot (not snapshot!) of the VM?
    If not, how can I take screenshots? I highly believe the PrintScr key in keyboard would (*at best*) take screenshot of the whole host desktop!

    I'm using GNOME by the way.
    Thanks beforehand.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,672
    Blog Entries
    3

    Default Re: Taking screenshots in libvirt

    I'm using KDE instead of Gnome.

    I just tested that out to see what happens. It works pretty well.

    It is taking a screen shot from outside the virtual machine. It stores the screenshot on the host machine. The file name for the screen shot looks like a KDE (Plasma 5) screen shot name.

    It works even when the virtual machine is paused. That's what persuades me that it is taken from outside the machine.

    I have, previously, taken a screenshot with the host machine (hitting the Print Screen key). And that gives a screen shot showing the VM screen together with the borders and window heading that surround it. However, when I use that screenshot menu, I only get the VM screen -- no additional borders and no window heading. So it is a better way to do things.

    If I want a screen shot from within the VM, I presume that I would use the "Send Key" menu to send a "Printscreen" key. And I could not do that when the VM is not running.

    I highly believe the PrintScr key in keyboard would (*at best*) take screenshot of the whole host desktop!
    I haven't tried that when running Gnome. When I do that in KDE, it takes an initial shot of the entire screen. But I can then check a box to say that I want only a shot of the active window. Then I click to take a new shot. And it gives me a delay to move the cursor to the window. That way I get a shot of just the window. But the window does include borders and header, unless I carefully adjust the scroll bars to show only what I want. So the screen shot from the "Virtual Machine" menu seems like a better idea.

    Give it a try, and find out.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  3. #3

    Default Re: Taking screenshots in libvirt

    Whoa, thanks very much for the clarification.
    But, in your case, when using the "screenshot menu" which saves the screenshot in host, where does it save it by default?

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    15,672
    Blog Entries
    3

    Default Re: Taking screenshots in libvirt

    Quote Originally Posted by F_style View Post
    But, in your case, when using the "screenshot menu" which saves the screenshot in host, where does it save it by default?
    By default, it saves to the "home" directory. Since I started "virt-manager" at the command line as root, that's the root home directory. But that may depend on how you become root or how you start "virt-manager".

    You are given a way to save to a different location.
    openSUSE Leap 15.3; KDE Plasma 5.18.6;

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: Taking screenshots in libvirt

    Good discoveries.
    From my experience, there is no reason to ever do a screen grab within the Guest, there is no advantage and as pointed many advantages to doing the screen grab from the virtualization console.

    For a long time now I haven't had to pass keystroke combinations to the Guest, more than a decade ago it had to be done many times... at least in my case related to running VNC.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •