Hi All,
Seasons greetings to all.
New year new idea.
Since Gnome seems to have irretrievably broken X session management it does not seem likely that proper session management will be solved in the near term. Sadly this seems to waste all the good work that the guys put into the SM branch, thanks for the effort.
I am going to suggest an interim change to Geany that will at least mean that it will re-start with the same main settings and preferences. Actually two options.
1. Although I have argued against it in the past, having all settings save on change would at least ensure that a Geany killed by logout or shutdown will still restart with preference/session changes intact, or
2. add a user action to save preferences/session.
My problems with 1. are the performance impact of writing the session file list every time a file is opened, closed or tabs re-ordered and the risk of corruption that that increase in file activity causes (especially with multiple instances).
My problem with 2. is I will forget to do it.
Perhaps a mixed solution of preferences always saved, but session only when the user asks is the way to go.
Any thoughts and suggestions?
Cheers Lex
On 12/31/2011 03:27 PM, Lex Trotman wrote:
Hi All,
Seasons greetings to all.
New year new idea.
Since Gnome seems to have irretrievably broken X session management it does not seem likely that proper session management will be solved in the near term. Sadly this seems to waste all the good work that the guys put into the SM branch, thanks for the effort.
I am going to suggest an interim change to Geany that will at least mean that it will re-start with the same main settings and preferences. Actually two options.
- Although I have argued against it in the past, having all settings
save on change would at least ensure that a Geany killed by logout or shutdown will still restart with preference/session changes intact, or
It's not too bad actually, I've done it before, just keep a callback handler that runs when the machine is idle, then you'll just get a little blip here and there of activity on the disk and CPU. Something like:
static void on_idle_save(gpointer user_data) { /* Write out to disk here */ g_file_replace_contents[_async] (...); }
/* Call this whenever settings change */ void queue_config_save(void) { static guint id = 0; if (id > 0) g_source_remove(id); id = g_idle_add_full(on_idle_save, G_PRIORITY_LOW, NULL, NULL); }
I don't think you'd notice any performance hit unless your config files were on another computer or floppy disk or something. If the GIO async functions are used, I don't think even that would matter since it'd run in another non-GUI thread.
- add a user action to save preferences/session.
Meh, this shouldn't be something a user should have to care about IMO.
My problems with 1. are the performance impact of writing the session file list every time a file is opened, closed or tabs re-ordered and the risk of corruption that that increase in file activity causes (especially with multiple instances).
It'd definitively need to be tested, maybe doing something to ensure the file access is particularly slow (like on a samba share or something) while testing. I think the GLib/GIO file saving functions are "atomic" so there shouldn't be too much issue with multiple instances writing to the same file.
I guess all this trouble is why GNOME applications are heading towards GSettings and such.
Cheers, Matthew Brush
My problem with 2. is I will forget to do it.
Perhaps a mixed solution of preferences always saved, but session only when the user asks is the way to go.
Any thoughts and suggestions?
Cheers Lex _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On Sun, 1 Jan 2012 10:27:43 +1100 Lex Trotman elextr@gmail.com wrote:
Hi All,
Seasons greetings to all.
:)
Since Gnome seems to have irretrievably broken X session management it does not seem likely that proper session management will be solved in the near term. Sadly this seems to waste all the good work that the guys put into the SM branch, thanks for the effort.
Aside from the exceptionally beautiful, absolutely powerful and unlimitely portable XSMP, which was never implemented properly by anyone except maybe the KDE4 guys, there's something called "legacy" X11 session protocol. It's OK, except that no "Save foo.c"? questions are allowed (this part of XSMP is implemented especially bad anyway).
The legacy protocol is supported by all major DE-s, and I think even the automatic builtin restart of gtk+ applications uses it.
See also: google: WM_SAVE_YOURSELF, nedit sources, my recent comment to http://sourceforge.net/tracker/?func=detail&aid=3361963&group_id=153...
On Mon, Jan 2, 2012 at 6:21 AM, Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
On Sun, 1 Jan 2012 10:27:43 +1100 Lex Trotman elextr@gmail.com wrote:
Hi All,
Seasons greetings to all.
:)
Since Gnome seems to have irretrievably broken X session management it does not seem likely that proper session management will be solved in the near term. Sadly this seems to waste all the good work that the guys put into the SM branch, thanks for the effort.
Aside from the exceptionally beautiful, absolutely powerful and unlimitely portable XSMP, which was never implemented properly by anyone except maybe the KDE4 guys, there's something called "legacy" X11 session protocol. It's OK, except that no "Save foo.c"? questions are allowed (this part of XSMP is implemented especially bad anyway).
The legacy protocol is supported by all major DE-s, and I think even the automatic builtin restart of gtk+ applications uses it.
See also: google: WM_SAVE_YOURSELF, nedit sources, my recent comment to http://sourceforge.net/tracker/?func=detail&aid=3361963&group_id=153...
Hi Dimitar,
Am I right in thinking that what you are saying is that the situation is a mess, but that you *may* be able to get the legacy mode running?
Won't allow user choice for saving files but will restore session?
Cheers Lex
-- E-gards: Jimmy _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Hi, all,
Some guys with GNOME 2/3/Unify, KDE 3/4 and LXDE, can you please check if the X11R4 session protocol works? Just activate your "save session on logout", run a couple of gtk+ programs (evince/charmap without gnome support, firefox, transmission, ...), then logout, login, and see if the programs are restarted.
Information about smaller WM-s with some kind of "session support" is welcome too.
--
On Mon, 2 Jan 2012 09:48:36 +1100 Lex Trotman elextr@gmail.com wrote:
Hi Dimitar,
Aside from [...] XSMP, which was never implemented properly by anyone except maybe the KDE4 guys, there's something called "legacy" X11 session protocol. It's OK, except that no "Save foo.c"? questions are allowed (this part of XSMP is implemented especially bad anyway).
Am I right in thinking that what you are saying is that the situation is a mess, but that you *may* be able to get the legacy mode running?
XSMP support is a grief. And looking at GNOME, I'm now unsure which DE-s support X11R4 (let's avoid "legacy", which in gnome means "xsmp").
As of ability, WM_SAVE_YOURSELF is much easier to support than XSMP, and the change will affect almost exclusively sm.c, anything else being 95% identical to the existing sm code. Many years ago, I extended the nedit save yourself handler a bit, in the (never released) 5.6 version.
Won't allow user choice for saving files but will restore session?
Yes.
On Tue, Jan 3, 2012 at 4:19 AM, Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
Hi, all,
Some guys with GNOME 2/3/Unify, KDE 3/4 and LXDE, can you please check if the X11R4 session protocol works? Just activate your "save session on logout", run a couple of gtk+ programs (evince/charmap without gnome support, firefox, transmission, ...), then logout, login, and see if the programs are restarted.
Perhaps you already know since you didn't list it, XFCE4 will re-start firefox 5 with the tabs it last had open. XFCE is of course the DE of choice for developers since Linus switched to it from Gnome.
I *thought* that geany sm branch worked with it too, but that was on another machine, and I havn't the bandwidth here to download it to test.
[...]
XSMP support is a grief. And looking at GNOME, I'm now unsure which DE-s support X11R4 (let's avoid "legacy", which in gnome means "xsmp").
My Googling before the OP suggested that Gnome didn't and there were a lot of unhappy people as a result.
As of ability, WM_SAVE_YOURSELF is much easier to support than XSMP, and the change will affect almost exclusively sm.c, anything else being 95% identical to the existing sm code. Many years ago, I extended the nedit save yourself handler a bit, in the (never released) 5.6 version.
Won't allow user choice for saving files but will restore session?
Yes.
Fine by me, the OP was prompted by being sick and tired of having to close and re-open Geany to save build commands and preferences.
Cheers Lex
-- E-gards: Jimmy _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
On Tue, 3 Jan 2012 09:20:08 +1100 Lex Trotman elextr@gmail.com wrote:
Perhaps you already know since you didn't list it, XFCE4 will re-start firefox 5 with the tabs it last had open.
Yes.
XFCE is of course the DE of choice for developers since Linus switched to it from Gnome.
I woudn't attribute that to Linus...
I *thought* that geany sm branch worked with it too, but that was on another machine, and I havn't the bandwidth here to download it to test.
If you mean the original Eugene's branch, it's xsmp.
With xfce, you can use the branch, or the tracker patch which is based on it. But be sure to save your files, or bad things will happen...
Best of all, apply the patch, edit sm.c, and remove or comment out the SmcInteractRequest() call in sm_save_yourself_callback(). No file save prompts, but each Geany instance will be restarted with the set of preferences / interface options / open files it had on logout.
Perhaps I should try to check SmcVendor() and skip interaction if xfce.
My Googling before the OP suggested that Gnome didn't and there were a lot of unhappy people as a result.
Seems like they coudn't even implement that correctly and dropped it...