Multiheading Linux Systems
Engineering today requires a lot of screen real estate. When you start doing circuit layouts, math models and simulations, image processing and other engineering work, you need room. Plotting the results from two data runs with a package like octave is a common task and is difficult without adequate screen room. We have reached the point where using multiple monitors is pretty much the required baseline in order to work.
Fortunately, the rapid obsolescence of computer hardware has resulted in the early retirement of otherwise good equipment. Who doesn't have an extra video card or monitor lying around that was state of the art a few years ago but has been passed by now? Even if you don't, it doesn't cost much to pick up some new hardware and really spice up your system.
We present a formula to set up a Linux system to have two or more displays in various configurations, some lessons we learned while doing this and some uses we've found for the system. Be forewarned—following this formula doesn't guarantee success because some video cards just won't work with others. As always, please do the appropriate backups before making any system changes.
To set up your system for multiple cards, start with Red Hat 7.2, two video cards and monitors. We begin with a fresh install so you can see each of the steps in case you've already heavily modified your system. (Follow the spirit of these steps if you aren't using Red Hat 7.2 or if you are modifying a working installation.) Again, back up your data before trying any of this.
Physically install both video cards in the system, turn on both monitors and start the Linux installation.
Choose KDE and graphical login when you get to the appropriate part of the installation. This isn't crucial but makes things easier for testing and can be changed later.
Finish the installation and make sure your basic system and the X Window System are working by rebooting and logging in. At this time, you'll have one video card and monitor working.
As root, launch an xterm and make sure you're in your home directory by typing cd. Then type cp /etc/X11/XFConfig-4 . to create a backup copy of your X configuration file in your home directory, just in case.
Now, type telinit 3 to switch from runlevel 5, which uses a graphical login, to runlevel 3 with its console login.
Time to gather some data and see if this is going to work. Log in again as root. Type X -version and note the output. Buried in the output somewhere it will probably say 4.1.0 but could say 3.3.6a, depending on your primary video card. Next is the big step. Type XFree86 -configure and wait for the minute or so that this normally takes to run. Now type XFree86 -xf86config /root/XF86Config.new. If you are successful, you'll hear clicks from both monitors as they switch modes, and the power lights will switch from amber to green. The screens themselves will fill with the raw X display. If they do, congratulations, you should be able to make this setup work (note: kill X by pressing Ctrl-Alt-Backspace). If they don't, then try a different combination of video cards; we couldn't force systems to work that didn't do this step successfully, but we would love to hear about your successes with it! Now type XFree86 -scanpci and record the output. Typical output: (0:8:0) S3 Virge, which is a PCI card, and (1:0:0) NVIDIA Riva Ultra 64, which is an AGP card. Other cards and slots will be identified, but it doesn't matter for this to work.
Configuration of X server: you need to make sure you're calling the right X server, especially if you had an X version less than 4 in step 6. Type ls -l /etc/X11/X. If it is a symbolic link to XFree86, you're using the XFree86 Version 4. If it isn't, back up the link by typing mv /etc/X11/X /etc/X11/X_orig. Make the correct link by typing ln -s /etc/X11/bin/XFree86 /etc/X11/X.
Multihead configuration: at this point, you could just copy the new X configuration file (cp /root/XF86Config.new /etc/X11/XFConfig-4), but your resolution probably wouldn't be very good. A better approach is to edit /etc/X11/XF86Config-4 and incorporate the knowledge gained from going through these steps. We'll cover the fine-tuning in the next section.
Finally, type telinit 5, log in and enjoy. If you're successful, your system will boot up and give you a login screen. The screen on the right is your primary screen; the left screen will come up at the end of the login process.
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.Join us!
|Android Candy: Intercoms||Apr 23, 2015|
|"No Reboot" Kernel Patching - And Why You Should Care||Apr 22, 2015|
|Return of the Mac||Apr 20, 2015|
|DevOps: Better Than the Sum of Its Parts||Apr 20, 2015|
|Play for Me, Jarvis||Apr 16, 2015|
|Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites||Apr 15, 2015|
- "No Reboot" Kernel Patching - And Why You Should Care
- DevOps: Better Than the Sum of Its Parts
- Android Candy: Intercoms
- Return of the Mac
- Drupageddon: SQL Injection, Database Abstraction and Hundreds of Thousands of Web Sites
- Designing Foils with XFLR5
- Non-Linux FOSS: .NET?
- Play for Me, Jarvis
- Consent That Goes Both Ways