xrandr in Slackware 13.37

Using a second monitor with your laptop

While working in the Linux Lab at Stevens, I noticed there were a couple old monitors sitting around which were not connected to any desktops. I wanted to use one as an extension to my laptop just to figure out how to do it. The first thing I did was determine what the ‘screens’ were called by xrandr. My output looked something like this:

icordasc@laptop:~$ xrandr
Screen 0: minimum 320 x 200, current 3200 x 1200, maximum 8192 x
8192
LVDS-1 connected 1920x1200+0+0 (normal left inverted right x axis y
axis) 331mm x 207mm
   1920x1200      60.0*+   59.9
   1920x1080      60.0
   1600x1200      59.9
   1680x1050      60.0
   1400x1050      60.0
   1280x1024      59.9
   1280x960       59.9
   1152x864       60.0
   1024x768       59.9
   800x600        59.9
   640x480        59.4
   720x400        59.6
   640x400        60.0
   640x350        59.8
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
VGA-1 disconnected (normal left inverted right x axis y axis)

After logging into my laptop, I plugged in the VGA cable and ran the following command.

xrandr --output LVDS-1 --auto --output VGA-1 --auto --right-of \
LVDS-1</pre>

In short, you’re setting your default (output) screen (LVDS-1 here) to be the automatic size and then setting ‘output’ VGA-1 to be automatically sized and placed logically to the right of the original screen. I could have made it to the left, above or below with --left-of, --above, and --below respectively. But I didn’t care to try that (although I will one day).

To disconnect the monitor without causing problems with X11, just run:

xrandr --output LVDS-1 --auto --output VGA-1 --off