How to take a screenshot in the Linux system login interface?

  
                

There are many ways to take screenshots in Linux, but how do you take screenshots in the Linux login interface? The login interface system has not been started yet, and some screenshot tools are not used. At this time, it is necessary to pay attention to the screenshots of the screen. This article will introduce how to take screenshots in the Linux system login interface?

Use these commands under root privileges:

chvt 8

sleep 5

DISPLAY=:0.0 XAUTHORITY=/var/lib/mdm/: 0.Xauth xwd -root 》 /tmp/shot.xwd

convert /tmp/shot.xwd /tmp/ss.png

The most critical part of these commands is the third line. XAUTHORITY=/var/lib/mdm/. Different distributions use different login managers by default. For example, Ubuntu uses lightdm, Kubuntu uses kdm, Linux Mint uses mdm, and Gnome uses gdm for desktop distribution.

Different login managers have different XAUTHORITY. So some of the information found on the Internet is XAUTHORITY=/var/run/lightdm/root/, and some are XAUTHORITY=/var/lib/gdm/. So the question is, how do we determine which login manager is used by the current system?

Of course you can't make a head, you have to be reasonable. At the beginning, I used to think that the dm I was using was kdm, and the result fell into the pit.

actually very simple, just put the name of the dm process included in a fish out of view, the command will be able to determine how to write. Finally, attach the renderings:

These are the Linux login screen shots of the technique, so you can intercept the login screen high-definition picture, if not the skill, you want to login screen in & ldquo; Screenshots, rdquo;, that can only take pictures.

Copyright © Windows knowledge All Rights Reserved