Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 7361  / 1 Year ago, tue, may 2, 2023, 9:33:20

We are working with a terminal server that is running Xubuntu. Because we have had some issues with saved sessions, we want to turn off the saving of sessions completely.



So far, we have been able to set the default to not saving the session, but in the logout screen it is still possible to save the session. Is it possible to turn off session saving completely (system-wide) so our users won't "accidentally" use it?


More From » xubuntu

 Answers
5

(Tested with Xubuntu 12.04, but with the ppas for Xfce 4.10 and 4.12 installed, but the option I discuss was available for Xfce 4.8)



There is a way to globally disable the option of saving the session, and the best way to achieve it is to use Xfce kiosk mode. One of the available kiosk mode options, buried in the source code for xfce4-session, is SaveSession. If we look at /home/mike/xfce4-session-4.10.0/xfce4-session/xfsm-shutdown.c, we can see the undocumented setting:



/* check kiosk */
shutdown->kiosk_can_save_session = xfce_kiosk_query (kiosk, "SaveSession");





Firstly, create the kiosk directory with



sudo mkdir /etc/xdg/xfce4/kiosk


and then create and edit the kioskrc with your text editor:



sudo nano /etc/xdg/xfce4/kiosk/kioskrc


Place the following in your kioskrc:



[xfce4-session]
SaveSession=NONE


Now, save the changes and logout and login again as your user to test it. The checkbox option to save the session should have disappeared.



Before the setting is applied, the box is still available:



enter image description here



Afterwards, with kiosk mode active, the option is no longer available:



enter image description here



If you wish to use kiosk mode to globally disable other settings, such as the ability to shutdown or suspend, etc, see my answer here:




[#32872] Wednesday, May 3, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cugure

Total Points: 188
Total Questions: 110
Total Answers: 103

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;