I use Ubuntu 18.04.

When i boot up the system and login screen shows up, it loads some settings that i don't like and would like to change them.Namely

  • keyboard layout
  • mouse sensitivity
  • screen resolution

However at the login screen i don't have any option to change settings. And as soon as i login to an account, i can only change settings for that account and the login screen remains unchanged.

Obviously the settings has to be loaded from somwhere. Is there some hidden user that stores these settings? Or is it stored under root? Or any other special configuration file?

I tried to google this problem, but such question does not appear anywhere.

So can you please help me to change those settings for the login screen?

  • @PRATAP Ubuntu 18 – Youda008 Dec 11 '19 at 10:07

OS: Ubuntu 18.04.3
Tested in Ubuntu 18.04.3


QP1. Keyboard Layout:

Say, If you have 4 keyboard layouts, they will be shown in the file /etc/default/keyboard. The order in this file will show you at login.


enter image description here

enter image description here

QP2. Mouse Sensitivity:

If I understood "Mouse Sensitivity" Correctly, Mouse Speed in the below Image.

enter image description here

This can be achieved with below command

sudo -Hu gdm dbus-launch gsettings set org.gnome.desktop.peripherals.mouse speed '1.0'

Change the value in above command between -1.0 to 1.0 slow to fast

Reboot is required to take the effect.

QP3. Login Screen Resolution:

There are related Questions for this..

Ubuntu 18.04 login screen Display settings
How do I change gdm3 login screen resolution?

following the first link above, I could successfully configure Login Screen Resolutions..

This Solved my Isuue:

Go into Settings > Devices > Displays and configure your monitors the way you want for your login screen (in your case, internal laptop display disabled). Click the "Save" button when done.

Copy your user's monitors.xml file into the home folder for gdm user.

To copy the monitors.xml file, open a terminal and perform the following:

sudo cp ~/.config/monitors.xml ~gdm/.config/monitors.xml
sudo chown gdm:gdm ~gdm/.config/monitors.xml

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

  • What exactly you need to clarify about the keyboard layout? There is the switch in the top left corner, but everytime i boot the system, it is again set to 'us', i need to switch the default. – Youda008 Dec 22 '19 at 19:16
  • top left?? you mean top right.. OK how many languages are shown and which one you want by default? is your pw set in other language? – UnKNOWn Dec 22 '19 at 19:22
  • I figured it out, the input sources in the languages settings can be reordered and this order seems to be global, so the first in the list is the default for login screen. It was stupid from me to ask this question. – Youda008 Dec 22 '19 at 19:42
  • However your resolution change does not work for me. I change the resolution as a user, but as soon as i log out, it changes back to the default, which i don't know where it is stored. – Youda008 Dec 22 '19 at 19:43
  • 1
    Thank you for your effort. However even this trick with gdm still did not work. I copied the file, changed the owner, double-checked that the file is there and permissions are correct, but on logout or reboot it still switches to the old resolution. I'm starting to suspect VirtualBox causing this problem. – Youda008 Dec 22 '19 at 20:41

The elusive login screen settings you were searching for are stored here:


The reason you can't change login screen settings for keyboard and mouse is explained in a bug report:

The login screen runs as user 'gdm' which is not privileged. That means it has no access to retrieve your personal settings until after you have entered a password. So it uses the system defaults.

You should subscribe to the bug report. The bug was filed June 28, 2018 but only has one subscriber as of December 21, 2019.

Setting Grub resolution

The key to changing your login screen resolution is changing grub's resolution:

To summarize the link, in /etc/default/grub:

Use the down arrow or Page Down until you see the line that looks like this:


Below that line, enter the following, substituting the 1920x1080 for a supported resolution:


Setting default keyboard layout

To set the default keyboard layout change /etc/default/keyboard as described here:

  • thanks for info, however things as default keyboard layout or default resolution are not in the file – Youda008 Dec 22 '19 at 19:27
  • 1
    @Youda008 I updated answer with changing grub resolution which carries over to login screen. – WinEunuuchs2Unix Dec 22 '19 at 19:38
  • I also updated the answer for default keyboard layout. – WinEunuuchs2Unix Dec 22 '19 at 19:44
  • It's /etc/defaut/grub, not /etc/grub/default. But unfortunatelly, that did not work. The grub itself will run at the changed resolution, but then the login screen will be back at its default. – Youda008 Dec 22 '19 at 20:20
  • Thanks for pointing out the typo. I've fixed that. The answer for grub resolution was not my own and I was just quoting what it said. What resolution are you trying to get and what are you getting instead? – WinEunuuchs2Unix Dec 22 '19 at 23:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.