capture login screen-not sucssecful

yin*_*non 7 login-screen capture screenshot 12.04 xserver

I'm using Ubuntu 12.04 . If more information is needed, please tell me. I Tried some guides to cature my login screen:

How can I take a screenshot of the login screen?

http://www.howtoforge.com/how-to-take-a-screenshot-of-your-login-screen

I tried the first one, but after running:

$ sudo bash /tmp/shot.sh >/tmp/shot.xwd
Run Code Online (Sandbox Code Playgroud)

I'm getting this:

No protocol specified
No protocol specified    
xwd unable to open display ':0'
Run Code Online (Sandbox Code Playgroud)

and i'm getting an xwd file in my tmp folder. running the other commands giving errors.

tried the second one, after running:

chvt 8; sleep 5; XAUTHORITY=/var/gdm/:0.Xauth DISPLAY=:0.0 import -window root /tmp/gdm-login-shot.png
Run Code Online (Sandbox Code Playgroud)

I got:

No protocol specified
No protocol specified
import: unable to open X server ':0.0' @ error/import.c/ImportImageCommand/366 
Run Code Online (Sandbox Code Playgroud)

Many Thanks for helping (:

EDIT to vine_user: here the output from the terminal-I cacked it from within the system while I'm looged in:

ubuntu@PrecisePangolin:~$ echo 'sleep 5; DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/$DISPLAYDISPLAY xwd -root' > /tmp/shot.sh
ubuntu@PrecisePangolin:~$ sudo bash /tmp/shot.sh >/tmp/shot.xwd
bash: /tmp/shot.xwd: Permission denied
ubuntu@PrecisePangolin:~$ sudo su
root@PrecisePangolin:/home/ubuntu#  sudo bash /tmp/shot.sh >/tmp/shot.xwd
No protocol specified
No protocol specified
xwd:  unable to open display ':0'
root@PrecisePangolin:/home/ubuntu#
Run Code Online (Sandbox Code Playgroud)

EDIT 2!: HERE IT IS!: 在此处输入图片说明

just uploading-this uploadong site is better than other iuset to use (: : 在此处输入图片说明

vin*_*ser 4

步骤1:

使用以下命令创建/tmp/shot.sh

echo 'sleep 20; DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/$DISPLAY xwd -root' > /tmp/shot.sh
Run Code Online (Sandbox Code Playgroud)

您可以适当更改秒数sleep

第2步:

Ctrl按+ Alt+登录到文本模式F1

步骤3:

执行该命令;

 sudo bash /tmp/shot.sh >/tmp/shot.xwd
Run Code Online (Sandbox Code Playgroud)

步骤4:

Ctrl按+ Alt+返回 GUI 模式F7

步骤5:

通过正常方式注销。当您可以看到登录屏幕时,请等待几秒钟。

第6步:

通过正常方式登录。并在终端中执行此命令;

convert /tmp/shot.xwd /tmp/shot.png
Run Code Online (Sandbox Code Playgroud)

imagemagick(如果您还没有安装,则需要安装)

因此,您可以使用此命令查看图片;

eog /tmp/shot.png
Run Code Online (Sandbox Code Playgroud)

参考:http ://ptspts.blogspot.jp/2010/02/how-to-create-screen-shot-of-gdm-login.html

在 12.04 中,它的不同之处在于使用lightdm