Re: Switching program's X session



On 1 Dec 2006 12:31:54 -0800, ultr staggered into the Black Sun and
said:
How can I switch [the] X session a program is attached to? What I
want to do is run a program on :0 and then move it to :1 so that I can
close :0 [while] still having the program running. Is it possible?

Maybe. The theory is that you build xmove, then start it. xmove
creates a pseudo-X server that can be redirected to a real X display.
Then you start your X clients on this pseudo-server, then use xmovectrl
to control which real X server displays these clients.

Unfortunately, it's not that easy in the real world AFAICT. xmove
hasn't really been maintained much, and though it builds on amd64, it
doesn't *work* properly there. On x86, it appears to work better, You
have to have your real X server listening for TCP for xmove to work as
well, and any X server you redirect your X clients to must also be
listening for TCP. Remote X servers must have access allowed via xhost
or xauth, or redirection will fail. Most distros start X with -nolisten
tcp now, so you will probably have to fix that and restart X. Also,
xmovectrl fails with less-than-helpful error messages unless you do
something like "xmovectrl localhost:1 -list"--just :1 won't work.

There may be an easier way to do this if all the X clients you need to
move are going to be running on 1 machine. However, xmove *might* work
properly for you, if you can get to grips with its oddities and
non-64-bitness. HTH anyway,

--
"Dreams? Best leave dreams to those that can afford them."
--Aunt Cordelia, _Wizard and Glass_, Stephen King
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
.