Skip to content

Instantly share code, notes, and snippets.

@siddhpant
Last active March 25, 2022 12:14
Show Gist options
  • Save siddhpant/51c6665072ca9c5c183222564faf231b to your computer and use it in GitHub Desktop.
Save siddhpant/51c6665072ca9c5c183222564faf231b to your computer and use it in GitHub Desktop.
SDDM login screen screenshot
TMPXAUTHORITY=$(ls /var/run/sddm/*)
sleep 15
DISPLAY=:0 XAUTHORITY=$TMPXAUTHORITY xwd -root > "/home/$USER/Desktop/greeter.xwd"
convert "/home/$USER/Desktop/greeter.xwd" "/home/$USER/Desktop/login_screen.png"
rm "/home/$USER/Desktop/greeter.xwd"
@siddhpant
Copy link
Author

Save this in the home directory (for easy execution) and give the required perms.
Switch to another TTY, run this script (if saved in home, just type ./shot.sh), switch to the GUI TTY and wait for 15 seconds. The screenshot will be saved on the Desktop, hence visible to you the moment you log in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment