4

I would like to enable "focus follows mouse" bahavior in LXDE. How can I do it?

I would prefer a command-line solution.

1
  • @DKBose I don't know how to answer this. Feb 13, 2017 at 17:29

3 Answers 3

2

This assumes you are using openbox as the default file manager. I mainly know a GUI application of openbox configuration manager.

Run 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.

0
1

"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 <focus> element.

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.

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .