Using Dual Displays on Linux

I have been using dual monitors on a variety of Linux systems for quite some time now. The most common case has been using a laptop with an external display attached, but I have also done it on desktop systems with two displays.
Written by J.A. Watson, Contributor

I have been using dual monitors on a variety of Linux systems for quite some time now. The most common case has been using a laptop with an external display attached, but I have also done it on desktop systems with two displays. Overall it works very well, and if you need the additional working space it is a wonderful solution. Here is a brief description of the things that need to be considered and configured.

The first major consideration is the resolution of the two displays to be used. If you are fortunate (or careful), they will both have the same resolution, and this whole issue disappears. This is often the case with desktop systems, where you might connect two identical displays, or at least two 1280x1024 (or whatever) displays. This is often not the case when a laptop display is one of your two, as they tend to be lower resolution than common external displays today. In my case, the laptops I most often use these days are 1280x800, and the external displays are 1280x1024 or more.

I am using Linux Mint for this illustration, with the Gnome desktop - other systems using Gnome will be similar or identical, other than the specific menu structure where you find the Monitor Preferences utility. On Mint (and Ubuntu), go to Preferences / Monitor, and you will get the following window:

Monitor Preferences

There are two important things to notice here. First, by default the two monitors will be Mirrored, and second the resolution will be set to whatever the highest common value is. In the example above, the laptop is normally 1280x800, and the external monitor is also capable of that resolution. But I have used a variety of other monitors which can not do that resolution, and it often ends up putting them both at 1024x768, which turns out be be quite ugly for both. In the current case, the result is that both displays look like this:

Monitor Preferences

That's a pretty normal Linux Mint desktop. Now, if you un-check the "Same Image in all Monitors" box, you can then individually adjust the resolution and relative position of each monitor. Here I have changed the external display to its optimum resolution of 1280x1024, and positioned it to the right of the laptop display with the top edge algned.

Monitor Preferences

This configuration results in the displays looking like this:

Monitor Preferences

The black area below the laptop display is not really visible, of course, it is what the Screenshot program adds so that it can show the two displays side-by-side. With a bit of experimentation you will find that you can position the two displays however you want relative to each other. There are two factors which I have found are important in doing this. First, make their arrangement match the way they are really arranged on your desk. The cursor moves between the two according to this arrnagement, and it will drive you insane if you have to move the cursor across the opposite side of the displays to how they are actually arranged. Second, think about what the Gnome panels, where they are located and whether they auto-hide, in deciding on the arrangement. I like to keep the "base" screen on the laptop (that's the one with the panels and icons displayed on it), both because I prefer the consistency with a single-display setup, and because I want to keep the entire larger external display for whatever I might be wanting to look at. However, if you enable auto-hide on the Panels, and you use the layout I have shown here, getting the bottom panel (the only panel on Mint) to come up and stay can be a bit tricky. The two obvious solutions to this are to disable auto-hide (after all, you have a second display now, how much screen space do you need?), or move the Panel to the top edge instead of the bottom, where it will behave normally. I tend to do the latter, because I'm greedy about screen space...

One last amusing note. As I said, you can logically arrange the displays pretty much any way you want. That includes above/bleow each other, which some people seem to prefer.

Monitor Preferences

However, if you do that and put the external below the laptop display, with the Panel at the bottom of the laptop display and auto-hide enabled, you can actually see the Panel at the top of the external monitor when it is supposed to be "hidden".

Monitor Preferences

You can't do anything with it when it is there, but you can watch it move up and down as you move the cursor across the border between the two displays. Again, getting it to stay "up" on the laptop display can be a bit tricky, and often leads to something that resembles a game of whack-a-mole.

What I have described here is using dual screens with the Gnome desktop. Very similar results are possible with the KDE desktop, generally using the RandR utility to configure the resolution and position of the displays. Either way, it works great, and if you need a lot of desktop workspace, it is an excellent solution.

jw 9/7/2010

Editorial standards