multiple xscreens dialogues shown on wrong screen

Bug #279225 reported by TobiasDomhan
4
Affects Status Importance Assigned to Milestone
five-a-day
Won't Fix
Undecided
Markus Korn

Bug Description

this is concerning: five-a-day-applet
I have 2 monitors running on two different xscreens, when I try to open dialogues on my second xscreen they are shown on the first.
I have a debdiff appended, that fixes the bug for "manage loco teams", "manage teams" and "manage tags", though open wiki and open stats tries to open a browser on the first screen, which fails if the browser is running on the second screen already. it works if you do a os.putenv("DISPLAY",":0.1") for example, though I don't know how to set this dynamically corresponding to the screen the applet is on. you got to somehow get the values from the screen value returned from applet.get_screen(), though I lack decent python skills(never really worked with it) and skills of debugging an gnome panel applet.

Related branches

Revision history for this message
TobiasDomhan (tdomhan) wrote :
Revision history for this message
Markus Korn (thekorn) wrote :

Hi Tobias,
your patch is looking good to me, thanks for your work.
Additionally I tried to fix the issue with opening url in the attached patch. but I'm unable to test it, can you please do so with your setup?

Best way to test is to get the bzr branch, patch the branch with the attached patch and start the applet in the development mode:

$ bzr branch lp:five-a-day
$ cd five-a-day
$ bzr patch 279225.diff
$ ./5-a-day-applet -d

Markus

Markus Korn (thekorn)
Changed in five-a-day:
assignee: nobody → thekorn
status: New → In Progress
Revision history for this message
TobiasDomhan (tdomhan) wrote :

hi markus,
I tried your patch, and tinkered a bit around with it.
self.applet.get_display().get_name() returns the wrong value. (":0.0" on the second screen, should be ":0.1")
self.applet.get_screen().get_number() does return 1 on the second screen, so we _could_ merge those values.

Though the wrong value of self.applet.get_display().get_name() is in my eyes an bug of gnome.
I just tried it in a plain C applet (fprintf(fp,"%s",getenv("DISPLAY"));) which did return the same.
actually intrepid/the new gnome do not run well with 2 xscreens at all. there are so many bugs concerning a window being opened on the wrong screen.
especially with the gnome-panel.
I would claim that the DISPLAY environment variable of the gnome-panel is set wrong, which would be a gnome bug(proof me wrong)
therefore I would leave the code as it is and wait how the potential gnome-bug turns out.(I will investigate this now further)

Revision history for this message
TobiasDomhan (tdomhan) wrote :

mh I thought this is connected to a regression of gnome 2.24, which has quite some problems with 2 xscreens, though the above described is the same with gnome 2.22, therefore those two things are not connected.

There is only one gnome-panel process with is associated with the DISPLAY variable ":0.0", probably this is inherited from this process. don't know if this behaviour of self.applet.get_display().get_name() is intended or not.

I have wrote a function that combines self.applet.get_display().get_name() with self.applet.get_screen().get_number().
the DISPLAY variable contains something like "HOST:SOME_INT:SCREENNUMBER" this screennumber is being replaced by the one returned from self.applet.get_screen().get_number().
with this the applet works correctly here. as I don't know if self.applet.get_display().get_name() intended the way it is, I don't know if this is the way to go, or if this is just a workaround.
got a debdiff and uploaded it to a bzr branch(https://code.launchpad.net/~tdomhan/five-a-day/applet)

Revision history for this message
Markus Korn (thekorn) wrote :

Hi Tobias,
I can't test your recent changes as I don't have such a multi-screen setup, but overall the code is looking good to me and is not breaking single screen setups.

Daniel, can you please merge changes from https://code.launchpad.net/~tdomhan/five-a-day/applet into trunk?

Markus

Revision history for this message
TobiasDomhan (tdomhan) wrote :

if bzr request something, like a login name, password, accept fingerprint(yes/no) etc, the dialog is still being shown on th e wrong screen. I will have a look at that as far as I find some time.

Revision history for this message
Markus Korn (thekorn) wrote :

Tobias,
Well, this is something we cannot fix in the applet itself, it has to be fixed/workaround in bzr-gtk. I got the feeling that this is a bug in pygtk or python-gnome, so while you are on it, mind to file a bug there?

Thanks,
Markus

Revision history for this message
Daniel Holbach (dholbach) wrote :

The 5-a-day tool and the 5-a-day-applet are mostly obsolete now. The only thing that still works is "5-a-day --update" for those who want it.

Just join https://launchpad.net/~5-a-day-participants and the rest will happen automatically. Some statistics on http://daniel.holba.ch/five-a-day-stats are not there yet, but will come soon. Bug data is now retrieved "automatically" from Launchpad.

Changed in five-a-day:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.