7

before doing the upgrade to Ubuntu 13.10 I was using two layouts for the Keyboard - GR & DE. I was able to set both in one .xmodmap, means I was able to configure GR and DE. Now, when I create a .xmodmap it contains only the layout I currently use, but I want both layouts to be in. How can I achieve this?

3

I have not solved this problem on 14.04, but I know that this bug keyboard-indicator. After the change of layout, xmodmap settings are reset. I made a script that resets the settings after changing the layout. I hope it will be useful to someone realties.

#!/usr/bin/env python

import os, dbus, gobject
from dbus.mainloop.glib import DBusGMainLoop

def event_handler(args):
        if args == "com.canonical.indicator.keyboard":
                os.system("xmodmap ~/.Xmodmap")

dbus.mainloop.glib.DBusGMainLoop(set_as_default = True)

bus = dbus.SessionBus()
bus.add_signal_receiver(event_handler,
                        dbus_interface="com.canonical.Unity.Panel.Service",
                        signal_name="ReSync")

loop = gobject.MainLoop()
loop.run()
  • Yo man! Thanks for the workaround. It works for me. How I did it: 1) nano fix_ubuntu_layout_switch 2) paste the script there (possibly replacing ~/.Xmodmap with ~/.xmodmap) 3) Ctrl + X, Ctrl + Y, Enter - to save the file 4) Make the script executable: chmod a+x fix_ubuntu_layout_switch 5) Run it: "./fix_ubuntu_layout_switch &" 6) It works 7) Add the script to the system startup (maybe add it to ~/.xinitrc) – asdfasdfads Mar 23 '15 at 12:23
1

yup this absolutely a bug in 13.10 , I found a solution for this issue "at least for me" , first update your system , install "gnome-tweak-tool" :

sudo apt-get install gnome-tweak-tool

go to "typing" option change "key(s) to change layout" to "alt+shift" then Click on "Alt/Win key behavior" and Select "Control is mapped to Win keys (and the usual ctrl key)."

I hope this will help somebody

1

I confirm this and confirm that it happens in xkb tool as well (so no workaround from there). The xmodmap / xkb modifications are being reset in between layout changes (I use FI-US).

There is several bugs relating to issue here and maybe the closest one to it is this:

https://bugs.launchpad.net/ubuntu/+source/indicator-keyboard/+bug/1215826

(I didn't found the workaround configuration option in comment #34)

I removed new keyboard-indicator, but it only resolved issue that it will not reset xmodmap when focusing other windows.

My current knowledge:

Use either keyboard modifications or layouts, but you can't use both as you could expect. Nasty thing is that this might be not be fixed any time soon (launch bug reports are still open).

Somewhat regression related:

I also found one same kind of bug from unity as well (where I have seen same problem as well, but very infrequently), here is related launchBug:

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1084451

Edit:

gnome-tweak-tool from repos crashes to segfault (known bug in launchBug, but my reputation forbids me to link it here).

0

Confirm this with 13.10! When I run xmodmap ~/.Xmodmap manually it works only until changing layout to another.

Same settings works perfectly in 13.04..

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.