Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Linux Software

Two Headed Penguins? 50

dmendesf asks: "The Octane2 workstation from SGI has a neat trick called PowerDuo that enables a single station to be driven by 2 keyboards, 2 mice and 2 monitors. Is it possible to do the same with Linux and USB mice, keyboards plus Dual Head videoboards?" How difficult would it be to develop an X11 solution to do this? Now take this a step further: could this be done with the secondary machine a network connection away?
This discussion has been archived. No new comments can be posted.

Two Headed Penguins?

Comments Filter:
  • by Stipe ( 35684 ) <cr212@iname.com> on Friday February 01, 2002 @08:44AM (#2936565) Homepage
    While I've not tried it, I don't see any reason that a PC with PS/2 mouse and keyboard, two VGA cards, and a USB mouse and keyboard, couldn't be configured to do exactly the same; run 2 X servers, one configured for the first video card and PS/2 mouse, keyboard, the second for the second video card and USB mouse and keyboard. (you may be able to use several USB mice and keyboards, in order to get as many heads as you can fit video cards in for). As ever, the pig is setting it up.

    Of course, you'd need a second sound card for seperate audio, but again that's not too hard.

    As for the suggestion that you could do that with X11, well, I laughed when I read that. That's exactly what X and XDMCP is designed for! Have you never heard of X terminals (not xterms)?

    When X was developed, the idea was to have lots of thin X terminals and then one big beefy UNIX box to run the applications. Then windows and PCs came along, and they didn't run apps over the network (or at least not until recently).

    When I was at college, I had my PC running Linux as a single head, and an NCD X terminal which I'd scrounged from my brother in my room, and in the college's computer room they had some old HP workstation being used as an X terminal. I could easily have 3 people running web browsers, e-mail and news through the one PC (+2 dumb X terminals)

    Both of these X terminals were cut-down custom made machines which booted over the network, ran an X server, and broadcasted XDM/CP for any hosts that wanted to offer them a session. It presents a list of machines running XDM, and you simply double click on one, and you get a login screen. Main problem is that both of these "thin terminals" were crap - fixed resolution (at 1280x1024, so usable), but only 8 bit colour depth. Of course, a PC with no hard drive and a decent graphics card would make a better X terminal. NCD still make them - here's a more modern and useful X terminal [ncd.com]

    The problem is though, that bandwidth over the network is very much less than you get on a PCI or AGP bus - not enough for comfortably doing very graphics intensive stuff with.(back then, I was using 10Mbit, but there are still problems at 100Mbit). Fine for checking e-mail, reading news, even web browsing, but 2D graphics was painful. 3D graphics would be as well - remember that to use things like the renderer extension, (i.e. any fancy 3D GL stuff, or alpha-blending), requires the application to run on the same host as the video card is in, as the app talks directly to the video card; X is only used for the windowing bit, and for drawing basic stuff like text and buttons.

    Really, to do this properly requires compressing the X traffic, like lbx or (plug) Tarantella [tarantella.com], otherwise it's unusable.
    • The problem with basic X is that it expects to drive one X client (display) at a time. While X can run dual headed, each monitor is expected to display a different image; driving the same image to two monitors should be possible, I'm just not sure if X-windows is designed for it.
      • That's not a problem of basic X, but a problem of how your distribution has configured X to run by default.

        X is extremely flexible in using multiple input and output devices, but because most people have a very straightforward setup, your Linux (?) distribution doesn't bother you with all the posibilities.

        Unfortunately my desk is too small, or else I would be running both my 24" and my 20" dual headed :)
      • Take a look at the format of the DISPLAY environment variable, and notice what the various parts do. (assuming a machine with TCP, X can use other transports, and the DISPLAY variable is different)

        hostname:0.0

        Where I put "hostname", is of course the name of hte machine. The next section, after the colon, X calls the "display", and this refers to a complete set of input and output devices for a single user. The last section, after the dot is called a "screen", which is a bitmapped output device for X (basically another monitor.)

        Things like VNC and ssh's X forwarding set themselves up as additional displays (screen, keyboard, and mouse combos) and proxy the X events that they receive to the machine at the other end of the network link.

        So X itself is designed for multiple users per machine. (think about it, a lot of the original work on X was done at DEC. They had a motivation to support big multiuser machines.) The issue here is whether linux's USB support allows you to read from a single keyboard on the USB bus and ignore key events from other keyboards.
    • I'm trying to run a little thing we call The Mandrake Mosix Terminal Server Project [dynu.com](We could use help) and I'm very interested in thin-client tech. The project is to further lower HW/server costs by adding process migration to the server/thin-clients. Imagine if we could also get USB mouse/keyboard support in there and shove about 4 pci vidcards in each box... get 4 heads from a $200 box(plus monitor/kb/mouse). Wow... think I'm going to login to testdrive and start compiling kernels. :)
      • How long do you think the video cable can be made to work without artifacts/distortion? If everyone sat in a circle with the computer in the middle it would be great but that wouldn't be realistic at a school I'm looking at. Everyone sits along the walls facing the walls (offices, not classrooms). Of course one thing in our favor is that we won't be running ungodly high resolutions like 1600x1200@85 Hz. I would think 1024x768@72/75 Hz max.
        • I understand that digital flat panel interface cables can be extended over great lengths with fancy hardware. However, that probably isn't worthwhile if you're trying to find the lowest possible cost per display.

          I agree that cabling and reliability issues would probably make it unoptimal to run all of the displays in a class room from one computer. However, you could still get considerable cost savings by, say, running four or five displays per computer, where those displays were in adjacent carels or clustered together on a table, or even in four cubicles in a commercial environment in a "+" shaped arrangement.

        • at least 10 meters without distortion with 1280x1024@75Hz with well shielded cables with ferrites on both sides. (seen with a Sun monitor)

          I use an (good) 3 meter cable at home and i see no distortion at all at 1600x1200@100Hz even when the phone rings.
  • by herrlich_98 ( 267669 ) on Friday February 01, 2002 @08:44AM (#2936569)
    Start a vncserver on the computer and go to another computer and use vncviewer. The other computer can even be a Windows box... or vice versa.
    • Start a vncserver on the computer and go to another computer and use vncviewer. The other computer can even be a Windows box... or vice versa.

      The problems here are many. One, your solution uses two computers and just shares some resources - the question was really a means to have one box that acts like two distinct computers. Secondly, for those who don't know nvc is like norton pc anywhere, only it's thinner, cross platform, java client, etc... - so, what you get with it is a server being controled by a client and thus you've turned two computers into .5 for one person (since their mouse, keyboard, etc..) is controled by someone else and 1.5 for that other person since they have the own computer and full control of someone else's.
  • Don't tell me the genetic engineers have been playing with penguin DNA now! First goats spinning silk, now penguins with two heads! :-)
  • The idea is to have one machine with 2 (or more) keyboards, monitors and mice. Like an Xterm except that there's no network involved. So if you want to do it across the network, just use an Xterm.
  • Dual Head cards (Score:1, Offtopic)

    by MullerMn ( 526350 )
    I'm not sure if this applies to all dual head cards in Linux, but with my Nvidia GeForce 2 MX (using Nvidia's drivers; I don't think the free drivers can make the card do the dual headed thang) the dual display happens at the driver level.
    The main implication of this is that most applications (and X) have no idea they are running on a dual display, they just think I have one huge monitor. For me this means that they throw up dialogs and windows that land accross both displays which is a bit annoying, but in the project the poster mentions I could see problems if X can't recognise each monitor as an entirely separate display device.

    --
    Andy
    • You could certainly do this with a Matrox G450 dual-head. I did this acidently while trying to setup and dual head linux box to use xinerama :). IIRC the only thing needed was to not specifiy xinerama.

      The upshot was I got a machine which proceeded to load up two separate desktops with their own task bars - which you could not drag applications / windows between.

      The problem with this was that xdm only ran on one display and on login you got both desktops at once. However, both monitors were acting as an independant display so this kind of thing must possible, maybe just some xdm config tweaking to get this right.

    • I run the NVidia 64meg MX 400, dual heading a pair of Cornea MP800 18.1 inch LCDs, and it works just fine. I'm tampering with the video out toys to see if I can't shunt a display to my portable Pioneer DVD player, just for kicks.
  • But first (Score:2, Interesting)

    by netringer ( 319831 )
    you'd need an O/S that was designed from the beginning to be multi-tasking and multi-user. ...something like...uhhhh...*nix!

    I don't get what the breakthrough is. Many moons ago I deployed and supported 400 users with 20" color screens and keyboards and mice, with the full office-like suite of applications (with shared licenses) all running off one or the other of two Sun 4/330's runing SunOS (BSD Unix) over 10BaseT. It was called "an X-terminal." It performed so well that users would favor them over PCs.

    The coolest thing was getting a shipment of 30 new desktops in the morning and having them all working in front of the users by lunch time. Those were the days...before we got this advanced new easy-to-deploy, easy-to-train stuff like Windows.
  • by The guy standing ove ( 73023 ) on Friday February 01, 2002 @09:42AM (#2936738) Homepage

    I believe the following HOW-TO is what you're looking for is here [linuxplanet.com]

    http://www.linuxplanet.com/linuxplanet/tutorials /3 100/1/

    I've been thinking about doing the same thing myself. With a dual-processor machine, I'm sure I wouldn't notice a change in system performance.
    • THank you very much man... That's exactly what I wanted. Interesting, it was done by a brazilian... I'm brazilian too :)
  • clarification (Score:5, Informative)

    by foobar104 ( 206452 ) on Friday February 01, 2002 @10:35AM (#2937018) Journal
    I see a lot of comments about X terminals and one about a dual-head graphics card.

    That's not what the question-asker-person was talking about.

    The Octane system that was referred to in the question is designed to support two users logged into the machine at the same time, each using a fully functional hardware graphics pipe. From the user's point of view, it's exactly like having your own Octane, complete with V12 ("really fast") graphics.

    You can't do that with VNC or an X terminal, because those both involve running your application on the server and displaying its output over the LAN. That's not as fast as working on the local machine, and it doesn't provide you with hardware-accelerated graphics.

    A dual-head output from your graphics card also wouldn't be enough, because to implement a system like this you'd have to have two graphics cards, one for each user.

    SGI Onyx systems have supported this kind of thing for years; at one point it was marketed as a product called "GroupStation." The way they set it up wasn't particularly exotic, although it may depend on some features unique to the Xsgi X server. For instance, Xsgi has a "-pipe" option that tells it to manage the given graphics pipe; graphics pipes are numbered by the kernel at boot time, so on any multipipe machine you can refer to a specific pipe as 0, 1, 2, or whatever. I don't know if that option is unique to Xsgi or what.

    Each user gets a mouse, keyboard, and monitor. The X server on the Onyx would be configured to run one instance of X on each graphics pipe, instead of one instance of X with a screen for each pipe. (In other words, :0.0 and :1.0 instead of :0.0 and :0.1.) Each X display gets an instance of xdm, so when you sit down you log in and go like you're the only user on the machine. You set up the bindings between mouse/keyboard devices and pipes in the Xservers config file, I think.

    It should be possible, at least in theory, to do this with XFree86. I know multiple X sessions on one Linux machine are supported; I've done it myself with multiple XDMCP clients running at the same time. If XFree86 supports binding mouse and keyboard devices to X displays, then you should be ready to roll.

    The only bad news is that you'd be limited to PCI graphics cards for your 2nd through nth heads, unless you have a motherboard with more than one AGP slot. None of the PCs at my office have more than one, so I'm not even sure whether such a beast exists.

    So to sum up, I think this depends more on XFree86 than it does on Linux. If you want to try it, I'd start with the XFree86 documentation to find out if the features you'd require are supported.
    • Don't bother looking, AGP spec only allows for one slot.
      • But PCI is more than enough for regular work like document editing and even graphics editing. Sure AGP rocks for games but a lot of people don't need it...
      • Actually, the AGP port spec does allow only one slot, as you say. (That's why AGP is a port, not a bus.) But it's very possible to design a computer with more than one AGP port, the same way you can design one with more than one serial port (or, for that matter, with more than one PCI bus... but let's not go into that.) No, no one that I know of is doing this yet, but I'm sure it will happen soon enough.

    • Sure it works.

      Directly supported by xfree86. You can specify several virtual servers in the xf86config file all of which can have their own mouses, keyboards and monitors.

      Just hook up a couple of usb keyboards and mouses to a computer along with a dual-head or two video cards and set them up in the config file.

      For sound you'd just have to have two sound cards and configure programs in different servers to use different dsp-devices(which hopefully are not hard coded)..
  • by billcopc ( 196330 )
    Why struggle to have one expensive PC serve 2 users, when it would be trivial to just get 2 cheap boxen and run Cat-5 between them, like we've always done ?

    Sure, the concept is neat, but I don't see how practical this really is. If the person can afford this whiz-bang SGI box, they can probably afford two lesser SGI boxen instead. I don't expect the added space taken by the case to be a major issue, SGIs are usually quite slim.
    • Maybe... (Score:2, Interesting)

      by uncledrax ( 112438 )
      With only 1 box, you only have to worry about maintaining... 1 box.

      Also maybe the person only needs a second 'computer' occasionally.. or some other strange condition.
      (maybe they just want to know for the heck of it)

      Although you are correct that it may be more economical to have just multiple boxes.
      • With only one boxen, you only have to worry about one boxen failing! Now two people can't work! Woops!
        • With only one boxen, you only have to worry about one boxen failing! Now two people can't work! Woops!

          With two people sharing one box you have one point of failure. With people sharing a server you have aswell a single point of failure. Now just to get your mind thinking, ponder some distributed systems (make lamport logical clocks and other fun things come to mind) and think about n points of failure...
    • Way back in the day, about 1986 :-) I worked for a company that used to share one PC between four people using this method.

      It worked a treat, it kept costs down, it kept heat and noise down and most users didn't know they were sharing their PC with their co-workers.

      The company eventually went full networked Xterms which is a better solution if you have the bandwidth and the server horsepower.
  • multiple displays (Score:3, Informative)

    by cloudmaster ( 10662 ) on Friday February 01, 2002 @11:09AM (#2937188) Homepage Journal
    It's possible to directly access individual mice and keyboards, and X already has a "screens" section where multiple cards can be set up to run the same or different x servers. The only hassle, I think, would be binding the right input devices to the right monitor - I'm not positive how tough it would be to get each input device to register in the same order.

    Just look at an XFree 4 XF86Config file, it's not that big a deal. There's plenty of information about using multiple video cards under XF4 alerady out there, as that capability's been easy to use for a couple of years now.
  • I think it would be really cool to run two seperate mice and keyboards on one X session.. that would make debugging with a coworker a breeze! Has anyone seen anything like this done? Kind of like timbuck2 or VNC, but on one local machine with two cursors.
  • I've been trying exactly this about a month ago. I stuck in a spare PCI graphics card - all I wanted was to send a 640x480 video stream to it, so it didn't need to be good - and my new usb mouse/keyboard. Everything appeared to be working separately fine, in about every combination, and using Xinerama to combine the two displays to spread the desktop accross them, so I started a second X session, on the other KVM setting. The first screen goes blank. I can only get one VT actually running at a time I spoke to people on irc.linux.org, and the verdict was that linux can only have one VT active at a time, and hence it wasn't displaying it. I don't know how correct this was, but I certainly couldn't get the second X session diplaying, when I was using the first - it didn't need input devices configured for it anyway, all I wanted was to send a fullscreen video to it, and not loose the ability to see my work / IM clients.
  • A few different companies make and have made modified network cards that will do just thus under Windows...surely anything Windoze can do, Linux can do better! (right?)
  • I've seen two headed calves before (seriously!), so why not?

    Oh you mean two headed computers...
  • The mice and graphics are very simple to do with Xfree86. The question is about the keyboard. With USB, it could be hackable.. but as linux is now, I am aware of no way to use multiple keyboards on a single box.
    • Well, multiple keyboards work, but I'm not sure if they can be assigned to different displays. If I just plug in a USB keyboard in my USB hub, it works alongside my "main" PS/2 keyboard, without me having done any special X configuration magic. Of course, it could be that working like that is simply the default, I don't know...
  • Imagine a beowulf cluster of... oh, nevermind, it already has two workstations for the price of one...

It is easier to write an incorrect program than understand a correct one.

Working...