Page 1 of 1

logon screen screenshot ?

Posted: Mon Apr 15, 2019 4:45 am
by KoO
Is it possible to take a screenshot of the logon screen...?

I have looked this up on da web but not with any success.

As I have made my own logon screen backgrounds and would like to take screenshot of them with the user & password panel as I will also be editing the panel as well..

Thanks

Re: logon screen screenshot ?

Posted: Mon Apr 15, 2019 5:00 am
by chrispop99
I've never found a way.

Chris

Re: logon screen screenshot ?

Posted: Mon Apr 15, 2019 5:50 am
by BitJam
It's easy to take screen shots of almost anything when you run in Virtual Box. You could take a snapshot of your system and then boot the iso you created in Virtual Box. This is how we generate screen shots of the bootloaders and the early boot process.

Another approach would be to set the console frame buffer to a decent resolution and then use the fbdev driver for X. This should put the X-windows system in a framebuffer. From there you can run fbgrab in another console to get the screen shot. I tested this on a 1920x1080 laptop running antiX live and it worked. I got a full screen screen shot of the display manager (SLiM). As root (in another console), I ran the command:

Code: Select all

fbgrab -C 7 -s 10 dm.png
This caused it to sleep 10 seconds before taking a screen shot of tty7. The main difficulty may be getting a good resolution in the framebuffer. I did this live using "nomodeset xorg=fbdev". On that laptop I was able to use the F7 Console menu to get the full 1920x1980 resolution of the screen.

I tried using "scrot" to do the same thing without having to use fbdev but I wasn't able to get the right permission. Once the user was looged in I could get a screen shot from a virtual console with:

Code: Select all

chvt 7 ; sleep 2 ; env DISPLAY=:0.0 scrot screen.png ; chvt 2
Perhaps it would have worked with the display manager if I tried running as root.

Re: logon screen screenshot ?

Posted: Mon Apr 15, 2019 9:08 am
by KoO
Damn my draft did not save..
I have tried two & three will post tomorrow need sleep work morning..

Re: logon screen screenshot ?

Posted: Mon Apr 15, 2019 9:16 am
by malspa
I've used the 2nd approach that I found here ("Better but slightly complicated way of taking screenshot of login screen in Ubuntu and other Linux"): https://itsfoss.com/screenshot-login-sc ... ntu-linux/

But my notes on this are over 3 years old -- did it with Debian Jessie (Xfce). I'll have to test it out again and see.

Re: logon screen screenshot ?

Posted: Mon Apr 15, 2019 9:42 am
by malspa
Tried it in one of my Arch installations just now:

Image

My notes on this are missing a few steps, though -- I'll have to clean them up before I post them here, unless somebody else beats me to it (or finds an easier approach for MX).

Re: logon screen screenshot ?

Posted: Mon Apr 15, 2019 10:52 am
by malspa
Okay, I've tried this again with Debian Stretch Xfce, should work in MX (but I'm using sudo instead of su). Here's what I did:

- First, made sure imagemagick was installed (apt search imagemagick).

- Created the file ~/screenshot.sh with the following contents:

Code: Select all

chvt 7; sleep 5s; DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 xwd -root -out ~/screenshot.xwd; convert ~/screenshot.xwd ~/screenshot.png; rm ~/screenshot.xwd
- Made the script executable.

- Logged out of the session.

- Ctrl-Alt-F2 to get to tty2.

- Logged in as normal user, then ran the following:

Code: Select all

$ sudo ./screenshot.sh
That took me back to the login screen and took the screenshot after 5 seconds. Ctrl-Alt-F2 to get back to tty2.

- Next, I ran:

Code: Select all

$ exit
- Ctrl-Alt-F7 to get back to the lightdm login screen. Logged back into Xfce. Copied the screenshot from /root to my home directory with:

Code: Select all

$ sudo cp /root/screenshot.png /home/steve/screenshot.png
Could have simply used the mv command, but since I didn't, went back and deleted the screenshot from /root:

Code: Select all

$ sudo rm /root/screenshot.png
So here's my (boring) lightdm login screen in Stretch Xfce:

Image

Re: logon screen screenshot ?

Posted: Mon Apr 15, 2019 11:06 am
by kmathern
malspa wrote: Mon Apr 15, 2019 9:16 am I've used the 2nd approach that I found here ("Better but slightly complicated way of taking screenshot of login screen in Ubuntu and other Linux"): https://itsfoss.com/screenshot-login-sc ... ntu-linux/

But my notes on this are over 3 years old -- did it with Debian Jessie (Xfce). I'll have to test it out again and see.
That method also works for me.


This is the script I used (I changed it to one command per line instead of all strung together, also added the shebang which wasn't mentioned)

Code: Select all

#!/bin/bash
chvt 7
sleep 5s
DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 xwd -root -out ~/screenshot.xwd
convert ~/screenshot.xwd ~/screenshot.png
rm ~/screenshot.xwd



Image