m4jq
19 September 2021 11:31
1
hi!
i added my script to autostart but it did not load at startup… i dont know why.
this is my script (it works when i execute it manually from terminal):
#!/bin/bash
xmodmap -e "keycode 51 Shift_L = Return numbersign"
xmodmap -e "keycode 94 Shift_L = backslash bar"
xmodmap -e "keycode 48 Shift_L = apostrophe at"
xmodmap -e "keycode 11 Shift_L = 2 quotedbl"
exit 0
and .desktop file
[Desktop Entry]
Exec=/home/mike/.config/keymap.sh
Name=Keymap
Comment=Change keys
Type=Application
Icon=applications-system
StartupNotify=false
X-GNOME-Autostart-enabled=true
Terminal=false
Hello,
m4jq:
xmodmap
That will only work on X11 session and not in Wayland, also is kind of outdated method and you actually have to define your list of keycodes inside the ~/.Xmodmap
file, some like this:
keycode 51 Shift_L = Return numbersign
keycode 94 Shift_L = backslash bar
keycode 48 Shift_L = apostrophe at
keycode 11 Shift_L = 2 quotedbl
and your startup .desktop file should be something like:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Correct keys layout
Exec=/usr/bin/xmodmap ~/.Xmodmap
Terminal=false
StartupNotify=false
Categories=Application;
X-GNOME-Autostart-enabled=true
Better look into xkb
… or look for an alternative if you are using wayland.
1 Like
system
Closed
22 September 2021 20:43
3
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.