Hi,
On 21.03.2013 05:22, Ole Johan Væringstad wrote:
[...]
> My question is "How do I launch/spawn a program on a given display on
> xinerama"
That's a good question. Once you figured it out, please tell me. The problem is
that the window manager has no "good" way to find a connection between "I
started some program" and "a new window appears". After all, the window could
belong to something different and it just has some bad timing.
There are some solution attempts:
- Identify the new window via the PID. We know the PID of the process we started
and we can figure out the PID that a window belongs to. However, this breaks
as soon as some shell script is involved. The new window will be running under
a different PID.
- The startup-notification specification tries to solve this exact problem.
However, AFAIK this is not supported widely (although the bare minimum of
this is supported in awesome!).
However, none of this provides an easy way for "hey, start this on screen 2". At
least I couldn't find anything from a quick look through the wiki.
> I put in my rc.lua:
> for s = 1, screen.count() do
> awful.util.spawn("urxvt", false, s)
> end
>
> Whereupon three urxvt instances are launched on my *left* display.
The screen argument is meant for non-xinerama systems were windows cannot be
moved between screens. It just influences the $DISPLAY environment variable for
the started process. In 3.5, it doesn't have any effect at all...
> I changed it to:
>
> for s = 1, screen.count() do
> awful.screen.focus(s)
> awful.util.spawn("urxvt", false, s)
> end
>
> Whereupon three urxvt instances are lanched on my *right* display.
> Now I'm confused.
urxvt needs some time to start. By the time its windows start to appear, the
mouse is on the last monitor and thus some of the
default-hidden-somewhere-in-awful code places this client on the last screen.
> If I try 'awful.util.spawn("urxvt", false, n)' in the lua prompt, the
> window is launched on my *currently focused* display, as long as n is
> within range
> of my screen count. If it is outside, awesome complains to stderr, as
> expected.
Again, the new client just appears wherever the mouse happens to be. :-)
[...]
Cheers,
Uli
--
"In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move."
--
To unsubscribe, send mail to [email protected].