On Sun, 4 Jul 2010 15:00:00 +0300% Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
On Sun, 4 Jul 2010 15:20:12 +0400 Eugene Arshinov earshinov@gmail.com wrote:
On Sun, 4 Jul 2010 14:07:27 +0300% Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
On Fri, 2 Jul 2010 13:20:09 +0400 Eugene Arshinov earshinov@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.
Yes, sorry for being not clear. I meant both specifying SmDiscardCommand and deleting file manually when user closes Geany.
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.
No, we need to look for absolute path if and only if Geany is run using relative path. When Geany is run either using absolute path or without any path at all, we can leave the path as is. GNOME's session manager does not work only with relative paths. Getting absolute path from relative to current directory is ~5 lines without any hacks.