I have LMMS installed on my Ubuntu MATE laptop. When I'm playing around with the synths, I need to have the setting that repeats keys when they're held off so I can play the synth with the keyboard. How can I change the setting when LMMS starts and revert it when it is closed, if possible?
The setting in question:
Why don’t you enable it aways !? It can be done by a script . (Starting the application and the options turns on)
This little script may work for you
- run htop and search for the program name
- replace caja with program name
3.Add script to system start
#!/bin/bash +x
ron=$(dconf write /org/mate/desktop/peripherals/keyboard/repeat true)
roff=$(dconf write /org/mate/desktop/peripherals/keyboard/repeat false)
while :
do
if pgrep “caja” > /dev/null
then
$ron
else
$roff
fi
done
@IvCHo Could you explain it a little more? I don’t have much experience with bash scripts and such.
Basicly you need to run htop or top to see proces name of LMMS . Get the proces name and replace it with caja in the script
It checks if LMMS is running if LMMS is running it changes the option to true (you can hold your key and will repeat it) if not it will switch off the option to repeat the key .
you can add sleep 10 before done to increase the interval of checking if the app is running .
Add it to autostart and test it . (For me did not work becouse i have mistirious problem that i can’t write schema with dconf but it should work for you) .
What are “htop” and “autostart”?
htop is advenced version of top . It is command line tool .
Autostart are the programs start automaticly . (Enter control center and type autostart)
Ok, so how do I run htop?
Open terminal and write top and enter . Htop is not installed on your system . You can install it via apt-get install htop
Now how do I get to autostart? Going to Control Center and typing “autostart” did not do anything.
I see wath my problem is . The correct key path is diffirent then the one I entered . I edited the script to work properly
!/bin/bash +x
ron=$(dconf write /org/mate/desktop/peripherals/keyboard/repeat true)
roff=$(dconf write /org/mate/desktop/peripherals/keyboard/repeat false)
while :
do
if pgrep “name-here” > /dev/null
then
$ron
else
$roff
fi
done