[edgy] Firefox doesn't support X11/Gnome/KDE session managment

Bug #106314 reported by Eero Tamminen
10
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
Wishlist
firefox (Ubuntu)
Fix Released
Undecided
Mozilla Bugs

Bug Description

Binary package hint: firefox

Version:
OS: Ubuntu Edgy
Firefox: 2.0.0.3+0dfsg-0ubuntu0.6.10

Use-case:
1. Start Firefox and go to a bookmarked page
2. From the gnome logout menu choose "Restart"
3. After reboot, log in
4. Start Firefox

Expected outcome:
- Device reboots and after login Firefox is started automatically (like other gnome applications),
  and it opens the tabs/pages that were open when the session ended

Actual outcome:
- After choosing reboot, there's a warning message I need to OK about Firefox not supporting session management
- After login, Firefox doesn't start automatically
- When started, Firefox says that it had crashed and whether I would like to restore its session
This gives pretty unprofessional feel.

Occurs: always

For the previous 5 years I've used SUSE & KDE and Konqueror has always worked just fine with KDE session management.
If I use Epiphany instead of Firefox, that works just fine with (Gnome) session management too.

According to this upstream bug:
  https://bugzilla.mozilla.org/show_bug.cgi?id=93789
Mozilla seems to have been 6(!) years without this basic usability feature that about all other desktop applications have...

Either fix this bug or choose a default browser that gives less broken/unprofessional impression on users, please.

Revision history for this message
In , Bugs-bengoodger (bugs-bengoodger) wrote :

.

Revision history for this message
In , Roland-mainz (roland-mainz) wrote :

blizzard:
Wanna take a look at this one, please ?

Revision history for this message
In , R-contact2009-awhlink-com (r-contact2009-awhlink-com) wrote :

This appears to depend on bug 36810, which also blocks some other bugs.

Revision history for this message
In , R-contact2009-awhlink-com (r-contact2009-awhlink-com) wrote :

Actually, it might not.

Revision history for this message
In , Thompson-fresno (thompson-fresno) wrote :

This looks like a few other bugs -- e.g., bugs 192263 and 180319

Revision history for this message
In , Christian Biesinger (cbiesinger) wrote :

*** Bug 192263 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Christian Biesinger (cbiesinger) wrote :

*** Bug 231047 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Johan Walles (walles) wrote :

Andrew, how does this bug block bug 19454 (crash recovery)? I'm not saying it
doesn't, I just don't understand why it would.

Revision history for this message
In , Johan Walles (walles) wrote :

*** Bug 180319 has been marked as a duplicate of this bug. ***

Revision history for this message
In , R-contact2009-awhlink-com (r-contact2009-awhlink-com) wrote :

My imperfect understanding of X11 session management is that it functions kind
of like how the enhancement will function as requested by bug 63094, which also
blocks bug 19454. Although as per bug 19454 comment 71 it is the case that bug
19454
only covers enhancements that will store new data in the profile
directory, even if this enhancement request does not result in that, the
functionality is so similar that I feel it should be tracked with the others. If
I am wrong, please tell me.

Revision history for this message
In , Roland-mainz (roland-mainz) wrote :

*** Bug 253254 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mozilla-mail (mozilla-mail) wrote :
Download full text (3.5 KiB)

Just for reference on this bug, since bug #253254 was marked as a duplicate
of this bug:

KDE "Save session" for a session in which firefox is running will not result
in firefox restarting when one logs in. The same applies when the KDE
Session Manager is configured to "Restore previous session" / so-called
session auto-save mode. In either case firefox does not restart after
a subsequent login.

If one configures the firefox launch icon to "Run in terminal" (a gross
configuration that requires a launch of an empty terminal window in addition
to the firefox window), KDE "Save Session" (and auto-save) will restart a
single firefox session after login (with that gross extra empty terminal
session), however it will NOT start a 2nd firefox window and the single
firefox browser will not restore the previous URL and tab state.

One can launch multiple firefox windows under KDE. One cannot save their
state (URL and tab state) and recreate the KDE session in a subsequent login.

KDE is able to save and restart multiple KDE konqueror browser windows
with their current URLs and tab state saved. One cannot do this for firefox.

I am using RHEL 3 with an up2date patched system and the current firefox
browser version.

Reproducible: Always
Steps to Reproduce:
Firefox fails to restart a single browser from a manually saved session
without a terminal window:

1.launch firefox from a KDE launch icon without "run in terminal" set
2.perform a "Save Session" when the KDE Component: Session Manager is in
  "Restore manually saved session"
3.logout
4.login

Firefox fails to restart multiple browsers from a manually saved session without
a terminal window:

1.launch 2 or more firefox browsers from a KDE launch icon without "run
in terminal" set
2.perform a "Save Session" when the KDE Component: Session Manager is in
  "Restore manually saved session"
3.logout
4.login

Firefox fails to restore a single browser from a manually saved session
with a terminal window:

1.launch firefox from a KDE launch icon WITH "run in terminal" set
2.perform a "Save Session" when the KDE Component: Session Manager is in
  "Restore manually saved session"
3.logout
4.login

Firefox fails to restart multiple browsers from a manually saved session
with a terminal window:

1.launch 2 or more firefox browsers from a KDE launch icon WITH "run
in terminal" set
2.perform a "Save Session" when the KDE Component: Session Manager is in
  "Restore manually saved session"
3.logout
4.login

NOTE: Selecting the KDE Compenet Session Manager mode of "Restore previous
session" (auto session save) does not change the firefox restart problem.

Actual Results:
Firefox fails to restart a single browser from a manually saved session
without a terminal window:

no firefox windows are started

Firefox fails to restart multiple browsers from a manually saved session
without a terminal window:

no firefox windows are started

Firefox fails to restore a single browser from a manually saved session
with a terminal window:

An empty window is started, however firefox does not restart with the
previous URLs and tab state.

Firefox fails to restart multiple browsers from a manually saved session
with a ter...

Read more...

Revision history for this message
In , Theosib-hotmail (theosib-hotmail) wrote :

I'm glad to see that I'm not the only one who has this complaint. I thought I
was doing something wrong, but it appears that Mozilla doesn't support X11
session management. Considering how much better Mozilla than most applications
in so many OTHER areas, it's actually somewhat surprising to me that it doesn't
support session management. Various obscure applications like nedit and
trebuchet support session management too.

I hope Mozilla developers will improve Mozilla's compatibility with X11 by
supporting session management.

Revision history for this message
In , Bugs-nickschas (bugs-nickschas) wrote :

I would be really glad to have this feature, too. Currently this is the only
reason keeping me from switching from Konqueror to FireFox. It is just very very
convenient to log into KDE and having all browser windows and tabs in the state
I left them. I usually have a lot of tabs open, distributed on various windows,
containing the pages I visit on a regular basis. Session management enables me
to simply log out and log in later and still have everything open.

FireFox currently cannot do this, so I don't use it, even though it is so much
better than Konqueror in most other respects.

Please consider implementing this feature.

Revision history for this message
In , Mike Connor (mconnor) wrote :

*** Bug 272104 has been marked as a duplicate of this bug. ***

Revision history for this message
In , supertux (supertux) wrote :

I searched all firefox extensions looking for this functionality until I reach
this bug,I missed this feature because I get used to it with Galeon, where the
sites I had no time to read before power the computer off got opened the next
time I power the computer on. So I vote for this ;-).

 It seems that Galeon, which is mozilla-based, implemented this feature in some way.

Revision history for this message
In , supertux (supertux) wrote :

I am no longer interested in this bug since I ve found a firefox extension that
does pretty well what I wanted, that is opening the browser with the same tabs
that where opened when the browser was closed,, the extension is called
SessionSaver and you can install it from:

https://addons.mozilla.org/extensions/moreinfo.php?id=436

Thought this could be useful to the people CCed.

Revision history for this message
In , Mark-skynet (mark-skynet) wrote :

GNOME has proxy program which provides some semblance of session management
support for apps which don't support XSMP, but do set various ICCCM properties
like WM_NAME, WM_CLASS, WM_CLIENT_LEADER, WM_COMMAND and WM_CLIENT_MACHINE.

However, since this session management convention was deprecated over a decade
ago, we're dropping smproxy. See this thread for more details:

http://mail.gnome.org/archives/desktop-devel-list/2005-July/thread.html#00527

Interestingly, though, if you save a GNOME session with Firefox running, the
command saved is "firefox-bin" (because this is what's in the WM_COMMAND
property) and so, when restoring the session firefox isn't restored because
running firefox-bin obviously fails.

So, GNOME dropping smproxy doesn't have any net effect on Mozilla's session
management support, really. The only thing that can help is implementing even
very simple XSMP support.

Revision history for this message
In , Mark-skynet (mark-skynet) wrote :

(In reply to comment #18)

> Interestingly, though, if you save a GNOME session with Firefox running, the
> command saved is "firefox-bin" (because this is what's in the WM_COMMAND
> property) and so, when restoring the session firefox isn't restored because
> running firefox-bin obviously fails.

I'm referring here to what happens if you try and save Firefox into the session
using gnome-smproxy.

Revision history for this message
In , Peter Haight (peterh-sapros) wrote :

Created attachment 204265
A patch to make mozilla gnome-session aware.

This is a patch which adds gnome-session support to Mozilla. It really doesn't do anything beyond fixing up the command-line and calling the gnome session initialization stuff. What this gets you, though, is that mozilla will pop up on the workspace that it was on when you saved the session.

For everything else, there is SessionSaver.

Revision history for this message
In , Peter Haight (peterh-sapros) wrote :

I thought that I should add a little more detail about my patch. By using the gnome session API we do get XSMP support. So I assume this will work on KDE or with any other X sessions stuff if mozilla is compiled on a system with libgnomeui. Whether UNIX distributions commonly do that or not, I don't know.

The other thing is that I didn't implement any of the callbacks (like save_yourself). The main reason is that I use the SaveSession extension and that handles all of that stuff already. Though, it may make sense to implement the destroy callback because I've noticed that sometimes if I logout of X, mozilla dies in such a way that it doesn't save any preferences I've changed. That might be a bug or some other problem. I've not looked into it.

Also, the patch is agaisnt the 1.8 branch.

Revision history for this message
In , Nickolay Ponomarev (asqueella) wrote :

Peter: you should ask review on the patch (an updated version, preferably), that makes chances of getting it in the tree a bit higher ;)

Also, according to this page <http://wiki.mozilla.org/Session_Restore> session restoring is likely to be implemented for Fx2.

Revision history for this message
In , Martin Meyer (elreydetodo) wrote :

Any progress on this since Session Saver is now in FF2? Seems like this should be a lot easier to implement now.

Revision history for this message
Eero Tamminen (oak-helsinkinet) wrote :

Binary package hint: firefox

Version:
OS: Ubuntu Edgy
Firefox: 2.0.0.3+0dfsg-0ubuntu0.6.10

Use-case:
1. Start Firefox and go to a bookmarked page
2. From the gnome logout menu choose "Restart"
3. After reboot, log in
4. Start Firefox

Expected outcome:
- Device reboots and after login Firefox is started automatically (like other gnome applications),
  and it opens the tabs/pages that were open when the session ended

Actual outcome:
- After choosing reboot, there's a warning message I need to OK about Firefox not supporting session management
- After login, Firefox doesn't start automatically
- When started, Firefox says that it had crashed and whether I would like to restore its session
This gives pretty unprofessional feel.

Occurs: always

For the previous 5 years I've used SUSE & KDE and Konqueror has always worked just fine with KDE session management.
If I use Epiphany instead of Firefox, that works just fine with (Gnome) session management too.

According to this upstream bug:
  https://bugzilla.mozilla.org/show_bug.cgi?id=93789
Mozilla seems to have been 6(!) years without this basic usability feature that about all other desktop applications have...

Either fix this bug or choose a default browser that gives less broken/unprofessional impression on users, please.

Revision history for this message
John Vivirito (gnomefreak) wrote :

Marking this bug as upstream.

Changed in firefox:
assignee: nobody → mozilla-bugs
status: Unconfirmed → Needs Info
Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

Moving to Firefox->OS Integration. (not actually firefox specific, but there's no toolkit->OS Integration so this will have to do..)

Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

Created attachment 268042
Add support for xsmp (WIP), v1

This patch hooks toolkit up to libgnomeui and handles the save_yourself and die signals. Unfortunately, the die signal doesn't seem to get called on my system.. need to figure out why..

Revision history for this message
In , supertux (supertux) wrote :

Don't know if this is important, but libgnome and libgnomeui are in the process of being deprecated[1], all the functionality they provide is being implemented in gtk+, you can see what is already implemented in GTK+ in [1]. As for session management, it's not yet in GTK+ but there's already work done, see "SM Client" section on http://live.gnome.org/SessionManagement

[1] http://live.gnome.org/LibgnomeMustDie

Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

Created attachment 268396
Add support for xsmp, v2

Alexander Sack (asac)
Changed in firefox:
status: Needs Info → In Progress
Revision history for this message
In , Benjamin Smedberg (Mozilla) [:bs] (benjamin-smedbergs) wrote :

Comment on attachment 268396
Add support for xsmp, v2

Before I review this I'm going to want docs about how app shutdown is supposed to work (you don't have to implement it all, just document where you're headed).

Please re-request review when that's available.

Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

Comment on attachment 268396
Add support for xsmp, v2

http://wiki.mozilla.org/App_quit_sequence

Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

Created attachment 272580
As checked in

Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

Checking in toolkit/xre/Makefile.in;
/cvsroot/mozilla/toolkit/xre/Makefile.in,v <-- Makefile.in
new revision: 1.82; previous revision: 1.81
done
RCS file: /cvsroot/mozilla/toolkit/xre/nsNativeAppSupportUnix.cpp,v
done
Checking in toolkit/xre/nsNativeAppSupportUnix.cpp;
/cvsroot/mozilla/toolkit/xre/nsNativeAppSupportUnix.cpp,v <-- nsNativeAppSupportUnix.cpp
initial revision: 1.1
done

Revision history for this message
In , c7d2f5c8667d26fffd5e7772d632c76d (c7d2f5c8667d26fffd5e7772d632c76d-deactivatedaccount) wrote :

This code is unconditionally calling gnome_program_init, even when there already exists a GnomeProgram instance:

+ char *argv[2] = { "gecko", "--disable-crash-dialog" };
+ gnome_program_init("Gecko", "1.0", libgnomeui_module_info_get(), 2, argv, NULL);

The one other caller of gnome_program_init in gecko [http://lxr.mozilla.org/mozilla/source/uriloader/exthandler/unix/nsGNOMERegistry.cpp#177] checks first for an existing GnomeProgram; I think this code should do so, too. (See bug 221012.)

Changed in firefox:
status: Confirmed → Fix Released
Revision history for this message
In , Aleksej (aleksejrs) wrote :

I'm getting a few messages like this on Debian with Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a7pre) Gecko/2007071704 Minefield/3.0a7pre, running as a different user than Xorg is running as, and using “xhost +local:”:

(Gecko:10687): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

It doesn't appear when running as the Xorg's user.

Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

(In reply to comment #32)
> The one other caller of gnome_program_init in gecko
> [http://lxr.mozilla.org/mozilla/source/uriloader/exthandler/unix/nsGNOMERegistry.cpp#177]
> checks first for an existing GnomeProgram; I think this code should do so, too.
> (See bug 221012.)
>
Do embedders use nsAppRunner?

Revision history for this message
In , c7d2f5c8667d26fffd5e7772d632c76d (c7d2f5c8667d26fffd5e7772d632c76d-deactivatedaccount) wrote :

(In reply to comment #34)
> Do embedders use nsAppRunner?

I don't know (Epiphany doesn't); but this is called from XRE_main and it's certainly possible that someone could init GnomeProgram before calling XRE_main.

Revision history for this message
In , Adam Guthrie (ispiked) wrote :

Christian and Aleksej, I think it's going to be best to file follow-up bugs for those issues, rather than trying to track them here.

Revision history for this message
In , Mwu-mozilla (mwu-mozilla) wrote :

*** Bug 354686 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Aleksej (aleksejrs) wrote :

(In reply to comment #33)
Filed bug 388515.

Revision history for this message
Jensen Somers (jsomers) wrote :

This is still somehow present in Gutsy.

However, I do get a warning message that firefox-bin is not supported and I have to start it manually the next time I log in.

Revision history for this message
In , Sylvain Pasche (sylvain-pasche) wrote :

any idea why the quit confirmation dialog is not shown on shutdown (bug 449548)?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Has been fixed for a while.

Changed in firefox:
status: In Progress → Fix Released
Changed in firefox:
importance: Unknown → Wishlist
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.