[Geany-devel] altername session management implementation

Dimitar Zhekov dimitar.zhekov at xxxxx
Sun Jul 4 12:00:00 UTC 2010


On Sun, 4 Jul 2010 15:20:12 +0400
Eugene Arshinov <earshinov at gmail.com> wrote:

> On Sun, 4 Jul 2010 14:07:27 +0300%
> Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
> 
> > On Fri, 2 Jul 2010 13:20:09 +0400
> > Eugene Arshinov <earshinov at gmail.com> wrote:
> > 
> > > > > > > 1. On my system your version do not automatically remove
> > > > > > > temporary SM-related session files.  Is it supposed to do
> > > > > > > so? I saw that you specified DiscardCommand.
> > > > > > 
> > > > > I checked that relative paths do not work, even if
> > > > > SmCurrentDirectory is properly set.  Ordinary users rarely run
> > > > > programs using relative paths, but still.
> > > > 
> > > > With xfce, and SmCurrentDirectory specified, they are OK. As of
> > > > GNOME... *sigh* I don't like to be harsh, but it has the worst XSM
> > > > support [...]
> > > >
> > > > So if you feel like writing support for it... I do
> > > > not.
> > > > 
> > > 
> > > No, I don't like it, but there are some GNOME users out there :)
> > 
> > Well, I guess we can somehow check if Geany is running under GNOME,
> > and if so, delete the SM-file on normal (non-session) Geany quit.
> 
> We can always delete the file ourselves.  Seems that it won't be
> harmful for "compliant" session managers.

The XSMP does not specify when the SmDiscardCommand will/should be
executed. For example, what if the user logs out, and only then unchecks
"Save this session for future use" or something? Geany will be
terminated without any notice, and the discarding remains to the SM. So
we'd better do both.

> > And place a note in the documentation: "under GNOME, specific versions of
> > Geany should be run with absolute path if you want them restored on
> > the next restart".
> 
> I think it's better to have 5 or so additional lines of code than to
> leave this problem for end users.

This is a rare situation, and the executable name can't be determined
100% reliably without using /proc or something (there is no such UNIX
API). You can try a few programs from the GNOME Official applications
list, and if they simply store argv[0], I think it'll be too much for
Geany to do more than that.

-- 
E-gards: Jimmy



More information about the Devel mailing list