Archives For GDM

Ubuntu lists all the available user accounts in the GDM login screen. You can however remove them to protect your privacy.

Gnome, the default desktop environment, has a hidden option to force users to type the username and then password to login. If you’re working on public places, it will be good to enable this option for privacy concern.

1.) Firstly open terminal either from system app launcher or by pressing Ctrl+Alt+T on keyboard. Because the login screen is handled by gdm, you have to firstly run command to allows it to make connections to X server.

xhost SI:localuser:gdm

Though it says for X, you also need to run the command in Wayland session to avoid error to disable user list.

2.) Now run gsettings command to disable user list via user gdm:

sudo -u gdm gsettings set org.gnome.login-screen disable-user-list true

Type user password, no asterisk feedback, for sudo prompt and hit Enter.

In next boot, you will no longer see the user accounts. Instead, you need to type username and then password to login.

How to Reset:

To restore the login screen setting, also run both xhost and gsettings commands in a terminal window.

To be lazy, I’ll combine the two commands into single, so it will be:

xhost SI:localuser:gdm && sudo -u gdm gsettings reset org.gnome.login-screen disable-user-list

In addition for more Login Screen settings, e.g, disable ‘Power Off’ menu option, toggle authentications, you can open Dconf Editor (install it first from Ubuntu Software) via user gdm:

xhost SI:localuser:gdm && sudo -u gdm dconf-editor

gnome shell

Boring with the default purple login screen background in Ubuntu 17.10? Well, here’s how to make a change by hacking the css file.

Ubuntu 17.10 switches to Gnome 3 Desktop and GDM display manager. Although there are options to change desktop wallpaper and lock screen background (it’s actually screen saver with date & time displayed), the login screen is always purple.

GDM login background

In the picture above, I’ve changed the login background to the image “Aardvark_Wallpaper_Grey_4096x2304.png” locate in /usr/share/backgrounds.

1. Move your favorite image to /usr/share/backgrounds:

It’s better to move the image you want to set as login background to system pictures folder: /usr/share/backgrounds.

To do so, open terminal via Ctrl+Alt+T, then either run command:

sudo cp PATH/TO/YOUR/IMAGE /usr/share/backgrounds/

or run command to open file browser via root and then do copy and paste in that window:

xhost +local: && sudo nautilus /usr/share/backgrounds/

2. Edit the css file that define GDM login background:

Open terminal (Ctrl+Alt+T) and run command to edit file /etc/alternatives/gdm3.css, which is linked to /usr/share/gnome-shell/theme/gdm3.css:

xhost +local: && sudo gedit /etc/alternatives/gdm3.css

Input your password (no visual feedback while typing) when it prompts and hit Enter. And of course back up the file before editing.

3. When the file opens, go to menu (right after ‘Save’ button) -> find and find out following section:

#lockDialogGroup {
  background: #2c001e url(resource:///org/gnome/shell/theme/noise-texture.png);
  background-repeat: repeat; }

change the lines into:

#lockDialogGroup {
  background: #2c001e url(file:///usr/share/backgrounds/Aardvark_Wallpaper_Grey_4096x2304.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; }

Replace Aardvark_Wallpaper_Grey_4096x2304.png with your picture file name.

Finally save the file and restart your computer to apply changes.

NOTE: these changes may be overwritten in case of an system update with GDM packages. Please let me know if you find a good way to change the GDM3 login background in Ubuntu 17.10.

capture login screen

This simple tutorial shows you how to capture screenshot of the LightDM / GDM login screen in Ubuntu, Elementary OS, or Pear OS.

Besides installing your system as Virtualbox or Vmware Guest OS, we can follow the steps below to capture and share our login screens.

1. Press Ctrl+Alt+T on your keyboard to open terminal. When it opens, run command blow to check out your display manager:

cat /etc/X11/default-display-manager
[email protected]:~$ cat /etc/X11/default-display-manager 
/usr/sbin/lightdm

By default:

  • Ubuntu Unity and Elementary OS Luna uses LightDM
  • Pear OS 8 and Ubuntu Gnome uses GDM

2. Check out the value of $DISPLAY:

echo $DISPLAY
[email protected]:~$ echo $DISPLAY
:0

3. Now create a simple script

echo 'sleep 20; DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/$DISPLAY xwd -root' > /tmp/shot.sh

You may change:

  • 20 : the seconds of delay.
  • :0 : the value of $DISPLAY. In my Pear OS 8, the value of $DISPLAY changes every login ($DISPLAY=$DISPAY +1).
  • lightdm : the display manager.

4. Press Ctrl+Alt+F1 and log into TTY1.

5. Run command below to start the script:

sudo bash /tmp/shot.sh >/tmp/shot.xwd

6. Return to GUI mode by pressing Ctrl+Alt+F1.

7. Logout by normal way. While you can see login screen, wait for some seconds.

8. Login by normal way. Install imagemagick if you don’t have it installed yet.

sudo apt-get install -y imagemagick

9. Run command below and finally you can check out the image under user Pictures folder.

convert /tmp/shot.xwd ~/Pictures/loginscreen.png