I mean to switch between the laptop monitor and an external display.
/home/user/.config/openbox/lubuntu-rc.xml file to set shortcuts but how to do it for this specific purpose?
The idea is to use
I have found a simple solution as a result of this answer.
Simpler, because involves using the LXDE default display manager, LXRandr, without the need of scripts.
It can save configurations (which are xrandr configurations).
When it saves the present configuration the older one is overwritten. But finding them and using them as shortcuts is a nice way to achieve what we want here.
The save is in
The file looks like
So, to save a certain configuration, open that file in a text editor like gedit
and save the line after
Creating shortcuts in LXDE is presented in the other answer, that is by editing the file
For example, in order to run the command above with the shortkey Ctrl-M , the edit should be like so:
For each computer and its specific internal+external display there should be three basic configurations (internal display only, external only, and both on); and others more only in case of various resolution settings for each of these three.
I found here that in order to have extended monitor (which is outside the capabilities of LXRandr) the command should be something like
(VGA-0 and LDTS are variables, look in
If you want dual monitor functionality in Lubuntu, you have limited options. The following will show you how to enable and disable dual monitors "on the fly" using ARandR as help. These directions are a bit complicated, but trust me: they are not dangerous. This is a SAFE operation.
First, get ARandR from Synaptic or by opening the terminal and pasting:
You can find your new application under Menu -> Preferences
What you see is a virtual setup of your monitor arrangement. You will almost certainly have different names for your monitor, but here is what mine looks like.
Although you haven't really done anything at this point, save this configuration.
It will automatically create a new hidden folder called
Now add your second monitor. It should be hooked up to your computer at this point, of course. I added mine by scrolling through the only other monitors that allowed activation and selected it.
Position the monitors however you like. I prefer side-by-side, but you may also put one above the other. It doesn't matter which one is on the left (or the top). It's all up to you! Here's what I like:
Once you have your desired configuration, save it again. This time, name the file
The last step in this whole process is creating hotkeys to switch monitor on the fly. In the terminal type in the following:
Scroll down to a place where you begin to see a lot of words that say
Your code should look a little like this:
Save. Close. Logout.
If you did everything right, you should be able to press Super+2 to activate dual monitor mode. To go back to one monitor, such as your laptop, press Super+1.
One final note about the lxde panel. When I switched into dual mode, my panel looked a little funny. If you experience this problem, open up your files you created with ARandR in the
Check out this page I wrote up a few months back.