These are the linux dual-monitor patches, version 1.1.37 alpha 1, 1 Aug 94.

These patches allow you to simultaneously use both color (EGA or VGA) and
monochrome video cards for VC's.  They have not been tested with X and
may not work properly (please email me and tell me what happens if you
try this).

------------------------------------------------------------------------
News:

	As of 42a1, configuration is now moved to a single file, dualmon.h.
A new option is also there to allow hiding the cursor on the non-active
monitor.  See below or in dualmon.h for this.

	Jeff Grills is no longer the maintainer of these patches.  They
are now maintained by myself, Todd J. Derr.  If you need to get in touch
with me about them, email me at:

		tjd@cs.pitt.edu -or- tjd@neurocog.lrdc.pitt.edu

	I'm planning on starting a mailing list for those of you who want
to keep up with the latest updates, etc.  I typically get and build new
kernels within a few hours of release, so if you want to stay on top of
things, get on the list.  Email me and I'll add you.

	I'd appreciate it if you browse over the 'To Do' section and
send me comments on what I'm planning to do with these patches.  Also
send me any other feedback/comments/suggestions/problems.

------------------------------------------------------------------------
Installation:

- If you are working with sources that you have already applied the 37a1
	patch to, use the patchfile 'dualmon-37a1-42a1.patch', which
	contains only the changes.  These patches should work best against
	the .orig files produced when you applied the 37 patch; if you
	have them, replace them.  Note that this version of the patch
	also includes some of linus' changes for 42, so the rest of your
	kernel must be 42 or you should NOT apply this patch.  At any
	rate, you're probably best to start with 'clean' 42 sources if
	you have any problems.

- If you are working from "clean" kernel sources, use the patchfile
	'dualmon-42a1.patch'.  

- The directory 'char' contains my versions of the affected files.  If you
	want to use them, your kernel should be pl42.  Copy these files
	into the linux/drivers/char directory and you do not need to
	apply a patch!  I will most likely not do this for future
	releases unless it's really convenient for people- let me know.

to patch, cd to linux/drivers/char, and apply the correct patchfile with:

	patch < patchfile

Look for any abnormal output from patch, and do an 'ls *.rej' to check
for any reject files.  If anything goes wrong, let me know.  I also have
patches against several earlier versions of the kernel if you need them.

	There are a few things you can configure.  All configuration is
now done in the file 'dualmon.h', so it's the only thing you need to worry
about editing.  The things you might want to change are:


CONFIG_DUALMON:

If you want to build a kernel without dualmon, comment out the
#ifdef/#define/#endif CONFIG_DUALMON lines.

Alternatively, you may want to let linux's normal configuration
script handle this.  If so, replace the patched Makefile with the
original one, and edit 'config.in' in the top kernel directory.
Add a line to config.in that says:

bool 'Dual monitor (VGA/EGA + mono) support' CONFIG_DUALMON y

The proper place for this is in the 'Character Devices' section,
I put it under the CONFIG_SELECTION line, but it's up to you.  If
you do this, you will have to 'make config' before you make the new
kernel.

If you do move the configuration to config.in, also comment out the
#ifdef/#define/#endif CONFIG_DUALMON lines.


LEFT_ADAPTER and RIGHT_ADAPTER:

LEFT and RIGHT refer to the ALT keys on your keyboard, which is how you
select which monitor the VC should go on.  The default is that the left
ALT key selects the color screen and the right ALT selects the mono screen.
It's probably most logical to make these reflect the placement of your
monitors, so swap them if need be.  Just make sure one of them has the
value 0 and one of them has the value 1 or bad things will happen.


MONO_CONSOLE:

This is the default tty for the mono screen at boot time.  Add 1 for the
real tty number, so the default (7) is tty8.  Change this if you want.


HIDE_NONACTIVE_CURSOR:

If defined, this hides the cursor on the screen that does not have the
input focus.  Handy for knowing which one is active, but comment this
out if you don't like it.


NOTE: you should have NR_CONSOLES set to no more than 12 in linux/tty.h.
You'll get an error while compiling console.c if you try this.

Once you're all set up and ready, make the kernel, install it, and pray.

------------------------------------------------------------------------
Using the dualmon patches:

On bootup, you should see a message from the console driver indicating
that the dualmon driver is installed.  If not, go back to 'installation'
and try again.

Basically, the patches modify the action of the ALT keys so that one of
them selects the mono screen and one of them selects the color screen.
Which is which is determined in keyboard.c,  feel free to change it.
The default is left-alt is mono and right-alt is color.

So, you just press the function keys to switch VC's as usual, but if you
press left ALT, the console goes to the mono screen, and right alt obviously
puts it on the color screen.

There are a couple problems with this scheme, and I'm working on ways to
fix them... read the 'To Do' section.

------------------------------------------------------------------------
To Do:

please send me comments about the ideas below, i'd like as much feedback
as possible about them! 

there are some nasty things that I don't like about these patches.  First
is the way that VC switching is implemented in the keyboard driver.  It's
a bit of ugliness in do_cons() in keyboard.c, combined with the default
keymap.  do_cons() simply subtracts 12 from console numbers over 12 and
determines based on this which monitor things should go to.  This works
since ALT (left) F1-F12 are defined in defkeymap.map as Console_1 to
Console_12 and ALTGR (right) F1-F2 are 13-24.  This prevents you from
having more than 12 consoles, though that's pretty easily fixed if you
know what you're doing and want to change the keymaps.  I think I'd like
to eventually modify the keymaps so you can have entries like
Console_1_color or Console_1_mono, etc.   This would make a few things
easier, remove the need for the LEFT_CONSOLE and RIGHT_CONSOLE defines in
keyboard.c (and in fact make them easily dynamically assignable), and
remove the 12-console restriction (if you figure out key sequences to
do it).  However, I'm a bit leary about modifying the default keymap
or requiring that one be loaded at boot time... perhaps it's not that
big of a deal.

If I make the plunge and modify the keymaps though, I'd like to add a
function that was in my original version of these patches (jeff and i
were working on them together and some things never got folded into
each others versions, plus the keyboard driver was a lot different
[dare i say simpler] back then).  Something like focus_mono and
focus_color, which I had implemented as Left/Right-Alt and the
spacebar.  This can't be (easily) done now because left ALT-space
is defined as Meta_Space but right ALT-space is not defined.  The other
problem is that some applications use META-space... but of course putting
it in a keymap allows you to easily and dynamically change it.  It was
a nice feature... I miss it, since I was used to it.  Now, you have to
remember _which_ VC is on the "other" console before you can focus it,
which is kind of a pain.

this is painfully obvious, you can't swap a visible console
to the other screen.  This should be easy to change, I think, but the
question is this, what goes on the original console to fill the void?
My best guess would be to 'swap' the screen contents if you perform this,
so I'll probably try it... it might be annoying/disorienting though, I'll
see.  My first attempts at getting this to work for these patches
failed miserably, and I haven't had time to play with it again.

finally, I'm working on generally cleaning things up, resolving the
above issues, and trying to get the patches incorporated into the
main kernel so that I don't have to keep sending out updates.  I've
talked with linus about this and he seems to think it would be OK...
but there's a lot of work to be done and little time for me to do it
before this happens....

------------------------------------------------------------------------

todd j. derr

tjd@cs.pitt.edu
tjd@neurocog.lrdc.pitt.edu
