Linux, Laptops, and Projectors…Oh, My!

The time has come ’round once again where I will be regularly presenting information to hungry graduate students. This last Saturday marked the beginning of my second year teaching a business technology course in Dominican University of California’s MBA Strategic Leadership Program, and the fourth year teaching in their Business Programs overall.

Last year I touted the benefits and usefulness of Linux in a business environment, but was not using Linux (or any other OpenSource programs) to present my slides in class. Instead, like so many others, I found it easiest to use my PowerBook running OS X, or to boot into the Windows partition of my PC laptop so that I could connect to a projector with very little fuss. I felt so much shame in leading this poor example that I set out to take corrective measures for this year’s class. The following entry chronicles my trip down an interesting, but (still) bumpy road with the “modern” Linux, a laptop, and the configuration for using LCD projectors.

To be fair, it is important for me to mention that, for the most part, the configuration of X (the core graphical user interface server, on which all sorts of other software runs to present the end-user experience) has gotten far easier over the years. Almost automatic for genearl use. Once I installed X.org’s replacement to XFree86 (the de facto standard X implementation for Unix for many years), I had a working X desktop by simply typing:

Xorg -configure

I was asked a couple of questions, and the final result was a working GUI on the 1400×1050 resolution LCD laptop screen of my IBM Thinkpad T42p. No problem. Happy camper.

The problem with this was the process was too simple, and in fact, expected that, if I had special needs, I would manually edit the configuration file found in /etc/X11/xorg.conf. Since I had not done this, when I first plugged-in an LCD projector I got a very pretty, but very useless pattern projected on the wall. Not fun.

What was the problem? The default configuration used the generic (Xorg built-in) ati driver instead of the radeon driver required to drive my ATI FireGL Mobility T2 (M10) NT card. I also had to add a few extra lines to my /etc/X11/xorg.conf file to correctly set-up how I wanted my screens to display. Most people like “cloned” screens, but these prove problematic with high resolution my laptop screen coupled with the normally low resolutions of most LCD projectors. I wanted a “two-headed” configuration, where each screen could run independently of the other. The high points follow.

In addition to the “Monitor” section for the the laptop screen, I needed one for an LCD projector. Both are listed:

Section "Monitor"
   Identifier "LaptopLCD"
   HorizSync 31.5 - 64.3
   VertRefresh 50 - 100
   Option "DPMS"
EndSection
Section "Monitor"
   Identifier "Projector"
   HorizSync 31.5 - 48.4
   VertRefresh 50 - 70
   Option "DPMS"
EndSection

Then I needed to augment my “Device” sections:

Section "Device"
   Identifier "ATI Graphics Adapter connector 0"
   Driver "radeon"
   Option "no_accel" "no"
   Option "mtrr" "off"
   Option "MonitorLayout" "LVDS, CRT"
   Option "Ignore EDID" "off"
   BusID "PCI:1:0:0"
   Screen 0
EndSection
Section "Device"
   Identifier "ATI Graphics Adapter connector 1"
   Driver "radeon"
   BusID "PCI:1:0:0"
   Screen 1
EndSection

Next, my “Screen” sections:

Section "Screen"
   Identifier "Screen0"
   Device "ATI Graphics Adapter connector 0"
   Monitor "LaptopLCD"
   DefaultDepth 24
   SubSection "Display"
      Depth 24
      Modes "1400x1050" "1280x1024" "1024x768"
      ViewPort 0 0
   EndSubSection
EndSection
Section "Screen"
   Identifier "Screen1"
   Device "ATI Graphics Adapter connector 1"
   Monitor "Projector"
   DefaultDepth 24
   SubSection "Display"
      Depth 24
      Modes "1280x1024" "1024x768"
      ViewPort 0 0
   EndSubSection
EndSection

Then finally, the “ServerLayout”:

Section "ServerLayout"
   Identifier "Server Layout"
   Screen "Screen0"
   Screen "Screen1" LeftOf "Screen0"
   InputDevice "Mouse1" "CorePointer"
   InputDevice "Keyboard1" "CoreKeyboard"
EndSection

You’ll notice with the mention of the keyboard and mouse that there is more the xorg.conf file than just these sections. These are the ones modified to get me to where I must go next.

Now, when I restarted X, I had two distinct screens. One on the laptop display, and another with a connected LCD projector. Due to the advances that have been made with X servers in general, my second screen (for the projector) is dynamic. The system doesn’t seem to really care if I have an LCD projector attached or not. This is different from my previous experiences.

I wanted to be able to have a “private” screen (my laptop LCD), and a “public” screen to display to my audience. I have accomplished that, but I want to be able to see the content my audience sees in my “private” window, along with any notes or other windows I might want open there. Because my laptop LCD is a larger desktop (higher desktop resolution) than the project is, this is easy to do with some VNC magic tricks kicked-off with the following script:

#!/bin/bash
SECRET=$HOME/.vnc/passwd
vncserver -geometry 1024x768 :13
sleep 1
vncviewer -passwd $SECRET -nocursorshape -shared -fullscreen -display :0.1 :13 &
vncviewer -passwd $SECRET -shared :13 &

At this point, I can launch any application I want in my Projector Desktop, like Open Office Impress, and can see (and control) what is displayed in my VNC viewer on my laptop LCD. So long as the VNC server session is running, the data is persistent regardless of whether or not the projector is attached. Pretty darn cool.

That’s it for now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: