How to capture a screenshot of the SDDM greeter screen
October 8, 2016 Leave a comment
In my previous post I explained how to capture a screenshot of the LightDM greeter screen. The procedure is essentially the same for the SDDM greeter screen; only the Bash script differs slightly. The procedure is given below.
- If they are not already installed, install the packages
- Create the Bash script
~/sddm-greeter-capture.shcontaining the following:
TMPXAUTHORITY=$(ls /var/run/sddm/*) sleep 30 DISPLAY=:0 XAUTHORITY=/var/run/sddm/$TMPXAUTHORITY xwd -root > /tmp/greeter.xwd convert /tmp/greeter.xwd /home/fitzcarraldo/greeter.png
Make sure you make it executable:
- Log out of the Desktop Environment so that the SDDM greeter screen is displayed.
- Press Ctrl+Alt+F2 to switch to VT2.
- Log in to you user account and enter the following command (do not wait for it to complete):
- As soon as you have pressed Enter for the above command, press Ctrl+Alt+F7 to switch back to VT7.
- Wait for at least 30 seconds to be sure the Bash script has made a snapshot of the SDDM greeter screen, then log in.
- You should now find the file
~/greeter.pngcontaining a snapshot of your SDDM greeter screen.
If you install
media-libs/netpbm instead of (or as well as)
media-gfx/imagemagick then you can use a different command to convert in the Bash script:
TMPXAUTHORITY=$(ls /var/run/sddm/*) sleep 30 #DISPLAY=:0 XAUTHORITY=/var/run/sddm/$TMPXAUTHORITY xwd -root | xwdtopnm | pnmtopng > /home/fitzcarraldo/greeter.png
The resulting PNG image looks equally good to my eyes.