D
D
Dmitry Ilnitsky2015-04-19 14:22:21
bash
Dmitry Ilnitsky, 2015-04-19 14:22:21

How to force Ubuntu 14.10 to respect selected layout?

After my experiments with setting layouts like in Win, I completely lost the ability to switch them. The only available was the American layout. The layout switcher works, the icon on the top panel changes, but it does not produce any effect on the printed text.
In order to somehow use the Cyrillic alphabet, I built myself such a bash-crutch:
#!/bin/bash
declare -a layout_set=('us' 'ru(winkeys)' 'ua(winkeys)');
curr_layout=`setxkbmap -query | grep "layout" | awk '{print $2}'`;
layout_count=${#layout_set[@]};
for (( i=0; i<$layout_count; i++ ));
do
if [ ${layout_set[$i]} == $curr_layout ]
then
cur_layout_num=$i;
fi
done
next_layout_num=$(($cur_layout_num + 1));
if [ $next_layout_num -eq $layout_count ]
then
next_layout_num=0;
fi
setxkbmap -layout ${layout_set[$next_layout_num]};
It works great, but Ubuntu doesn't allow you to assign it to Ctrl+Shift, so you have to use Super+Space. Well, besides, I can’t see the current layout, because the layout indicator shows something completely wrong.
Ubuntu 14.10. The standard switch works in the guest account as well.
Can anyone help me get my old switch back? Well, or at least upgrade the script so that it changes the icon on the panel and works with Ctrl + Shift. I can create a new user, but I really don’t want to do this, the profile is already overgrown with settings and programs, and I want to figure out what’s wrong. I just don't know where to dig.
Maybe you can somehow compare the contents of the files in the two folders and display the difference? I would compare the Guest and myself and maybe I would find the right entry.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xibir, 2015-04-19
@xibir

Already in all DE (KDE, LXDE, XFCE) everything is fine with languages ​​from the GUI. Unity in ubuntu, never used it, maybe they still don't know how.
Once upon a time I ran such a script, maybe it will help:
#!/bin/sh
setxkbmap -model pc105
setxkbmap us,ru winkeys
setxkbmap -option # clear all options
setxkbmap -option grp:alt_caps_toggle,grp_led:scroll

N
Nazar Mokrinsky, 2015-04-19
@nazarpc

Look on the net, honestly, a thousand times already, only I wrote this and pointed it out with my nose. The last time my remark was mentioned on Habré was in the announcement of the release of eOS Freya (at the end of the article).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question