Slashdot Mirror


2 Displays and 2 Workspaces With Linux and X?

Borov writes "I'm planning to buy a second monitor in near future and I was searching for ways to configure it under Linux. It seems there are two main ways: 1) to have one 'big' desktop, which means I have single workspace — changing virtual desktop switches both monitors or 2) to have separate X sessions for each display — which means I have separate workspaces, but I can't move applications between them. I need something in the middle — a separate workspace for each screen, so that I can have independent virtual desktops on each screen, but still have the ability to move applications between monitors (no need to strech one app across both of them). I've read that some tiling window managers can do this kind of thing, but I'd rather go with 'classical' window managers, like Openbox/Gnome/KDE or similar."

21 of 460 comments (clear)

  1. Re:Gentoo? by Anonymous Coward · · Score: 5, Funny

    We won't know until you finish compiling.

  2. 4 Screens by spribyl · · Score: 5, Informative

    I have 4 screen using 2 nvida 9500 cards and KDE.
    I have one X session. By not using Xinerama my maximize button is limited to the size of the two screens on one card. I can stretch the window to full size using all 4 screens.
    I also use multiple desktops to manage windows.

    Right now each screen gets its own window. When I need to look and wide things(log files) I maximize to two screens. For really big things I can stretch the window to all four screens.

    1. Re:4 Screens by cephalien · · Score: 4, Informative

      Last I checked, KDE + NVIDIA is the way to go; GNOME doesn't really support multiple monitors in anything but a combined mode.

      --
      If firefighters fight fire, and crimefighters fight crime, what do freedom fighters fight? - George Carlin
  3. Google by Albanach · · Score: 4, Informative

    30 seconds with Google points me to

    http://en.wikipedia.org/wiki/Xpra
    xpra or X Persistent Remote Applications is a tool which allows you to run X programs usually on a remote host and then direct their display to your local machine without losing any state. It differs from standard X forwarding in that it allows disconnection and reconnection without disrupting the forwarded application

    http://en.wikipedia.org/wiki/Xmove
    xmove is a computer program that allows the movement of X Window System applications between different displays and the persistence of X applications across X server restarts[3]. It solves a problem in the design of X, where an X client (an X application) is tied to the X server (X display) it was started on for its lifetime. Also, if the X server is shut down, the client application is forced to stop running.

    Have you investigated any of these before 'asking /.'?

    I'd fire up a second X session on your machine - you can run multiple instances of X with a single monitor after all, and try moving apps between your sessions. Get that to work and everything should be (mostly) trivial after you get your new monitor.

    1. Re:Google by Cormacus · · Score: 5, Insightful

      You know what? I'm glad that the submitter did not investigate any of these before asking /.. If he had, then I wouldn't have had the opportunity to read his question, ponder the answer myself, and then read your informative (but surly) response.

      --
      Mon chien, il n'a pas du nez. Comment scent-il? TrÃs mauvais!
    2. Re:Google by Chryana · · Score: 4, Informative

      I tried xpra to hold the mail/news/calendar (Kontact) application in KDE, and it crashed after about a day... So I wouldn't recommend it personally, or at least not yet. As for xmove, the xpra FAQ states it has been without maintenance since 1997.

    3. Re:Google by ArtInvent · · Score: 5, Informative

      You know, I've messed with multiple monitors enough on Linux for a few years to know that just about anything is possible, but it's not always easy. At all. I think this is a very valid question to ask /. because he is certainly trying to do something that's not at all 'out of the box' with the simple multimonitor support in things like nvidia-settings or Xinerama or whatever. In fact, some of the responses I've read seem to indicate that exactly what he's after isn't actually possible. I recently *finally* figured out how to account for overscan on my HDTV. It involved a custom metamode line and other junk in xorg.conf, quite a lot of Google hunting, a very specialized Windows-only monitor analysis app, and mathematics to arrive at the value. A LOT of stuff that other OS's can do with a nice onscreen GUI are still not even close on Linux. Google does not give you answers. It gives you data and tons of it. And I have no idea what to say to people who take the time to read these questions and get offended that they were asked, and bother to answer them (incorrectly) along with an insulting rtfm or something. No one really forced you to read or respond to anything. You're wasting your own time.

  4. Enlightenment by illogict · · Score: 5, Informative

    Enlightenment DR17 (http://www.enlightenment.org) lets you do that: virtual desktops are managed on a per-screen basis, and still you can move windows between screens. Don't worry it is not "officially" released, it's really stable, I've not seen a crash or anything for months.

  5. Re:Enlightenment +1 by Anonymous Coward · · Score: 4, Informative

    it's really stable, I've not seen a crash or anything for months.

    More importantly: I've only ever seen the window manager crash, but it has never brought down X with it. When it crashes, it gives you a very helpful (and ugly) dialog which allows you to restart the window manager. In the 3 years of using e17, I have never had a single application crash or data loss. And the last e17 crash is from 2008, I think.

    Oh, and: mod parent up.

  6. Car analogy for Windows users by mangu · · Score: 5, Insightful

    You didn't understand the question.

    Here's a simple car analogy: a Linux user asking for tips on advanced uses of virtual desktops is like an off-road rally racer asking for tips on configuring the differentials on a 4x4. Your answer is "use a Ford Taurus".

    1. Re:Car analogy for Windows users by gyrogeerloose · · Score: 4, Funny

      a Linux user asking for tips on advanced uses of virtual desktops is like an off-road rally racer asking for tips on configuring the differentials on a 4x4. Your answer is "use a Ford Taurus".

      Your car analogy makes more sense, in fact, since the largest purchasers of the Ford Taurus were car rental agencies. Everyone knows that the best off-road vehicle is a rented vehicle.

      --
      This ain't rocket surgery.
  7. Re:Very good question. by sleekware · · Score: 5, Informative

    Ah! This might be it, I just Google'd it and it looks very promising: http://awesome.naquadah.org/

  8. Re:xinerama and xrandr by Homburg · · Score: 4, Insightful

    I don't think that actually answers the OPs question. Xinerama or XRandR allow you to set up dual head (which the OP presumably already knows about - he talks about having "one big desktop," which is what Xinerama and XRandR give you), but virtual desktops are handled by the window manager, not by Xinerama or XRandR. A Xinerama or XRandR aware window manager could do what the OP wants, giving separate virtual desktops on each monitor, but simply using Xinerama or XRandR won't get that effect unless you use a specific window manager which offers that option.

  9. Re:xinerama and xrandr by HeronBlademaster · · Score: 5, Informative

    xinerama + xrandr does not solve the question posed by the OP. Xinerama allows the two alternatives mentioned in the OP as the undesired options (i.e. either two monitors as one screen sharing a workspace, or a separate screen on each monitor which does not allow moving windows between screens).

    OP wants two monitors with their own separate workspaces, while still being able to drag windows between them.

    In other words, OP wants to be able to transfer running applications between separate X screens, which to my knowledge is not currently possible (or, if it's possible, the functionality is not exposed in Gnome or KDE).

    This isn't "+1 Insightful", it's "-1 Didn't bother reading the OP" (or "-1 Doesn't really know what xinerama+xrandr does").

  10. Re:xinerama and xrandr by Arthur+Grumbine · · Score: 5, Funny

    Strings used: "xinerama vs xrandr", "xinerama", "xrandr"
    Gosh, isn't it obvious?! Fucking christ, it's the 201st decade, use clairvoyance.

    --
    Now that I think about it, I'm pretty sure everything I just said is completely wrong.
  11. Re:Go away, TROLL! by Homburg · · Score: 4, Informative

    With the one large desktop when you maximize a window it fills both monitors

    No it doesn't. Most window managers have handled multihead the way you saw Windows 7 does for some years now (five or six, I think).

  12. Re:Very good question. by sammyF70 · · Score: 4, Informative

    yes. probably Awesome WM. There is such a picture on the Awesome homepage (http://awesome.naquadah.org/). It's often advertised as a tiling manager and Julien Danjou seems to have been so upset about that that the 3.4 release now defaults to floating layout on all tags (you can default any tag to tiling or floating, and in the case of multiple monitors, you can have a tilingbehaviour on one monitor, and a floating one on the other monitor, and move windows and applications back and forth).

    Awesome is indeed awesome, if you don't mind some manual editing of the lua configuration file.It should fit the OP's requirement nicely. Additionally, it's a blast on netbooks

    --
    "DRM is like the Ford Pinto: it's a smooth ride, right up the point at which it explodes and ruins your day."-C.Doctorow
  13. Re: by anagama · · Score: 4, Informative

    I use mac laptops and linux desktops. I'm not an Apple hater, maybe even a fanboy to some degree. But I don't think a mac will help him do what he wants. With a second monitor on a mac, you can either do screen spanning or screen mirroring. He is saying he doesn't want spanning, he wants both monitors to have their own "desktop", i.e., separate menu bars and such with the added kicker of being able to move apps between the separate desktops. You can think of spanning as a big desk and separate desktops as two desks in two rooms making it a hassle to shuffle one set of papers to another. What he wants is two desks in one room with the ability to move papers back and forth at will, but with each having distinct work areas.

    It would be cool if macs did that, but they don't. So getting a mac is totally useless for him.

    --
    What changed under Obama? Nothing Good
  14. This is a first by 93+Escort+Wagon · · Score: 4, Informative

    Smug answers from Windows users AND smug answers from Linux users - and neither group seems to actually understand the questions the poster is asking!

    He wants independent desktops, guys. All these silly "Jus use Windows 7, dummy" and "Use Xinerama, idiot" responders are not grasping that fundamental point - you're all thinking of one large desktop that spans multiple monitors. Basically you're confusing desktops with viewports.

    Unfortunately I don't know the answer either - but I do think I at least understand the question...

    --
    #DeleteChrome
  15. Re:Go away, TROLL! by mangu · · Score: 5, Informative

    With the one large desktop when you maximize a window it fills both monitors and things might size oddly if your monitors aren't the same size/resolution

    That's true and it does not depend on which operating system you're using.

    In Windows 7 multiple monitors were made extremely easy to setup

    It was extremely easy to setup in Linux long before Windows 7 came out.

    Windows multiple monitors also supports having separate monitors where you can maximize a window on a single display, but you can move windows between the monitors or even span multiple monitors. Is this setup possible to do under Linux?

    Of course. In Linux, or at least in KDE, there are several other easy ways to handle window resizing. If you mid-click in the maximize button the window is maximized vertically but it keeps the original horizontal size. Conversely, if you right-click in the maximize button the window is maximized horizontally and keeps the vertical size. Want to fine-tune the window size? Press the ALT key and the right mouse button simultaneously, the cursor will grab the *nearest* window border, no need to hit the *exact* pixels of the border.

    Finally how do you have putty run an x session? You can use it to do an ssh tunnel, but you'll need something else to handle connection to the xserver.

    If you say so. All I know is that it's trivial in Linux, but I always hear people complaining they must install Cygwin and puTTY and I don't know what else to run Xwindow in Windows.

  16. Re:gnome is just fine. by serviscope_minor · · Score: 4, Insightful

    What happens when you go to a virtual desktop? Do all the windows on both screens change? If yes, then you just failed to read the summary.

    --
    SJW n. One who posts facts.