The default bug view has changed. See this FAQ.

Mozilla should support X11 session management

RESOLVED FIXED in Firefox 3 alpha7

Status

()

Firefox
Shell Integration
--
enhancement
RESOLVED FIXED
16 years ago
7 years ago

People

(Reporter: Roland Mainz, Assigned: mwu)

Tracking

(Blocks: 4 bugs)

Trunk
Firefox 3 alpha7
All
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

16 years ago
RFE: Mozilla should support X11 session management (see xsm(1)). This means it
should be possible to create snapshots of current mozilla windows (browser,
mailnews, editor(!!), etc.), shutdown the Zilla and restart it using those
session data later.

Note that that multiple session "snapshots" are allowed per user...
(Reporter)

Updated

16 years ago
Component: Bookmarks → Browser-General
.
Assignee: ben → nobody
Keywords: helpwanted
Target Milestone: --- → Future
(Reporter)

Comment 2

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

Comment 3

15 years ago
This appears to depend on bug 36810, which also blocks some other bugs.
Depends on: 36810

Comment 4

14 years ago
Actually, it might not.
No longer depends on: 36810
Summary: RFE: Mozilla should support X11 session management → Mozilla should support X11 session management

Updated

14 years ago
Blocks: 19454

Comment 5

14 years ago
This looks like a few other bugs -- e.g., bugs 192263 and 180319
*** Bug 192263 has been marked as a duplicate of this bug. ***
*** Bug 231047 has been marked as a duplicate of this bug. ***

Comment 8

13 years ago
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.

Comment 9

13 years ago
*** Bug 180319 has been marked as a duplicate of this bug. ***
Blocks: 233462

Comment 10

13 years ago
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.
Assignee: nobody → blizzard
(Reporter)

Comment 11

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

Comment 12

13 years ago
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 terminal window:

An empty window is started, however firefox does not restart with the
previous URLs and tab state.  No other firefox browsers are restated.


Expected Results:  
In all cases all of the firefox browsers should restart in their exact
window position in their exact virtual desktops with their saved URL
and tab state restored.

Comment 13

13 years ago
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.
Product: Browser → Seamonkey

Comment 14

13 years ago
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.
*** Bug 272104 has been marked as a duplicate of this bug. ***

Comment 16

12 years ago
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.

Comment 17

12 years ago
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.

Comment 18

12 years ago
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.

Comment 19

12 years ago
(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.

Updated

12 years ago
Assignee: blizzard → jag
Component: General → XP Apps
QA Contact: claudius
Target Milestone: Future → ---

Comment 20

12 years ago
Created attachment 204265 [details] [diff] [review]
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.

Comment 21

12 years ago
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.

Comment 22

11 years ago
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.

Comment 23

10 years ago
Any progress on this since Session Saver is now in FF2? Seems like this should be a lot easier to implement now.
(Assignee)

Comment 24

10 years ago
Moving to Firefox->OS Integration. (not actually firefox specific, but there's no toolkit->OS Integration so this will have to do..)
Assignee: jag → nobody
Component: XP Apps → OS Integration
Product: Mozilla Application Suite → Firefox
QA Contact: os.integration
(Assignee)

Updated

10 years ago
Depends on: 383760
(Assignee)

Updated

10 years ago
Assignee: nobody → michael.wu
(Assignee)

Comment 25

10 years ago
Created attachment 268042 [details] [diff] [review]
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..
Attachment #204265 - Attachment is obsolete: true
(Assignee)

Updated

10 years ago
Keywords: helpwanted

Comment 26

10 years ago
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
(Assignee)

Comment 27

10 years ago
Created attachment 268396 [details] [diff] [review]
Add support for xsmp, v2
Attachment #268042 - Attachment is obsolete: true
(Assignee)

Updated

10 years ago
Attachment #268396 - Flags: review?(benjamin)
Comment on attachment 268396 [details] [diff] [review]
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.
Attachment #268396 - Flags: review?(benjamin)
(Assignee)

Comment 29

10 years ago
Comment on attachment 268396 [details] [diff] [review]
Add support for xsmp, v2

http://wiki.mozilla.org/App_quit_sequence
Attachment #268396 - Flags: review?(benjamin)
Attachment #268396 - Flags: review?(benjamin) → review+
(Assignee)

Comment 30

10 years ago
Created attachment 272580 [details] [diff] [review]
As checked in
Attachment #268396 - Attachment is obsolete: true
(Assignee)

Comment 31

10 years ago
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
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 M7
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.)

Comment 33

10 years ago
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.
(Assignee)

Comment 34

10 years ago
(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?
(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.

Comment 36

10 years ago
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.
(Assignee)

Updated

10 years ago
Duplicate of this bug: 354686

Comment 38

10 years ago
(In reply to comment #33)
Filed bug 388515.
(Assignee)

Updated

10 years ago
Blocks: 388515

Updated

10 years ago
Blocks: 388608
Depends on: 389346
Depends on: 399161

Updated

9 years ago
Blocks: 449548

Comment 39

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

Updated

7 years ago
You need to log in before you can comment on or make changes to this bug.