Closed Bug 441140 Opened 16 years ago Closed 16 years ago

Xremote doesn't work when DISPLAY is not set but --display is

Categories

(Core Graveyard :: X-remote, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
While you can run firefox --display=:0 (DISPLAY environment variable not being set), you can't send a remote command with the same way. Instead, the window saying firefox is already running shows up. This is due to Xremote initialization code relying on XOpenDisplay(0), which only uses DISPLAY, while gtk will handle --display perfectly fine.

I see two possible solutions to this:
- PR_SetEnv DISPLAY with the value returned by gdk_get_display_arg_name
- Add a way to pass a display name to XRemoteClient initialization.

I'd go for the first one, which is both simpler and has the advantage to set DISPLAY for all subprocesses, such as helpers, which by the way, fail to start, too, when firefox is run with --display and no DISPLAY.

There might already be surprises with running DISPLAY=:0 firefox --display=:1...
Attachment #326175 - Flags: review?(benjamin)
Erf, firefox is even unable to restart itself (after addon installation for example) when running with --display and no DISPLAY. The first solution is definitely the way to go.
Attached patch better patch (obsolete) — Splinter Review
Assignee: blizzard → mh+mozilla
Attachment #326175 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #327236 - Flags: review?(benjamin)
Attachment #326175 - Flags: review?(benjamin)
Attachment #327236 - Flags: review?(benjamin) → review+
Keywords: checkin-needed
Mike: looks like, since we suck at doing checkin-needed in a timely manner, you bit-rotted yourself with the patch for bug 441137 - patch thinks the patch here still applies, but with some fuzz and a huge offset it puts it in totally the wrong place. If you haven't already fixed this in some other later bug, could we have a new patch, with which we'll try to do better?
Keywords: checkin-needed
Attached patch unbitrot patchSplinter Review
Attachment #327236 - Attachment is obsolete: true
Pushed as 17106:c1290008ed54.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: