Set Language Sources Key from Command Line

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I'd like to change the settings for Language Switcher from the command line (as part of a bash script I run after a fresh installation of Ubuntu 16.04 LTS) to be like in the screenshot:



enter image description here



This is how it shows up in dconf-editor:



enter image description here










share|improve this question





















  • It looks like the only keys being changed are sources and xkb-options. You could simply set those keys to the values seen here using gsettings
    – muru
    Feb 5 at 14:41














up vote
0
down vote

favorite












I'd like to change the settings for Language Switcher from the command line (as part of a bash script I run after a fresh installation of Ubuntu 16.04 LTS) to be like in the screenshot:



enter image description here



This is how it shows up in dconf-editor:



enter image description here










share|improve this question





















  • It looks like the only keys being changed are sources and xkb-options. You could simply set those keys to the values seen here using gsettings
    – muru
    Feb 5 at 14:41












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'd like to change the settings for Language Switcher from the command line (as part of a bash script I run after a fresh installation of Ubuntu 16.04 LTS) to be like in the screenshot:



enter image description here



This is how it shows up in dconf-editor:



enter image description here










share|improve this question













I'd like to change the settings for Language Switcher from the command line (as part of a bash script I run after a fresh installation of Ubuntu 16.04 LTS) to be like in the screenshot:



enter image description here



This is how it shows up in dconf-editor:



enter image description here







command-line input-language






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 5 at 13:50









PenguinCSC

905814




905814











  • It looks like the only keys being changed are sources and xkb-options. You could simply set those keys to the values seen here using gsettings
    – muru
    Feb 5 at 14:41
















  • It looks like the only keys being changed are sources and xkb-options. You could simply set those keys to the values seen here using gsettings
    – muru
    Feb 5 at 14:41















It looks like the only keys being changed are sources and xkb-options. You could simply set those keys to the values seen here using gsettings
– muru
Feb 5 at 14:41




It looks like the only keys being changed are sources and xkb-options. You could simply set those keys to the values seen here using gsettings
– muru
Feb 5 at 14:41










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Changing to Hebrew (second item in the sources list):



gsettings set org.gnome.desktop.input-sources current 1


Changing to English (US) (first item in the sources list):



gsettings set org.gnome.desktop.input-sources current 0


Note: This does not apply as from Ubuntu 17.10, since it uses GNOME and the keys for the purpose are slightly different.



Edit:



Changing the shortcut for switching input source to "Shift+Alt L":



gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"





share|improve this answer






















  • thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set to Super+Space (god knows why...) and I'd like to change it to ALT+Shift L from within a bash script I run post-installation.
    – PenguinCSC
    Feb 5 at 14:21











  • @PenguinCSC: Ok, I edited my answer.
    – Gunnar Hjalmarsson
    Feb 5 at 15:25










  • Great! Worked! My only problem - I run the script as superuser. This change is user specific. Is there a way to set it globally - so every user that logs in to that machine gets this setting as a default?
    – PenguinCSC
    Feb 6 at 10:21










  • @PenguinCSC: This is untested, but editing /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml may be what you want.
    – Gunnar Hjalmarsson
    Feb 6 at 10:38











  • Looks promising. I'll try. Thank you!
    – PenguinCSC
    Feb 6 at 13:34










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1003260%2fset-language-sources-key-from-command-line%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Changing to Hebrew (second item in the sources list):



gsettings set org.gnome.desktop.input-sources current 1


Changing to English (US) (first item in the sources list):



gsettings set org.gnome.desktop.input-sources current 0


Note: This does not apply as from Ubuntu 17.10, since it uses GNOME and the keys for the purpose are slightly different.



Edit:



Changing the shortcut for switching input source to "Shift+Alt L":



gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"





share|improve this answer






















  • thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set to Super+Space (god knows why...) and I'd like to change it to ALT+Shift L from within a bash script I run post-installation.
    – PenguinCSC
    Feb 5 at 14:21











  • @PenguinCSC: Ok, I edited my answer.
    – Gunnar Hjalmarsson
    Feb 5 at 15:25










  • Great! Worked! My only problem - I run the script as superuser. This change is user specific. Is there a way to set it globally - so every user that logs in to that machine gets this setting as a default?
    – PenguinCSC
    Feb 6 at 10:21










  • @PenguinCSC: This is untested, but editing /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml may be what you want.
    – Gunnar Hjalmarsson
    Feb 6 at 10:38











  • Looks promising. I'll try. Thank you!
    – PenguinCSC
    Feb 6 at 13:34














up vote
0
down vote













Changing to Hebrew (second item in the sources list):



gsettings set org.gnome.desktop.input-sources current 1


Changing to English (US) (first item in the sources list):



gsettings set org.gnome.desktop.input-sources current 0


Note: This does not apply as from Ubuntu 17.10, since it uses GNOME and the keys for the purpose are slightly different.



Edit:



Changing the shortcut for switching input source to "Shift+Alt L":



gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"





share|improve this answer






















  • thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set to Super+Space (god knows why...) and I'd like to change it to ALT+Shift L from within a bash script I run post-installation.
    – PenguinCSC
    Feb 5 at 14:21











  • @PenguinCSC: Ok, I edited my answer.
    – Gunnar Hjalmarsson
    Feb 5 at 15:25










  • Great! Worked! My only problem - I run the script as superuser. This change is user specific. Is there a way to set it globally - so every user that logs in to that machine gets this setting as a default?
    – PenguinCSC
    Feb 6 at 10:21










  • @PenguinCSC: This is untested, but editing /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml may be what you want.
    – Gunnar Hjalmarsson
    Feb 6 at 10:38











  • Looks promising. I'll try. Thank you!
    – PenguinCSC
    Feb 6 at 13:34












up vote
0
down vote










up vote
0
down vote









Changing to Hebrew (second item in the sources list):



gsettings set org.gnome.desktop.input-sources current 1


Changing to English (US) (first item in the sources list):



gsettings set org.gnome.desktop.input-sources current 0


Note: This does not apply as from Ubuntu 17.10, since it uses GNOME and the keys for the purpose are slightly different.



Edit:



Changing the shortcut for switching input source to "Shift+Alt L":



gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"





share|improve this answer














Changing to Hebrew (second item in the sources list):



gsettings set org.gnome.desktop.input-sources current 1


Changing to English (US) (first item in the sources list):



gsettings set org.gnome.desktop.input-sources current 0


Note: This does not apply as from Ubuntu 17.10, since it uses GNOME and the keys for the purpose are slightly different.



Edit:



Changing the shortcut for switching input source to "Shift+Alt L":



gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"






share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 5 at 15:24

























answered Feb 5 at 14:17









Gunnar Hjalmarsson

18.1k23061




18.1k23061











  • thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set to Super+Space (god knows why...) and I'd like to change it to ALT+Shift L from within a bash script I run post-installation.
    – PenguinCSC
    Feb 5 at 14:21











  • @PenguinCSC: Ok, I edited my answer.
    – Gunnar Hjalmarsson
    Feb 5 at 15:25










  • Great! Worked! My only problem - I run the script as superuser. This change is user specific. Is there a way to set it globally - so every user that logs in to that machine gets this setting as a default?
    – PenguinCSC
    Feb 6 at 10:21










  • @PenguinCSC: This is untested, but editing /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml may be what you want.
    – Gunnar Hjalmarsson
    Feb 6 at 10:38











  • Looks promising. I'll try. Thank you!
    – PenguinCSC
    Feb 6 at 13:34
















  • thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set to Super+Space (god knows why...) and I'd like to change it to ALT+Shift L from within a bash script I run post-installation.
    – PenguinCSC
    Feb 5 at 14:21











  • @PenguinCSC: Ok, I edited my answer.
    – Gunnar Hjalmarsson
    Feb 5 at 15:25










  • Great! Worked! My only problem - I run the script as superuser. This change is user specific. Is there a way to set it globally - so every user that logs in to that machine gets this setting as a default?
    – PenguinCSC
    Feb 6 at 10:21










  • @PenguinCSC: This is untested, but editing /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml may be what you want.
    – Gunnar Hjalmarsson
    Feb 6 at 10:38











  • Looks promising. I'll try. Thank you!
    – PenguinCSC
    Feb 6 at 13:34















thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set to Super+Space (god knows why...) and I'd like to change it to ALT+Shift L from within a bash script I run post-installation.
– PenguinCSC
Feb 5 at 14:21





thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set to Super+Space (god knows why...) and I'd like to change it to ALT+Shift L from within a bash script I run post-installation.
– PenguinCSC
Feb 5 at 14:21













@PenguinCSC: Ok, I edited my answer.
– Gunnar Hjalmarsson
Feb 5 at 15:25




@PenguinCSC: Ok, I edited my answer.
– Gunnar Hjalmarsson
Feb 5 at 15:25












Great! Worked! My only problem - I run the script as superuser. This change is user specific. Is there a way to set it globally - so every user that logs in to that machine gets this setting as a default?
– PenguinCSC
Feb 6 at 10:21




Great! Worked! My only problem - I run the script as superuser. This change is user specific. Is there a way to set it globally - so every user that logs in to that machine gets this setting as a default?
– PenguinCSC
Feb 6 at 10:21












@PenguinCSC: This is untested, but editing /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml may be what you want.
– Gunnar Hjalmarsson
Feb 6 at 10:38





@PenguinCSC: This is untested, but editing /usr/share/glib-2.0/schemas/org.gnome.desktop.wm.keybindings.gschema.xml may be what you want.
– Gunnar Hjalmarsson
Feb 6 at 10:38













Looks promising. I'll try. Thank you!
– PenguinCSC
Feb 6 at 13:34




Looks promising. I'll try. Thank you!
– PenguinCSC
Feb 6 at 13:34

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1003260%2fset-language-sources-key-from-command-line%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Which professions warranted travel in Medieval times?

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error