GNOME Bugzilla – Bug 351647
Metacity can not be restricted to single screen
Last modified: 2016-08-18 13:38:46 UTC
Metacity can not be resticted to a single screen, but attempts to manage all screens in a multihead system
Created attachment 71025 [details] [review] Patch to disable multi-screen support This patch restricts metacity to the first screen (:0.0)
Isn't managing all the screens generally what's wanted for most people? (Reporter: thanks for the patch; please in future generate them with the -u option on this bugzilla)
This patch is clearly wrong, since managing all screens is the normal case, we wouldn't want to just disable that. Metacity will also ignore any screens that already have a WM; so you could skip a screen by starting fvwm or twm or something on it first. An appropriate patch might be some kind of skip_screens=[2,3] list or something like that.
I agree with Havoc that a more "appropriate" patch would use some sort of environment variable, or configuration option; I'm just not sure how to best implement that "properly" And, Thomas, you're right that most people want to manage all the screens. I happen to be doing work for somebody only wants a plain X environment... no window manager, no gnome-panel, no nautilus. The monitor is 1024x1024 (really... not a typo), and they need their usable display to be that same size.
Just helping Havoc out by marking the patch status for him... ;-)
I could make it a gconf option to have a list of integers which were screen numbers. Or we could pass it in on the command line. What would you prefer?
I think a gconf item would be better; multiple applications would have access to it, right?
Yes. Clearly the default should be to use all screens available. With that in mind, would it be useful for you for the list to be a list of screens it SHOULDN'T manage, rather than ones which it should (so that the default was an empty list)?
*** Bug 567808 has been marked as a duplicate of this bug. ***
I agree that by default it should do what everybody expects (e.g. start on all screens) and just have an additional option to tell which screens should be ignored. Since, as you have told me, metacity will run on all screens but of a single display, a simple comma-separated list of screen numbers to ignore would work.
Created attachment 126737 [details] [review] Ignore comma-separated list of screens Here's my attempt at solving this one. Let me know whether it works for you.
Sorry for the delay, finally I have tested it. Yes it works although I had to patch /usr/bin/gnome-wm in order to add the --ignore-screens=1 parameter to metacity command line. However, after killing metacity it's restarted by gnome-session without any parameters. I think a gconf option would be much better. But since someone may run multiple metacities on different displays I still think it would be better to be able to specify the full screen name to ignore (e.g. either "1" or "0.1", if user wants to be more specific). Anyway, I have enabled compositing on :0.0 and still on :0.1 video plays without tearing. Hurray! :)
If it was in gconf, would a string be better or a list of integers? Probably a string because nobody seems to know the lists. :)
I don't know how you would represent a string like "0.1 .2" as a list of integers. So in my opinion, a string would be the best (using either comma or spaces as separator).