summaryrefslogtreecommitdiffstats
path: root/content/en/articles/xrandr-e-dual-head-su-slackware-12-2-e-intel/index.md
blob: 48bd96d0ab7c903ccc604dd4c30e393dee9bd8d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
+++
title = "xrandr and dual-head setup on Slackware 12.2 with Intel graphics."
author = "Danilo M."
type = "tech"
date = "2009-06-29T17:05:13+00:00"
excerpt = "'In this short article, I will explain how to set up an ultra-wide desktop that spans across two monitors. You will need: a graphics card with two outputs and a text editor...'"
categories = [ "Code", "DIY"]
tags = ["dual head", "extended desktop", "monitor setup", "slackware", "xorg", "xrandr"]
draft = true
+++

Today, I came across a 17" monitor, and I was curious to try connecting it to the external VGA output of my laptop. So, I did some research online to see if I could set up a dual-head system where the two screens would form a single, larger desktop.

<!--more-->

After a few attempts, I found the almost perfect solution, which is a total screen resolution of 2560x1024. To achieve this, I simply added this line to my xorg.conf:

`Virtual   2560 1024`

within the "Display" SubSection in the "Screen" section. This line simply instructs X on the overall dimensions of the virtual desktop; the two values are obtained by adding the resolution of the first screen, which in my case is 1280x1024, to the resolution of the second screen, which in my case is the laptop screen, i.e., 1280x800. The total width is therefore 2560, while for the height, I had to use the value of the larger screen, i.e., the external one, which is 1024.

Obviously, doing this gives me a desktop area that is about 120% of the actual area of the two monitors, but X takes this problem into account. In fact, if I maximize a window on the large screen, it adapts to the larger size; if I maximize it on the laptop screen, it adapts to the wide size and doesn't give me any scrolling problems. The only annoyance is that I can't see the end of the lxde bar if I leave it positioned at the bottom, but this is also easily solved by placing it at the top...

At this point, whenever I want to activate the dual desktop, I just need to launch this script that I created; I called it **dualhead.sh**:

```bash
#! /bin/bash

case $1 in
  start ) xrandr --output LVDS --mode 1280x800 \
          --output VGA --mode 1280x1024 --left-of LVDS
        ;;
  stop  ) xrandr --output VGA --off
        ;;
  *     ) echo "USAGE: `basename $0` start | stop"
          exit 1
        ;;
esac
exit
```

launching it with the "start" flag will activate the dual head, while launching the script with "stop" will return the entire desktop to the laptop screen, as xrandr will turn off the external VGA output.

Now you can enjoy your beautiful extended desktop, maybe using one of the ultra-wide wallpapers available on [compiz-themes.org][1]. I'm using a beautiful photo of Melbourne Bay, and the nice thing is that it starts on one screen and ends on the other, but if you don't try it, you won't understand... ;)

Have fun...

[1]: http://www.compiz-themes.org/index.php?xcontentmode=6110&PHPSESSID=593590581b90557a2f710adca3e82d40 "skydomes on compiz-themes.org"