In Ubuntu 16.04 I have 2 input methods (keyboard layouts) configured, CZ (default) and US. Also I have enabled different input methods for different windows. This configuration works as expected and so far I like it, but I would like to modify its behavior in one special case.
I would like to set the initial layout of a terminal window (GNOME Terminal) to US. The problem is that now, when I open the terminal window, a default language or the language of the previous window (according to the configuration) is used, which is not US every time.
I tried to add setxkbmap -layout us to ~/.bashrc, it changed the layout, but the layout indicator (in the top right corner) did not change and when the terminal window lost and regained focus, the modification done by setxkbmap was no longer applied. It seems to me that the daemon which takes care of managing per-window layouts didn't register the modificatin by setxkbmap. A command which tells the daemon to use a given layout for the actual window would probably solve my problem.