I would like to enable "focus follows mouse" bahavior in LXDE. How can I do it?
I would prefer a command-line solution.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
This assumes you are using openbox as the default file manager. I mainly know a GUI application of openbox configuration manager.
obconf, click on the mouse tab and check the checkbox focus windows when the mouse pointer moves over them. Then click the close button for this to apply.
I do not know of a command line way.
"I would prefer a command-line solution."
There isn't a built in command for this in Openbox, afaik. You will need to find the Openbox config file (lubuntu-rc.xml) and edit the line containing
<followMouse>no</followMouse> by changing it to yes. The setting is a child of the
You can, however, use
sed to achieve it:
sed -i 's/<followMouse>no<\/followMouse>/<followMouse>yes<\/followMouse>/g' ~/.config/openbox/lubuntu-rc.xml
Just note that the name of the config file will be different if you are not using Lubuntu. For bare Openbox or LXDE distros, find openbox-rc.xml.
This works on raspberry pi. Filename will be different for different distributions, but the principle remains the same. Replace "lxde-pi-rc.xml" with the name of your openbox config file.
cd ~/.config/openbox mv lxde-pi-rc.xml lxde-pi-rc.xml.save sed 's/<followMouse>no</<followMouse>yes</' <lxde-pi-rc.xml.save >lxde-pi-rc.xml