0

I've recently switched to using the Gnome desktop environment, and most things work smoothly. However, I have two languages installed on my machine(Persian and English) and whenever the screen gets locked while the keyboard is set to Persian, I can't find a way to switch it back to English to unlock the screen. The only way I know of, is to restart the computer.

Searching the internet the only questionable "workaround" I could find was to purge gnome-screensaver and install xscreensaver. But this is not a real solution, because you still can't change the input language, all you can do is kill xscreensaver from one of the non-graphical "virtual terminals".

Edit

I'm running Ubuntu 17.04 64-bit. Running the command gsettings get org.gnome.desktop.input-sources sources outputs:

[('xkb', 'us'), ('xkb', 'ir')]

Also, running cat /etc/default/keyboard returns:

# Check /usr/share/doc/keyboard-configuration/README.Debian for
# documentation on what to do after having modified this file.

# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.

XKBMODEL="pc105"
XKBLAYOUT="us,ir"
XKBVARIANT=","
XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"

# If you don't want to use the XKB layout on the console, you can
# specify an alternative keymap.  Make sure it will be accessible
# before /usr is mounted.
# KMAP=/etc/console-setup/defkeymap.kmap.gz
BACKSPACE="guess"

Workaround:

As mentioned in the comments by Gunnar Hjalmarsson, one can avoid this problem if they switch from LightDM to GDM3.

  • @GunnarHjalmarsson Absolutely. – Ali Jun 1 '17 at 10:59
  • Did you set a custom shortcut to change between them? – Muaad ElSharif Jun 1 '17 at 12:11
  • One more question: Did you swich to the GDM display manager, or are you still using LightDM? – Gunnar Hjalmarsson Jun 1 '17 at 17:32
  • @MuaadElSharif As you can see from the output of cat /etc/default/keyboard , the toggle for switching language is Alt+Shift which I believe is the default settings. – Ali Jun 1 '17 at 17:36
  • 1
    Also, <Alt>+<Shift> is not default. <Super>+<Space> is. – Gunnar Hjalmarsson Jun 1 '17 at 18:23
2

There are currently some issues with using Ubuntu's default display manager LightDM together with GNOME shell. So switching from LightDM to GNOME's GDM might help.

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.