Forgot your password?
typodupeerror
Displays X Linux

2 Displays and 2 Workspaces With Linux and X? 460

Posted by timothy
from the anything-you-set-your-mind-to dept.
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."
This discussion has been archived. No new comments can be posted.

2 Displays and 2 Workspaces With Linux and X?

Comments Filter:
  • I have seen a picture on the net awhile ago of a key-commanded window manager that someone had spread across 6+ different monitors. Does anyone know of this?
    • Re: (Score:3, Interesting)

      by ZankerH (1401751)
      You're probably talking about Awesome WM. It does both tiling and floating.
      • by sleekware (1109351) on Thursday January 28, 2010 @04:42PM (#30940628)
        Ah! This might be it, I just Google'd it and it looks very promising: http://awesome.naquadah.org/ [naquadah.org]
      • by sammyF70 (1154563) on Thursday January 28, 2010 @05:01PM (#30941032) Homepage Journal

        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

    • Re: (Score:2, Informative)

      by mellon85 (1723140)
      xmonad is one of those WM
      • Re: (Score:3, Informative)

        by sleekware (1109351)
        This one looks promising too! (Just did a Google search for it, http://xmonad.org/ [xmonad.org] Guess I'll have to try them both...
        • Re: (Score:2, Informative)

          by kabniel (609212)
          I've been using xmonad for 6 months now and i dont think i can ever go back a regular non-tiling window manager again, dual monitors with independant workspaces is just too sweet.
          Win + w/e to switch focus between screens
          Win + tab to cycle through windows
          Win + 1-9 to switch between workspaces on active screen
          Win + Shift + 1-9 to send active window to workspace of choice

          It was a pretty steep learning curve at first since the config is written in haskell, but totally worth it.

          You can have floating wind
  • tiling (Score:2, Informative)

    by by (1706743) (1706744)
    I know you don't want a tiling manager, but for anyone wondering, I can speak from experience that dwm works wonderfully with two monitors. I run an external 1920x1200 display, and an internal 1024x600 from my netbook.
  • 4 Screens (Score:5, Informative)

    by spribyl (175893) on Thursday January 28, 2010 @04:23PM (#30940202)

    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.

  • by chibiace (898665)

    gnome with two screens is just fine. you can maximize on either side and even use the window list say one panel per screen to show what windows are open on each display.
    most distros dont even need configuring for dualscreen now.

    • Re: (Score:3, Informative)

      gnome with two screens is just fine. you can maximize on either side and even use the window list say one panel per screen to show what windows are open on each display.

      I just want to second this. I have two monitors and one desktop stretched over both, but with gnome if you maximize a window it will snap to the edges of just the monitor it's on. You can stretch any window across both monitors, but you don't have to. I also duplicated the top and bottom panels from the 'main' monitor (my left) to the 'secon

    • by serviscope_minor (664417) on Thursday January 28, 2010 @06:02PM (#30942176) Journal

      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.

  • It's is going to be more work finding something that works as opposed to just adjusting your usage. Sad, but true... Plus the more monitors you have the less workspaces you will use. I currently have a 6 monitor setup (4 linux, 2 windows) and from just setting up 4 on linux, I would go with whatever works first. I'm just glad maximize works to maximize the window to a single monitor.
  • Google (Score:5, Informative)

    by Albanach (527650) on Thursday January 28, 2010 @04:24PM (#30940242) Homepage

    30 seconds with Google points me to

    http://en.wikipedia.org/wiki/Xpra [wikipedia.org]
    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 [wikipedia.org]
    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.

    • Re:Google (Score:5, Insightful)

      by Cormacus (976625) on Thursday January 28, 2010 @04:30PM (#30940358) Homepage
      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.
      • by Albanach (527650)

        Yes, I should have been less surly, but it would be nice to have seen an I've tried x and y and they won't work because...

        That way folk are going to be better able to help.

        • by Cormacus (976625)
          I know where you're coming from. I was reacting more to a perceived hostility than a real one. I just hate it when people jump on "ask /." question submitters.

          I do appreciate the information. I may go try some of those solutions even though I've never myself had the problem in question.
        • Re: (Score:3, Informative)

          by slick_rick (193080) *

          Mr. Albanach Surly should also mention that both the programs he linked are basically dead, unmaintained relics. One of the wikipedia pages he linked even mentioned this. He did actually read what he linked, right?

          The OP has asked a very interesting question though. If you could take something like xmove or Xpra and make an awesome [naquadah.org] window manager aware/compatible, it would be very interesting software indeed.

      • Re: (Score:3, Funny)

        by mrmeval (662166)

        Yes but sometimes it devolves into a 9mm vs .45acp debates which never ends.

    • Re:Google (Score:5, Informative)

      by Chryana (708485) on Thursday January 28, 2010 @04:38PM (#30940542)

      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.

    • by pydev (1683904)

      Those are nice and useful for moving windows between remote and local displays. But they are not really useful for working with multiple monitors.

      • Re: (Score:3, Informative)

        by Qzukk (229616)

        But they are not really useful for working with multiple monitors.

        They are when you want one monitor to have 9 virtual desktops, and a second monitor to be running 9 completely different virtual desktops, and about the only way you're going to get anything to do that is going to be running a separate X server on each monitor.

        Merge this with Synergy+'s recommendation below, and you can do all that with one keyboard and mouse.

    • Re:Google (Score:5, Informative)

      by ArtInvent (1164183) on Thursday January 28, 2010 @05:06PM (#30941150)
      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.
  • Synergy (Score:4, Funny)

    by Zerth (26112) on Thursday January 28, 2010 @04:26PM (#30940256) Homepage

    It's designed to share mice/keyboards/buffers across computers, but perhaps you could use it to share across X sessions on the same machine.

    http://synergy2.sourceforge.net/ [sourceforge.net]

    • Re: (Score:3, Funny)

      by Zerth (26112)

      Crap, I can't read. It doesn't let your render apps on other screens, and running 2 x sessions would already let you copy buffers, but not apps either.

    • Re: (Score:3, Informative)

      You don't need synergy for that. Xinerama lets you do that natively. What the OP wants to do is be able to move windows between X screens.

  • by v1 (525388) on Thursday January 28, 2010 @04:28PM (#30940308) Homepage Journal

    Most people want mirrored or spanned. What you're looking for lies somewhere in between. The trick being to enable spaces control on individual displays, while still allowing drag between displays.

    Good luck, haven't seen it. What you want is sufficiently unusual that there may not be anything that provides it. I suggest looking for someone else that's made their own variation of spaces support themselves, that offers the option to switch spaces per-display, as the odds of finding someone that's hacked an existing spaces to be per-monitor is probably going to be low.

    The other route would be to find a different variation on spanning, such that the separate monitors aren't necessarily spanned, but are simply adjacent, and if you try to drag a window, it can't exist partly on one display and partly on the other, but you can still drag a window from one display to the other. That may still allow you individual spaces control perhaps? I think that's the reason you're having problems, is that most spanning allows a window to overlap off one display onto another, so for one display to change space it requires the others to change also. If you look at it that way I think you'll realize what you're initially asking for doesn't make sense. (if the displays are truly spanned (attached) and not simply adjacent)

    • The latter option mentioned in the summary - each monitor being a distinct X session - is sometimes called Zaphod mode.

      I have opted for it myself, but the downside of not being able to drag windows is sometimes a real pain. You can mitigate this to some degree for text programs using screen or dtach. I am interested in trying out xpra, which promises to be like 'screen for x-windows', but I haven't had time yet.

      Another issue is that some programs, like Firefox, don't like to run multiple instances. So if

  • by rcpitt (711863) on Thursday January 28, 2010 @04:29PM (#30940328) Homepage Journal
    I've been running multiple monitors for a lot of years under Linux - currently have 4 monitors on 2 cards with another card in there but no monitors on it (yet)

    I run one big desktop with 12 virtual desktops - then for the applications I want to stay available when I move from one desktop to another I simply right-click on the icon in the upper-left corner (of most windows - Chrome beta doesn't have one for some reason) and select "Always on Visible Workspace" - then it sticks there no matter which workspace I'm on.

    Otherwise you could set up the VNC X-server and use VNC-viewer to log back in to the local system and use that window as your second, separate desktop.

  • Enlightenment (Score:5, Informative)

    by illogict (889976) on Thursday January 28, 2010 @04:29PM (#30940338) Homepage
    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.
    • Re: (Score:3, Informative)

      I was pretty sure someone was going to mention this before me. I just started playing with e17 this Monday. I got a shock when I realized it worked this way. Looks great too!
    • Re:Enlightenment +1 (Score:4, Informative)

      by Anonymous Coward on Thursday January 28, 2010 @04:36PM (#30940484)

      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.

    • Thanks for the link, I've wanted this ability for a long long time.

  • My setup (Score:3, Informative)

    by morgandelra (448341) on Thursday January 28, 2010 @04:30PM (#30940344)

    I use nvidia twinview on the monitors with Gnome. I also have 3 virtual desktops that I access via edge flipping on the vertical axis. I find this workas alot better than arranging the flipping on the sides with 2 large monitors.

  • Ask Slashdot? (Score:3, Insightful)

    by Admiralbumblebee (996792) on Thursday January 28, 2010 @04:42PM (#30940634) Homepage
    Has anyone noticed the OP never actually asked a question?
  • Enlightenment e17 handles this brilliantly. Each screen gets its own set of virtual desktops. Switching VTs on one does not change the current VT on the other.

    With Xinerama you can drag windows from one screen to the other.

  • by Punto (100573)

    why not just put some windows on one screen and some windows on another screen? it doesn't matter if the window manager considers it "one workspace", it'll still be 2 workspaces because they'll be on different physicals screens in real life.

  • Is it possible to do the same thing in Windows? OSX? Neither relies primarily on an X server, so I can see how it might make things more difficult. I know I would certainly like to be able to use screen zooming separately on the separate monitors (on OSX, which doesn't handle screen zoom very well if you're using dual: it zooms the combined desktop, and depending on settings, re-centers the screen if you perform an action like clicking a link)

  • by pz (113803) on Thursday January 28, 2010 @04:58PM (#30940992) Journal

    I have had a computer running Linux (Fedora of one flavor or another) with two displays for getting on to be most of a decade. Wouldn't work seriously any other way. I have 12 desktops (one for each Fn key on standard keyboards), which are linked so that both monitors switch at the same time.

    If you haven't TRIED this sort of setup yet (and it sounds very much like you have not), then I would encourage you to try it first. What problem are you trying to solve with being able to switch monitors individually? WIndows can be trivially moved between virtual desktops under Linux, and with single keystroke desktop switching (remember those Fn keys?) I find that I rarely, if ever, need to move applications from one desktop to another. To promote efficiency, I have adopted, over the years, a standard pattern of where given windows are. The details are good for me, but not necessarily anyone else, so I won't go through the particulars, but, just as one example, when I want to use a browser, I hit F6, and BOOM, there are two browser windows at full screen. When I need an editor, another single keystroke (F3, if you care), and BOOM, emacs on the left, and, usually, an xterm on the right. Fully maximized. Moving windows around and resizing them is a waste of time and screen area. Twelve desktops maps nicely to the Fn keys -- which, again, is why I have 12, and, again is why switching between applications is 1-keystroke-instantaneous -- and I cannot recall running out of room, ever.

    If the reason you want to switch workspaces individually is that you don't have enough flexibility in your workspaces (like you only have four per monitor), then you're solving the wrong problem. Increase the number of workspaces you have. Also, stop putting the task bar on the long dimension of the monitor -- that's the one where you have the least distance to play with. And if you're doing any document-based work, then it's a MUST to use portrait orientation.

    Or were you just going to dick around, switching the left workspace, then the right one, then the left, then the right?

    When people join my lab, they universally comment on how efficient my work setup is ... and usually leave using a very similar setup themselves.

  • Don't necessarily ignore any of the other advice here but with the last two Gentoo Linux builds I've done using Xorg Server v1.6.5, the detection was pretty much automatic.

    One was an ATI HD 3200 based laptop which, once I'd put the proprietary ATI drivers in place, didn't need anything added to xorg.conf, plus it detects the external display fine as well when plugged in; the other was an NVIDIA 7600GT based desktop which, again when I put the NVIDIA proprietary drivers in place, worked with only a few lines

  • Ok, you can't actually get seperate virtual desktops on different screens, however, using KDE you may be able to get something that's roughly feature equivalent.

    Using your favorite one of xrandr, xorg.conf, or the proprietary Nvidia/ATI tools, you can set up multiple monitors. The default behavior, in the latest Xorg, at least, will let you swap windows between your two displays, the default behavior for "maximize" in KDE will be to fill a single display with one large window, but if you do need a window t

  • X server abstraction makes this hard.

    The X server sits between your display driver and your window manager and does not communicate sufficient information about the underlying devices to the client program, which in this case is the window manager itself, that it's able to distinguish the real estate boundaries between the displays. Because it doesn't know the boundaries, it can't make good decisions on mapping a workspace (a window manager abstraction) onto a display (an X Server abstraction which is bein

  • "...but I'd rather go with 'classical' window managers, like Openbox/Gnome/KDE..."

    Seriously? You think KDE and Gnome are 'classical' window managers? Neither of them is a window manager. They don't call themselves window managers. They might include a window manager, but that's not what they are. Classical window managers are things like TWM, FVWM, Window Maker, Fluxbox, Blackbox, Enlightenment, Afterstep.


    Gumpy old Linux guy.

  • This is a first (Score:5, Informative)

    by 93 Escort Wagon (326346) on Thursday January 28, 2010 @05:35PM (#30941676)

    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...

    • Re: (Score:3, Informative)

      by smallfries (601545)

      No - he doesn't understand what he wants because he has freely intermixed the terms desktop and workspace in the question. This has quite rightly confused the crap out of both sides of the never-ending windows-vs-linux death-match on slashdot.

      It sounds like he wants independent workspace flipping on both screens, while dragging windows between. This is not hard to do, but by mentioning desktops he has confused everyone. The majority of the posts above are telling him that you cannot transfer windows between

Mathematics deals exclusively with the relations of concepts to each other without consideration of their relation to experience. -- Albert Einstein

Working...