{"id":3286,"date":"2014-05-10T09:04:59","date_gmt":"2014-05-10T09:04:59","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=3286"},"modified":"2024-04-22T15:18:38","modified_gmt":"2024-04-22T15:18:38","slug":"capture-your-lightdm-login-screen-in-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2014\/05\/capture-your-lightdm-login-screen-in-ubuntu-14-04\/","title":{"rendered":"Capture Your LightDM Login Screen in Ubuntu Unity"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/01\/unity_logo_icon.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2901\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/01\/unity_logo_icon.jpg\" alt=\"capture lightdm log-in screen\" width=\"250\" height=\"200\" \/><\/a><\/p>\n<p>This quick tutorial is going to show you how to capture LightDM Unity Greeter, the log in screen, in <b>Ubuntu with Unity Desktop Environment.<\/b><\/p>\n<p>Besides installing Ubuntu as a guest OS via Virtualbox or VMware Player, there&#8217;s no graphical screenshot tool to capture the log-in screen.<\/p>\n<p>However, you can use the LightDM test mode to preview your login screen and take a screenshot:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/05\/lxqt-session.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-3288\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/05\/lxqt-session-1024x575.jpg\" alt=\"capture login screen\" width=\"610\" height=\"342\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/05\/lxqt-session-1024x575.jpg 1024w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/05\/lxqt-session-300x168.jpg 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/05\/lxqt-session.jpg 1366w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p><b>METHOD 1:<\/b> <i>(Thanks to Vladimir)<\/i><\/p>\n<p>1. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to install required package:<\/p>\n<pre style=\"border: none;\">sudo apt-get install xserver-xephyr<\/pre>\n<p>2. If you&#8217;ve changed Unity Greeter appearances: <a href=\"https:\/\/ubuntuhandbook.org\/index.php\/2014\/04\/ubuntu-14-04-change-login-screen-background-remove-the-white-dots\/\" target=\"_blank\" rel=\"noopener\"> remove the white dots or set login background different to user&#8217;s desktop wallpaper<\/a>, switch to user <b>lightdm<\/b> by running below commands one by one:<\/p>\n<pre style=\"border: none;\">sudo -i\r\n\r\nxhost +SI:localuser:lightdm\r\n\r\nsu lightdm -s \/bin\/bash<\/pre>\n<p>3. Run below command to preview your Login screen and take a screenshot:<\/p>\n<pre style=\"border: none;\">lightdm --test-mode<\/pre>\n<p><b>Method 2:<\/b> Capture Login Screen via a simple script:<\/p>\n<p>1. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run the command below to create the script:<\/p>\n<pre style=\"border: none;\">echo 'sleep 30; DISPLAY=:0 XAUTHORITY=\/var\/run\/lightdm\/root\/$DISPLAY xwd -root' &gt; \/tmp\/shot.sh<\/pre>\n<p>This will create a script <b>shot.sh<\/b> under \/tmp\/ directory. It will capture your display with 30 seconds delay.<\/p>\n<p>2. Now switch to command console by pressing <b>Ctrl+Alt+F2<\/b>, log in with your username and password.<\/p>\n<p>3. When you&#8217;re in, run the script via:<\/p>\n<pre style=\"border: none;\">sudo bash \/tmp\/shot.sh &gt;\/tmp\/shot.xwd<\/pre>\n<p>4. Press <b>Ctrl+Alt+F7<\/b> to switch back to graphical session and log out by normal way. While you can see login screen, wait for some seconds.<\/p>\n<p>5. Login by normal way. And install imagemagick and convert your screenshot:<\/p>\n<pre style=\"border: none;\">sudo apt-get install imagemagick\r\n\r\nconvert \/tmp\/shot.xwd loginscreen.png<\/pre>\n<p>Finally open &#8220;loginscreen.png&#8221; with your favorite image viewer and see the magic!<\/p>","protected":false},"excerpt":{"rendered":"<p>This quick tutorial is going to show you how to capture LightDM Unity Greeter, the log in screen, in Ubuntu with Unity Desktop Environment. Besides installing Ubuntu as a guest OS via Virtualbox or VMware Player, there&#8217;s no graphical screenshot tool to capture the log-in screen. However, you can use the LightDM test mode to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1075,855],"class_list":["post-3286","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-capture-login-screen","tag-ubuntu-14-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=3286"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3286\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=3286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=3286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=3286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}