I am running Ubuntu 20.04.5 LTS with XFCE on a Dell laptop. When I am using an external keyboard the function keys are not correctly detected- for example in Intellij IDE.
I have a work-around which I got from amazon of all places - someone else who reviewed the keyboard added the snippet and it works fine:
echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode
However this has to be run in a terminal every session.
So I would like to run this (or something like it) automatically - probably every time a user starts a session, But I do not mind if the ode is run multiple times (I think it is idempotent). What is the easiest and safest way to achieve this? I can use command line and have furtled in various bits of the sensitive configuration stuff, but I do not really know what I am doing so cannot easily backout/repair/troubleshoot stuff when I mess up.
Most solutions that I have found involve plumbing something into systemd but I am not sure it should need to be that complicated....
All help gratefully received. (I am happy to dump system information and copy it here - but thought it may be a noisy distraction)
I did try the solution suggested in Keychron Q1 Function Keysbut itmade no difference.
Phill
My apologies for posting the wrong version originally.