Set Language Sources Key from Command Line
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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:
This is how it shows up in dconf-editor
:
command-line input-language
add a comment |Â
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:
This is how it shows up in dconf-editor
:
command-line input-language
It looks like the only keys being changed aresources
andxkb-options
. You could simply set those keys to the values seen here usinggsettings
â muru
Feb 5 at 14:41
add a comment |Â
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:
This is how it shows up in dconf-editor
:
command-line input-language
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:
This is how it shows up in dconf-editor
:
command-line input-language
command-line input-language
asked Feb 5 at 13:50
PenguinCSC
905814
905814
It looks like the only keys being changed aresources
andxkb-options
. You could simply set those keys to the values seen here usinggsettings
â muru
Feb 5 at 14:41
add a comment |Â
It looks like the only keys being changed aresources
andxkb-options
. You could simply set those keys to the values seen here usinggsettings
â 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
add a comment |Â
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']"
thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set toSuper+Space
(god knows why...) and I'd like to change it toALT+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
add a comment |Â
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']"
thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set toSuper+Space
(god knows why...) and I'd like to change it toALT+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
add a comment |Â
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']"
thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set toSuper+Space
(god knows why...) and I'd like to change it toALT+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
add a comment |Â
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']"
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']"
edited Feb 5 at 15:24
answered Feb 5 at 14:17
![](https://i.stack.imgur.com/aZsF6.jpg?s=32&g=1)
![](https://i.stack.imgur.com/aZsF6.jpg?s=32&g=1)
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 toSuper+Space
(god knows why...) and I'd like to change it toALT+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
add a comment |Â
thanks Gunnar, but it seems I wasn't clear: Right after installing Ubuntu, the default key combination to switch between sources is set toSuper+Space
(god knows why...) and I'd like to change it toALT+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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
It looks like the only keys being changed are
sources
andxkb-options
. You could simply set those keys to the values seen here usinggsettings
â muru
Feb 5 at 14:41