Fix Alt Tab in Lubuntu
I usually keep one or a couple of similar programs running at each desktop. On the Mac, I use 9 Spaces that I alt-tab or ctrl-arrowkey to and from, but when using 4 desktops in LXDE on my netbook, alt-tabbing doesn't show me all my programs, but only the programs running on the current desktop. Of course, I could alt-scroll to the right desktop and then alt-tab if there are more than one program running there, but it seems a bit too complicated.
While trying out some distros that had openbox in virtualbox, I discovered that there is a way of alt-tabbing across all desktops. This method will work in any Linux distro that uses the LXDE desktop environment and/or the openbox window manager, if the version of openbox is 3.4 or higher. (Lubuntu, LXLE, Debian LXDE, Mint LXDE, Semplice, #!…)
- Open ~/.config/openbox/lubuntu-rc.xml (Either use PcManFM, rightclick and choose "show hidden" when in your home folder, then double click the .config folder, double click the openbox folder, then double click lubuntu-rc.xml or open a terminal and write leafpad ~/.config/openbox/lubuntu-rc.xml and press enter.) In other distros this file might be called lxde-rc.xml or just rc.xml.
- Scroll down to the "keybindings for window switching" section and find "keybind key="A-Tab”
- Change the text so it looks like this:
<keybind key="A-Tab"> <action name="NextWindow"> <allDesktops>yes</allDesktops> </action> </keybind> <keybind key="A-S-Tab"> <action name="PreviousWindow"> <allDesktops>yes</allDesktops> </action> </keybind>
- Save.
- Open a terminal and type “openbox -reconfigure and hit enter. Hopefully, you will now have a working alt-tab between all desktops. (Thank you Peppa, for the tip!)
If it doesn't work or if you get an error message when trying to use OpenBox configuration manager, it might be because you didn't remember to delete the backslash (/) after "action name="NextWindow”, so that the later "/action" breaks the syntax of the XML file.
Update February 2021: Since this is a problem with the OpenBox configuration and not the desktop environment on top of OpenBox, the problem was still in Lubuntu after the switch to LXQt. I reported a feature request to be able to alt-tab between all desktop, and the Lubuntu team implemented my fix in the next release, Lubunut 20.04. Since then, there has been no need for this fix.