You are not logged in.
Pages: 1
Gnome 40 on Arch
This is a recurrent topic apparently but I still cannot understand why setting (for instance)
xmodmap -e "keycode 248 = XF86Launch0"or
sleep 10 && xmodmap -e "keycode 248 = XF86Launch0"in my autostart folder would not work whereas entering the command in the command line runs as expected.
[Desktop Entry]
Name=Keycode 240
Comment=Run sleep 10 && xmodmap -e "keycode 248 = XF86Launch0"
Exec=sleep 10 && xmodmap -e "keycode 248 = XF86Launch0"
Terminal=false
Type=ApplicationLast edited by jfk (2021-11-05 17:04:52)
Offline
The direct version likely gets overridden when gnome applies its xkb config and the second one is bash syntax where it's not supposed to be.
Exec=bash -c 'sleep 10 && touch /tmp/yup.works && xmodmap -e "keycode 248 = XF86Launch0"'Online
Thank you, lenghten sleep to 20 made it work:
bash -c 'sleep 20 && xmodmap -e "keycode 248 = XF86Launch0"'I actually ticked "open in terminal" in my startup GUI thinking I could consequently avoid writing bash. I dont know why I had this in mind.
Last edited by jfk (2021-11-06 01:25:51)
Offline
You *may* not need to execute this in a dedicated bash process, but that vastly depends on how the runner that executes the line actually does so (no idea about gnome)
The 20 second sleep requirement seems excessive, but if that was one requirement, you might actually not have to use a subshell here (but I don't know and you'd have to try)
Online
Pages: 1