[Geany-devel] altername session management implementation

Dimitar Zhekov dimitar.zhekov at xxxxx
Thu Jul 1 16:48:18 UTC 2010


On Thu, 1 Jul 2010 11:51:18 +0400
Eugene Arshinov <earshinov at gmail.com> wrote:

> On Wed, 30 Jun 2010 21:48:15 +0300%
> Dimitar Zhekov <dimitar.zhekov 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.
> > 
> > They are removed when a program ceases to be part of the session (i.e.
> > when you close an instance), not on session restart or something.
> > 
> 
> But even if I open Geany and immediately close it, its temporary file
> is still there.  I just checked out that the file still exists even
> after I logout and login again (i.e., after GNOME session manager is
> restarted).

Well, under xfce-sm they are deleted as soon as the geany instance is
closed (xfce has some other bugs though). With GNOME, a lot of the
session management is implemented in it's session client library. The
best and most compliant XSM is that of KDE4.

And easier way to test than installing KDE is to temporarily disable
the GNOME SM and use xsm(1). It's not suitable for practical work, but
should be enough to try the creation/deletion of the .conf files.

> > 
> > (On that note, I don't think it's necessary for you to try guessing
> > the absolute name of args[0], every program I've seen just stores
> > argv[0] directly.)
> > 
> 
> 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, especially for non-gnome programs, and always had. Instead of
fixing it, they finally replaced XSMP with a D-Bus based protocol at the
end of 2008. So if you feel like writing support for it... I do not.

> > There are some other fixes, I can send a patch against 5064 if you
> > want.
> 
> Yes, that would be good.  I have an idea of combining your SM
> implementation with my sm branch (you know the branch now contains
> plenty of things apart of SM, e.g. changes in command-line handling,
> Geany session management, [...] If I finally do it, I'll send here
> resulting patch(es).

Attached. To prevent an unlikely race condition, the "Build ->
Set build commands" settings should be saved on OK response, instead of
when exiting Geany, but I believe your sm branch includes that.

-- 
E-gards: Jimmy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sm1-5064.diff
Type: text/x-diff
Size: 39507 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100701/c8c01ef3/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES
Type: application/octet-stream
Size: 5922 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100701/c8c01ef3/attachment.obj>


More information about the Devel mailing list