logon screen screenshot ?

Post Reply
Message
Author
User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

logon screen screenshot ?

#1 Post 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
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
chrispop99
Global Moderator
Posts: 3171
Joined: Tue Jan 27, 2009 3:07 pm

Re: logon screen screenshot ?

#2 Post by chrispop99 »

I've never found a way.

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: logon screen screenshot ?

#3 Post 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.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: logon screen screenshot ?

#4 Post by KoO »

Damn my draft did not save..
I have tried two & three will post tomorrow need sleep work morning..
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
malspa
Posts: 298
Joined: Thu Jul 13, 2006 7:21 am

Re: logon screen screenshot ?

#5 Post 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.

User avatar
malspa
Posts: 298
Joined: Thu Jul 13, 2006 7:21 am

Re: logon screen screenshot ?

#6 Post 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).
Last edited by malspa on Mon Apr 15, 2019 11:05 am, edited 1 time in total.

User avatar
malspa
Posts: 298
Joined: Thu Jul 13, 2006 7:21 am

Re: logon screen screenshot ?

#7 Post 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

User avatar
kmathern
Developer
Posts: 2402
Joined: Wed Jul 12, 2006 2:26 pm

Re: logon screen screenshot ?

#8 Post 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

Post Reply

Return to “antiX”