Slashdot Mirror


Dynamic GUI Window Redirection?

Chris Tyler asks: "Picture this: you're sitting on the couch surfing on your tablet. You find something interesting (or funny or informative), so you say, "Hey! Look at this!" and send the window to the video projector shining on one of your walls. Or you are surfing for a hotel reservation and want to show it to your spouse before you click on 'book it'. Or you're viewing a report on your PC and the captain orders, 'on viewscreen!' With viable tablet PCs inching ever so slowly towards market, 802.11b an established technology, and more programmable pixels blinking at us then ever before, redirection capability for GUI windows will become a more and more desirable feature. X11 has some great network capabilities, but doesn't easily send to multiple displays or enable a window to be switched between displays. VNC is cross-platform and does permit disconnect/reconnect, connection initiation from either end, colourdepth mapping, and multiple views of the same desktop, but it is desktop-oriented (as opposed to window-oriented) in most implementations. Are there any good solutions for dynamic window redirection? What features would a good redirection solution include?"

41 of 51 comments (clear)

  1. Possible Solution? by genomancer · · Score: 2, Interesting

    Ok, so I suspect this isn't feasable, but I have two monitors set up with an ajoined desktop, and I can drag/send windows between different desktops.. so couldn't you map two different desktops to two different devices and just move things between them?

    G

  2. Here's what I do... by qurob · · Score: 2, Funny

    ALT-PrtScr...open up a new email in outlook, hit Ctrl-V, paste it in there....hit send...

    It's better for troubleshooting, etc

  3. Indirection by crow · · Score: 4, Interesting

    This is a great idea. It would be wonderful if X were designed to allow applications to dynamically change their display setting, or even talk to more than one X server at once.

    In most cases, it would simply be a matter of hacking the X library to allow you to close the connection to the server and open a new one (presumably to a different server). There might be some issues with having your resources suddenly change (you know, the stuff in places like ~/.Xdefaults). There might be a lot of issues of font support being different on the other server. There might be issues of assumptions that the server knows what windows you already have open. And it doesn't let you display on two servers at once.

    With the current architecture of X, probably the best solution is a vnc-like virtual X server. This would be what your applications talk to, and it would open connections to zero or more real X servers. (No reason to require a real X server all the time, is there?) This is very similar to VNC, except that it's done on a per-window basis and talks X protocol to the real display server. Now we just need someone to write it.

    1. Re:Indirection by GreenKiwi · · Score: 1

      X apps can talk to more than one display device at once. I used to use xemacs and have it displayed on several different computers at the same time. It was great, I could be coding in a buffer and my friend could be following along in my code, fixing bugs...all in the same buffer. I think that X probably doesn't care whether or not you are using multiple displays, and that it is just the application that has to be writting to do this.

      (I believe the xemacs command is something like "make-frame-on-display", but I don't remember it exactly.)

    2. Re:Indirection by ratboy666 · · Score: 1

      FYI: X is designed to allow applications to dynamically change display settings, AND talk to more than one X server at once.

      For changing "display settings", an application can use any visual available. Of course, common "PC" display hardware won't let you run direct color and color-map in separate windows at the same time -- that would be a hardware limitation though, and not a software limitation.

      Of course an application can talk to multiple X servers. Not many do, but this is NOT a defect of the X protocol.

      As to moving an application from one X server to another -- this requires a bit more work. It is "doable". I would use something like Xnest as a base. The local applications would connect to the local X server, that would keep track of the applications screens. The local X server would then connect with a remote X server (as a client), reproducing the applications resources on the remote X server. This would also allow X applications to be "suspended" -- in a state where they are NOT connected to any remote servers, and yet are still running, ready to be connected to.

      The local X server could also do multiplexing, allowing multiple input streams, and muxing output to a collection of remote X servers. I wouldn't implement that feature in "version 1", though.

      Maybe something like this already exists?

      Anyway, its not an issue with the X protocol itself...

      Problems: Change of visual in moving from one remote X server to another. Eg. color-map visual moving to a monochrome X-Terminal.

      Ratboy

      --
      Just another "Cubible(sic) Joe" 2 17 3061
  4. Still possible by crow · · Score: 2

    Saying something is impossible always sends up a red flag for me. Sometimes poeple say this because the problem is NP-complete, but they miss the idea of using aproximation algorithms that provide a solution that is good enough. In this case, you point out a valid technical problem, but then assume that there is no solution. In fact, there is a very simple solution for this sort of problem. Think of IP Masquarade, and then apply the concept to this situation--write a X11 proxy that changes the window IDs.

  5. Re:Mathematically impossible by douglas+jeffries · · Score: 1

    there is no reason to demand that the window be redirected with all resources unchanged. unique identifiers must be unique, but could be reassigned.

    since we probably just want it to be the same from the user's perspective, there is nothing preventing this and it sounds (to me) just like how I run individual programs from the Solaris machines across my school's network and display them on my personal machines. The only problem I see with X is sending one window to multiple displays, but nothing makes that technically more difficult, it just requires extending the functionality already present in X.

  6. Re:Mathematically impossible by TheDawgLives · · Score: 1

    Technically, we wouldn't have to move the wondow to a new desktop as long as we can display a picture of it. Chris Tyler is on the right track when he mentioned VNC because they do the exact same thing that you are saying is impossible. We would just need to scale it down to a single window instead of the desktop.
    There are X programs that will take a screenshot of a window instead of the whole screen, why can't we apply something like that to this situation.
    Great inventors have always forged on when others said it was "Mathematically impossible" (The Wright Brothers for example). Remember, there are no stupid questions only stupid answers

    --
    -TheDawgLives suckitdown
  7. Quite a new idea by Bravo_Two_Zero · · Score: 2

    Hmmm. Interesting idea, and one I can honestly say I'd given no thought.

    Just sort of off the cuff, and in a Linux-based world, how about an extension to XFree86 (module, if you like) where you'd define additional screens and/or pointing devices for the wall viewer.

    It could be kinda kludgy because it's just an extension of existing tech, but the viewtablet could be a new sort of X device itself. Think of it like an old Wacom digitizer but with video. Maybe you'd move the window to a virtual desktop that is wall-viewer-aware. You'd maintain joint control via the tablet or another form of pointing device.

    Also, wouldn't it be more straightforward to extending X using the current device concepts (Screen, Input) for the new concepts? I'd think it would be possible to extend that to an eye-tracking mechanism and voice commands (see the Sun-produced movie "Starfire" -- http://www.asktog.com/starfire/starfireHome.html) so you could free yourself from mouse and keyboard actions as well.

    I guess it doesn't sound so daunting after all. It seems like it's just a matter of having drivers and definitions for the new devices. I think I'm oversimplifying, though. It might be the wonderful Indian food I had for lunch... too many endorphins.

    --


    Amateurs discuss tactics. Professionals discuss logistics.

  8. Xinerama by crow · · Score: 2

    Yup, what you describe is, I believe, exactly what Xinerama does.

    I don't think it allows you to move windows between arbitrary X displays, but it's a step in the right direction.

    Perhaps someone more familiar with Xinerama could say something intelligent about it?

  9. xnest hack? by pong · · Score: 2

    I wonder how hard it would be to hack xnest to allow the server to open a new window on a new display and close the old one. This would solve the problem.

    For those who don't know xnest

  10. Plan 9? by JimDabell · · Score: 1

    It might be my imagination, but doesn't plan 9 support something like this?

  11. XMX - windown multiplexor by Rural · · Score: 1

    There's always XMX - An X Protocol Multiplexor, but I couldn't get it to work when I tried it (though I didn't waste too much time). The only "fault" is that you must run your primary session through it if you want to later have windown appear on many desktops. Dunno about its overhead. I just use x0rfbserver when I'm in a bind.

  12. Re:Mathematically impossible by Beowabbit · · Score: 1

    The app(s) could be smart enough to clone the contents of the window on another display on request. It wouldn't be the same X connection (not literally the same window) but if it were identical and had all the same state, it would amount to the same thing. Obviously, you really want that integrated at a pretty low level (at the toolkit level or below), so individual apps didn't need to care, but it would be pretty easy to implement for an individual app at a higher level.

  13. Re:Mathematically impossible by SilentDissonance · · Score: 1

    If you are going to suggest improvements to tech products, please have a clue about them before opening your mouth.

    Whoa, easy there, fella. I know you're a Linux god and all, but a lot of us out here reading Slashdot aren't. We don't know how X11 handles the Windows IDs. This is good information, but it's not a point to berate people over. Rather, it's a flaw in the system that needs correcting to attain an awesome OS that everyone wants to use.

    Having recently seen Minority Report, I can see what's being looked for. The way Anderton (Tom Cruise's character) moved from machine to machine, dragging visual representations of the data he was working on to small holographic plates was definitely a cool and intuitive way to move around in a computer.

    You want this data somewhere? Drag it to a 'disk' then drag it off the disk. What could be simpler?

    Now, I know we're quite a ways away from holographic interfaces of the scale in the movie, and probably will never see something exactly like that (after all it's a movie, it's not real), but the next best thing would be sending the window we're working on to another display via some easier method than saving, and reopening it elsewhere. You want the display to show exactly what you were working on; no scrolling to find the exact place in that website/document you were looking at. This helps keep a continuity of thought going or allows you to show more people what you're doing easily.

    As I said, this highlights a flaw in the XWindows system, as moving what the user considers an object (the browser window in it's current state) from one machine to the next seems natural. Rather than a critical view of the poster's ignorance on the subject, how about a description of how it can be done, and what changes will need to be made to the OS to allow this to be possible. If I'm not mistaken, that was kind of the whole point of Linux being open source; it allows you to make modifications to it to make it better.

    Rather than an attitude of "It's impossible, you're stupid," wouldn't it be better to take the view of "It's impossible with the way it works now, but it could happen if..." I see nothing but progress happening with that statement.

  14. Essentially all you're showing is information... by stienman · · Score: 5, Insightful

    Essentially all you're showing is information, and since the information will be available to all devices all that is needed is an appropiate viewer on the target device and a 'pointer' to that information.

    Enter the unifrom resource locator, a new invention of mine. All you need to send is this nifty string, and the target device will not only get the information, but it'll start an appropiate viewer for it. I'm selling them cheap, too. You can buy a hundred of these bad boys for a mere penny. There are greater discounts in quantity, but please be aware that the license requires payment for each transmitted URL (ie, it's not royalty free once you buy one URL)

    Seriously, this problem has been solved, though the actual mechanics of it needs to be smoothed over.

    For those thinking, "Duh, but it only works for web pages." slap yourself silly. A Uniform Resource Locator is exactly that, whether it's pointing to a server, a jpeg, an html file, any kind of document, or a port on your system which has a video stream coming from it. They can point to programs, current X sessions, windows, processes, etc.

    Let's not go reinventing the wheel, ok? Good.

    -Adam

  15. Something along the lines of VNC by uradu · · Score: 2

    If you want a cross-platform solution, you have to forget about X. Basically, the source machine from which you want to export a window to a destination machine has to become the display server, and the destination machine becomes the display client. It seems the easiest solution would be to hack a custom VNC to make it window oriented, so that the client can display multiple individual windows from the server as if they were local windows. It would also be nice to add some browsing capabilities to be able to browse for destination machines, since the current VNC is quite spartan in this respect. Then again, you have to wonder if the user experience might not become too confusing, having some remote windows intermixed with local windows, and telling which is which. Perhaps the current desktop oriented VNC is good enough?

    1. Re:Something along the lines of VNC by ensignyu · · Score: 1

      The VNC server is an X-server with no monitor that redirects the pixels written to it to a VNC client. Using X directly has an advantage over VNC in that the X display knows where the windows are. Some commercial X-servers for Windows have a local windowmanager that makes the remote UNIX app windows look like local Windows windows.

      X-Window servers exist on Windows (mostly non-free for Win), Mac OS X, Java, and the various unices. X-Windows can communicate over TCP/IP. I believe there's a project trying to redirect Windows GDI calls into X client calls. If this could intercept all GDI calls, Windows could display windows on a UNIX machine or any other machine with an X-server.

      If VNC became window-oriented, wouldn't it be essentially the same thing as a stripped-down X (minus the features and bloat)?

    2. Re:Something along the lines of VNC by uradu · · Score: 2

      > Some commercial X-servers for Windows have a local windowmanager

      Those would be X clients, not X servers. They allow you to view the remote desktop of a Unix machine running X, not the remote desktop of a Windows machine. Serving up a Windows desktop to a remote machine is a lot trickier since Windows doesn't provide much hinting regarding drawing requests of local clients. IOW, when an app requests a DC and each time it draws on it, you would like to be notified of the drawing primitives used (line, fill, text, brush etc.), so that you can echo the operation to the remote client. Alas, Windows won't tell you that. You would have to rewrite GDI32.DLL to hook yourself in at this level. What the VNC server does instead is to add a system hook dll into the process space of each running app, intercepting all incoming messages to the apps' windows and checking for certain operations (such as rectangle invalidations, PAINT, window movement and resize, etc), and using the appropriate coordinates to grab a rectangular bitmap, compress it, and send it to the remote client. The VNC server on Windows is entirely bitmap based, I believe, it mirrors no vector operations at all. The VNC server for X OTOH can intercept all X drawing operations, so it can echo a much leaner data stream. That's why viewing a remote Windows desktop is a lot slower than viewing an X desktop. And no, to my knowledge VNC does in no way use the X protocol, so your assertion that the VNC server is an X server is incorrect.

    3. Re:Something along the lines of VNC by ensignyu · · Score: 1

      On Linux/UNIX, vncserver is a daemon. When I start vncserver, it becomes available as localhost:1. X-clients such as xterm, kde, etc, connect to vncserver, and vncserver sends the pixels via VNC's vfb protocol to VNC clients.

      The confusing thing when talking about X is that the whole client-server system may seem backwards depending on your point of view. A more appropriate term might be "display server" (for X server) and "application" (for X client). To make matters worse, VNC seems like the opposite (client displays graphics, server sends graphics to client)

      I would think that you could mirror a Windows display to X (client = Windows application, remote X-server = viewing screen), by copying bitmaps to a remote X server in the same way as VNC (but with explicitly defined windows and maybe even extensions like OpenGL rendering). It's probably not worth it unless there were an easier way to do this. By the way, there's a program called kvfb which mirrors a KDE desktop (running on a real X server) to VNC.

      So I think X could be used like a more powerful version of VNC with accomodations like distinguishing individual windows. If VNC sent its bitmaps with window boundries as well, wouldn't it be essentially a simpler form of X? So I think the main advantage for VNC is a practical one (namely being cleaner and easier to implement).

      A downside to X would be for non-window-oriented paradigms especially for embedded stuff, but it sounds like QNX's Photon doesn't mind (disclaimer: I have never used Photon remotely).

    4. Re:Something along the lines of VNC by ensignyu · · Score: 1

      Correction (I should preview before posting!): It's krfb, not kvfb. VFB is virtual frame buffers, not the underling VNC protocol (RFB). Sorry.

  16. Single window sharing planned for TightVNC by kevin42 · · Score: 3, Informative

    There is a patch out there for sharing a single window (only works with the windows server right now) for TightVNC. I believe that the maintainer of tightvnc plans to integrate this functionality in the future (based on a posting to the tightvnc mailing list).

  17. The U in URL by Strange+Ranger · · Score: 2

    How many things do you really want to share that don't have a URL? How about in a few years from now?

    Send this screen to a friend..

    --

    Operator, give me the number for 911!
  18. xmove can do this by Col.+Klink+(retired) · · Score: 5, Informative

    From the man page:

    NAME
    xmove - pseudoserver to support mobile X11 clients

    SYNOPSIS
    xmove [ -server server_name:port ] [ -port listen_port ]

    DESCRIPTION
    xmove starts a pseudoserver which allows its X11 clients
    to be relocated from one display to another. Upon startup
    it will create a listening port from which it accepts new
    client connections. All such clients will be displayed on
    the default server, until moved elsewhere. Several
    clients may connect through a single xmove, thus requiring
    only one per machine.

    --

    -- Don't Tase me, bro!

    1. Re:xmove can do this by bluestar · · Score: 1

      Some searching only turned up a commercial product from 1997. It (used to) cost $3,000 and the website no longer has any mention of it.

      --
      "The cost of freedom is eternal vigilance." -Thomas Jefferson
    2. Re:xmove can do this by Col.+Klink+(retired) · · Score: 2
      --

      -- Don't Tase me, bro!

    3. Re:xmove can do this by fizbin · · Score: 1


      ftp://ftp.cs.columbia.edu/pub/xmove/
      has it.

  19. Emacs used to be able to do it by bluestar · · Score: 2, Informative

    Emacs used to have M-x set-display (or something like that) which changed the display for that session. I don't know for sure, but I suspect it simply unmapped itself and then mapped a new window on the new display with the old documents.

    So in short, the X server doesn't seem to support it but an app can do it and maybe a window manager could fake it.

    As others have said, VNC can allows multiple (simultaneous) clients.

    --
    "The cost of freedom is eternal vigilance." -Thomas Jefferson
  20. XFree86 RandR extension by jgilbert · · Score: 1

    The X Resize and Rotate Extension - RandR

    See the section on Migration and Replication. Haven't looked at it lately. I wonder what the current status is.

  21. This works for me by xchino · · Score: 1

    I use VNC http://www.uk.research.att.com/vnc/ and x0rbfs http://www.hexonet.de/software.en/ server to export my :0 desktop out to any other computers, and all that is required is a java capable web browser. VNC is also truly cross-platform application, I can output my linux desktop to my palm over a wireless connection.

    There is also a ton of other things you can use VNC for, such as application service providing.

    Hope this is helpfule!

    --
    Everyone is entitled to their own opinion. It's just that yours is stupid.
  22. HP used to have Shared X by sartin · · Score: 2, Interesting


    Years and years ago (1989 or 1990? I know I was using it in 1990), some folks at HP Labs created an X server that shared and transferred windows among different hosts. It was called SharedX and became a product.
    </p>
    <p>
    It was basically the hypothetical solutiond described by others: a virtual X server that allowed having the windows appear on multiple desktops. They went through a lot of agony to deal with different screen depths and worried about, but never solved, issues of gamma correction.
    </p>
    <p>
    It was a joy to use. I could share individual windows with other people and selectively grant input control to them. Although moving windows wasn't a target feature, it was available as a side effect.
    </p>
    <p>
    I searched for it recently and couldn't find any interesting web references.
    </p>

  23. emacs still has... by Tom7 · · Score: 2

    M-x make-frame-on-display ... which creates a new frame (ie, window) on an X display. You can do this and then two folks can simultaneously edit the same file! Unfortunately, there is only one minibuffer, so some commands and editing styles are troublesome. But we used to do our homework this way; it's really fun...

  24. Alriiiight by Com2Kid · · Score: 1

    So who stole Matrox's Top Secret(tm) plans for their next video card?

  25. Minority Report Interfaces by khkramer · · Score: 2, Interesting

    You mention the interfaces in Minority Report...

    That stuff was done by this guy. His non-movie work is perhaps even cooler,
    given the constraints of building things that actually work:

    Luminous Room

  26. Keith Packard has some thoughts on the matter by akeru · · Score: 1

    http://www.xfree86.org/~keithp/talks/randr/randr/

    He talks about the "Resize and Rotate" extension (not yet implemented) to help with a number of issues that have plagued X for a while, including resizing of the actual resolution (rather than the way a resolution change is currently handled) and has some thoughts on how this extension could help with migrating X clients between multiple servers.

    --

    Let's hope that there's intelligent life somewhere out in space 'Cause there's bugger-all down here on Earth.

  27. Re:Mathematically impossible by t · · Score: 3, Informative
    You want this data somewhere? Drag it to a 'disk' then drag it off the disk. What could be simpler?
    Congratuations you've just given props to the sneaker net. That movie was the most moronic tech-cliche filled movie ever.

    Everything old is new again.

    t.

  28. Ever looked at NetMeeting ? by mritunjai · · Score: 1

    Netmeeting has a remote window/desktop feature. It can let people in a meeting give control of applications running on their computer to other people. So, you can show your boss an excel chart, he may change the graph types, modify values etc... All as if the application were running locally.

    --
    - mritunjai
  29. xwatchwin by BJC · · Score: 2, Informative

    xwatchwin lets you see what is being displayed in a window on a remote X server. It doesn't let you interact or move the window, and the display isn't perfect, but it does work and it doesn't need you to set up a proxy beforehand.

  30. Mod parent up!!! by sonamchauhan · · Score: 1

    "Make VNC windows oriented" ...Good idea, and the first one to suggest a decent, workable, solution. What are the moderators thinking... giving this post a 2, but giving the weak post on 'URLs' above a 4?!

  31. Re:Mathematically impossible by SilentDissonance · · Score: 1
    Congratuations you've just given props to the sneaker net.

    There's something to be said for the sneaker-net. That's how people think, and how people work. People like to 'carry' around their stuff, because that's how we work with everything else. Why not data too?

  32. Re:sheesh by unhooked · · Score: 1

    ok what idiot modded this offtopic?