! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Failure to save session if session file doesnt already exist
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description Landry Breuil editbugs 2015-03-02 21:56:48 CET
I think it's a fallout of the check added to fix bug #11307..

If you clean sessions cache in xfce4-session-settings, it'll remove files in $HOME/.cache/sessions/xfce4-session-$HOST:0 - and if right away you try to save the session, the check will trigger because the file is not here.

xfce4-session: Unable to save changes to the session file /home/landry/.cache/sessions/xfce4-session-renton.home.rhaalovely.net:0Please check your installation.

So the session isnt saved when trying to manually save it, nor when exiting the session. One needs to touch the file prior to exit the session to have it properly saved (and then on next logins it works...)
Comment 1 Peter de Ridder editbugs 2015-03-05 08:03:47 CET
This is indeed a result of that solution.
Opening the rc file doesn't create it until the data is flushed.
That writeable chheck fails as the file doesn't exists.

Within xfce rc there are many checks when reading and writing, so I wonder why that check is required.
I removed that check, but I can't reproduce the original report.
I think we should look deeper into that problem to find another solution.
Comment 2 Eric Koegel editbugs 2015-03-06 18:09:03 CET
Created attachment 6043 
Drop check for sessions file before it's written

Can you try out this patch? It saves for me and doesn't crash when sessions was read-only.
Comment 3 Landry Breuil editbugs 2015-03-07 14:31:18 CET
Fixes the issue here, i can now clean the sessions dir and manually save it fine. Saving on exit also works with an empty sessions dir.
Comment 4 Eric Koegel editbugs 2015-03-07 18:10:53 CET
Thanks for testing, pushed to master in:
commit ca310c400817640a4e7fbcbe195a8b1b4544b281
Author: Eric Koegel <eric.koegel@gmail.com>
Date:   Fri Mar 6 19:55:02 2015 +0300

    Drop check for sessions file before it's written (Bug #11632)
    
    Just opening the session file in rc_open doesn't cause a write,
    so drop the unneeded check that was breaking session saves.

http://git.xfce.org/xfce/xfce4-session/commit/?id=ca310c400817640a4e7fbcbe195a8b1b4544b281

Bug #11632

Reported by:
Landry Breuil
Reported on: 2015-03-02
Last modified on: 2015-03-07

People

Assignee:
Eric Koegel
CC List:
4 users

Version

Version:
Unspecified

Attachments

Additional information