[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: remote X weirdness

On Sunday 09 Oct 2005 22:18, Willie McKemie wrote:
> I "ssh -XC <ip>", then "firefox" or "firefox&".  Sure enough, I get
> Firefox on my local display.  But, it gives every indication that it is
> a local Firefox, not Firefox on the remote box; the URL "file:///"
> shows the local filesystem.  Other X apps run through the ssh ARE on
> the remote box.
> What the heck is going on here?  And how to I fix it?

Unlike most other programs you'll use, "firefox" is a shell script wrapper, 
not the actual binary that is run. I'm guessing that what's going in is that 
the shell script wrapper is doing something "clever". My best guess at this 
point is that an existing copy of firefox is running on your local host and 
the shell script detects this and asks it to pop up a new window, instead of 
starting a new instance.

This may be the relevant piece of the script?

# No need to check if DISPLAY is not set, it will fail. But let's continue,
# so that firefox gives the display error message itself.
if [ "${DISPLAY}" ] || [ "${CMDLINE_DISPLAY}" ]; then
    if [ -z "${CMDLINE_DISPLAY}" ]; then
    # check to see if there's an already running instance or not
    verbose "Running: ${MOZ_PROGRAM} -remote 'ping()'"
    DISPLAY="${CMDLINE_DISPLAY}" ${MOZ_PROGRAM} -remote 'ping()' \
        > /dev/null 2>&1

echo_vars PING_STATUS

# Clean user profile if we are not trying to use the running instance and only
# if the check was successful (status 2)
if [ "${REMOTE}" -eq 0 ] && [ "${TRY_USE_EXIST}" -eq 0 ] && [ "${PING_STATUS}" 
-eq 2 ]; then
    verbose "Cleaning user profile"

# If there is no command line argument at all then try to open a new
# window in an already running instance.
if [ "${PING_STATUS}" -eq 0 ] && [ $# -eq 0 ]; then
    exec_verbose ${MOZ_PROGRAM} -remote "xfeDoCommand(openBrowser)"

If you have a reasonable understanding of shell scripts you might check this 
out with "sh -x". 

There doesn't seem to be an option to turn this behaviour off directly, but it 
seems that it won't do this if you start it with an argument. Maybe use 
-width or -height?


Neil Youngman

Reply to: