1

I am using "Ubuntu Xorg" inside of Ubuntu 21.10, cause on normal Ubuntu it was not possible for me to set up xmodmap inside of gnome applications (e.g. Firefox, LibreOffice, Terminal). My aim with xmodmap is to reconfigure the keys "AltGr" + "y" and "AltGr" + "x". And I don't found some other applications inside of Linux to do that.

My wish now is to fix the settings on login. So I worked all the solutions from this post, but nothing helps. This solutions are working inside of the other Ubuntu configuration, but not inside of Ubunto Xorg. How can I set xmodmap on autostart inside of Ubuntu Xorg?

1 Answers1

1

You could try to add this to your shell start profile for example. It should work if you've set a terminal as a startup application. However, it might slowdown subsequent terminals. But probably only on first launch. You will need to modify this to check for what your particular remap value will return.

# ~/.zshrc
mysetting=$(xmodmap -pke | grep 135)
if [ $mysetting != 'keycode 135 = Control_R NoSymbol Control_R' ]; then
  sleep 4 && xmodmap ~/.Xmodmap &
fi

lacostenycoder
  • 538
  • 1
  • 6
  • 15