Closed
Bug 110561
Opened 24 years ago
Closed 17 years ago
-remote does not work with --display
Categories
(Core Graveyard :: X-remote, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: ted, Assigned: wolfiR)
References
Details
Attachments
(2 files, 1 obsolete file)
|
14.65 KB,
patch
|
caillon
:
review-
|
Details | Diff | Splinter Review |
|
5.34 KB,
patch
|
Details | Diff | Splinter Review |
If mozilla is running on a different display, using the --display and -remote
options together fails to find a running window.
Example:
start mozilla on display :0.1
in an xterm on display :0.0:
tam4@rawr:~$ mozilla/mozilla -display=:0.1 -remote
"openurl(http://www.lehigh.edu/~tam4)"
mozilla/run-mozilla.sh mozilla/mozilla-bin -display=:0.1 -remote
openurl(http://www.lehigh.edu/~tam4)
MOZILLA_FIVE_HOME=/home/tam4/mozilla
LD_LIBRARY_PATH=/home/tam4/mozilla:/home/tam4/mozilla/plugins
LIBRARY_PATH=/home/tam4/mozilla:/home/tam4/mozilla/components
SHLIB_PATH=/home/tam4/mozilla
LIBPATH=/home/tam4/mozilla
ADDON_PATH=/home/tam4/mozilla
MOZ_PROGRAM=mozilla/mozilla-bin
MOZ_TOOLKIT=
moz_debug=0
moz_debugger=
No running window found.
Workaround:
export DISPLAY=:0.1; mozilla/mozilla -remote "openurl(http://www.lehigh.edu/~tam4)"
| Reporter | ||
Comment 1•24 years ago
|
||
I typoed the --display commandline argument in the example, but it is still
broken even if it's spelled right.
Comment 2•24 years ago
|
||
blizzard
Assignee: law → blizzard
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•23 years ago
|
||
enables --display=DISPLAY for mozilla-bin and mozilla-xremote-client.
BTW: mozilla-xremote-client doesn't work from a DEBUG build. It complains
about NS_CurrentThread being unresolved. Not really a big deal tho.
Comment 4•23 years ago
|
||
*** Bug 151518 has been marked as a duplicate of this bug. ***
Comment 5•21 years ago
|
||
You can reproduce this bug even if you only have a single display.
1) run mozilla (on display :0.0)
2) unset DISPLAY
3) mozilla --display=:0.0 -remote 'openURL(google.com, new-tab)'
You will see "Failed to connect to X server."
'--display' is being ignored.
| Assignee | ||
Updated•20 years ago
|
Assignee: blizzard → mozilla
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 6•20 years ago
|
||
this new patch extends mozilla-xremote-client to recognize "--display DISPLAY"
as parameter and makes it known to mozilla-bin/firefox-bin/thunderbird-bin
while using the -remote parameter. (hopefully I pinged the correct persons for
r/sr)
Attachment #83236 -
Attachment is obsolete: true
Attachment #175910 -
Flags: superreview?(roc)
Attachment #175910 -
Flags: review?(blizzard)
Comment 7•20 years ago
|
||
thunderbird has its own startup script here:
http://lxr.mozilla.org/mozilla/source/mail/app/mozilla.in
| Assignee | ||
Comment 8•20 years ago
|
||
this patch is untested yet. Will try it soon.
Comment on attachment 175910 [details] [diff] [review]
extended patch
I can't sr this since I actually wrote a lot of it. One thing I noticed on
rereading the patch:
+ if (strcmp(argv[i], "--display") == 0) {
We should test argc to make sure that argv[i + 1] is actually there.
+ --display)
Similar here, we need to ensure there actually is a $2.
Attachment #175910 -
Flags: superreview?(roc) → superreview?(blizzard)
| Assignee | ||
Comment 10•20 years ago
|
||
Comment on attachment 175910 [details] [diff] [review]
extended patch
>+ for (i=1; i < argc - 1; i++) {
>+ if (strcmp(argv[i], "--display") == 0) {
>+ display = argv[i + 1];
argv[i+1] should exist because of 'i < argc - 1'?
--display can never be the last argv IMHO.
>+ // save --display parameter for possible -remote handling
>+ // (it will be lost after gtk_init)
>+ char *display = 0;
>+ char *param = 0;
>+ for (int i=1; i<argc; i++) {
>+ if ((PL_strncasecmp(argv[i], "-display", 7) == 0)
>+ || (PL_strncasecmp(argv[i], "--display", 8) == 0)) {
>+ if ((param = PL_strchr(argv[i], '=')) != NULL)
>+ display = PL_strdup(++param);
>+ else
>+ display = PL_strdup(argv[i + 1]);
your argument applies here ;-)
>+ --display)
>+ X_DISPLAY="--display $2"
>+ moreargs="$moreargs \"$1\" \"$2\""
>+ shift 2
>+ ;;
would [ -n "$2" ] && X_DISPLAY... be sufficient?
Updated•20 years ago
|
Attachment #175910 -
Flags: superreview?(blizzard)
Attachment #175910 -
Flags: review?(caillon)
Attachment #175910 -
Flags: review?(blizzard)
| Assignee | ||
Comment 11•20 years ago
|
||
caillon, any comment?
Comment 12•20 years ago
|
||
Comment on attachment 175910 [details] [diff] [review]
extended patch
Why can't you just pass in DISPLAY=:0.1 as an environment variable to mozilla?
We already support that. Seems like it doesn't really matter one way or the
other.
DISPLAY=foo mozilla-xremote-client
vs.
mozilla-xremote-client -disable=FOO
There's no requirement to support -display and I see no reason to hack this in,
really. I see the novell scripts are using this patch, but it seems silly IMO.
Just fix the scripts to use DISPLAY=foo instead of -display=foo
| Assignee | ||
Comment 13•20 years ago
|
||
If it't not needed then the documentation should reflect this at least.
stark@Hygiea:~> mozilla --help
Usage: /usr/lib/mozilla/mozilla-bin [ options ... ] [URL]
where options include:
X11 options
--display=DISPLAY X display to use
The same in the man-page.
I can live with one or the other solution but I can't find something silly
in this approach. It's the implementation of the documented feature.
Comment 14•20 years ago
|
||
Comment on attachment 175910 [details] [diff] [review]
extended patch
Yeah, let's fix the documentation.
Attachment #175910 -
Flags: review?(caillon) → review-
| Reporter | ||
Comment 15•17 years ago
|
||
I don't actually care anymore.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•