Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What makes X sessions restorable ?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Tue Sep 09, 2014 3:19 pm    Post subject: What makes X sessions restorable ? Reply with quote

Hi all,

This is a newbbie question :D. What makes X sessions restorable ? I mean document toto.odt opened in desk n°2 p. 123, Terminal opened in desk n°9 with two tabs, one working on ~/Documents/tsomefolder, and the other one on ~/Images/anotherfolder, three Firefox windows, the one with the gentoo topics in desk n°9, the one with cooking in n°1, etc (as far as I know, Firefox reminds its windows and tabs, but does not know in which desk to put them).

Is it the display manager xdm, gdm, slim, etc), the desktop one (kde, gnome, xfce, etc) ?
In the case of XFCE, what shall be tuned ?

I am not sure, but in the old times I setup my Gentoo, I think I understood that it was the DM, and choose gdm for this feature. Is it correct ? If yes, does slim do the same now (the doc is not clear for me) ?
Back to top
View user's profile Send private message
CrankyPenguin
Apprentice
Apprentice


Joined: 19 Jun 2003
Posts: 283

PostPosted: Tue Sep 09, 2014 4:23 pm    Post subject: Reply with quote

When you say "restorable" do you mean after a reboot you want everything as it was or do you mean that when you open up a given application, say Firefox, that it goes to a set place?

If the former I suspect what you really want is suspend to disk which will handle all of the system maintenance. If the latter some window managers such as fluxbox can make apps sticky and you can start up specific applications on specific desktops in the .xinitrc or in .fluxbox/startup
_________________
Linux, the OS for the obsessive-compulsive speed freak in all of us.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Tue Sep 09, 2014 6:50 pm    Post subject: Reply with quote

Both, kde and gnome used to have a feature allowing you to save your session and resotre it later (including open tabs in konqueror).
Unfortunately, this requires some cooperation from all applications involved so you're not likeky to be able to do it yourself in other DE.

Suspend to disk is not application (or even runlevel) speccific, so you can actually give it a shot and hope for the best.
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Thu Sep 11, 2014 7:54 am    Post subject: Reply with quote

I have tryed SLIM gm with XFCE: sessions are restored. Actually, all applications do not cooperate. But I have my answer, it is not the gm task.

Concerning suspend to disk, I used it several years ago, but it sucked at this time. What happened is that it worked once after a reboot, but failed quite always the second time. The documentation did warn it was very touchy to tune, there was no general rules except trials.

Does it work fine now? Without having to study documentation during three days and having to perform tuning during three other days at least ?
Back to top
View user's profile Send private message
CrankyPenguin
Apprentice
Apprentice


Joined: 19 Jun 2003
Posts: 283

PostPosted: Tue Sep 16, 2014 2:02 am    Post subject: Reply with quote

I can't answer for suspend-to-disk now. I know people who have it working and it is, I believe, well-supported by Gnome and KDE apps but as to getting it working without days I am not sure. I don't have enough free time to try :)
_________________
Linux, the OS for the obsessive-compulsive speed freak in all of us.
Back to top
View user's profile Send private message
uraes
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2002
Posts: 135
Location: Estonia

PostPosted: Wed Sep 17, 2014 6:22 am    Post subject: Reply with quote

Don't know exactly which app is dealing with this session info, but you can find configurations (for KDE) about windows and their states in "~/.kde4/share/config/session" directory. I have done some cleaning there if some programm was messed up.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Wed Sep 17, 2014 7:00 am    Post subject: Reply with quote

The responsible for this is called "session manager", and it's a component of your desktop environment (provided you use one at all). The modus operandi varies quite a lot from one session manager to the next, and, in any case, no session manager can tell e.g. firefox which tabs to re-open. Whatever that happens inside the firefox window is responsibility of firefox, and no one else's.

Most SMs just save commands and associated window positions, and when restarting just re-launch everything and put them wherever they were when the session was saved. Some of them provide a way to save sessions manually, some others just save it when exiting automatically. Some are configurable in this regard, some aren't.

Also, when it comes to window positioning some behave better than others. Most applications use the standard way to do their things, and instruct the WM to position themselves in the desired place (which the WM can override for sane reasons), but some other windows use ugly tricks or don't respect the EWMH at all making the work of the WM and the SM much more difficult.

The session manager is often the one that loads basic DE stuff, like password rings, settings daemons, desktop search engines, plugins, consolekit session attachment (for automounting et al if you are into that) etc. But nothing is truly carved in stone in this regard.

In xfce there's a thing called xfce4-session. Both gnome and kde has their own as well, though I don't remember the names right now. Most basic WMs don't do session management at all, though you can always setup them to launch app1 in desktop1, app2 in desktop2 and maximized in the left half, app3 in desktop2 right half, etc. Fvwm provides some kind of session management stuff, but I never looked into it, really.

I find it much easier to have several shell scripts that will setup my environment in about 1 second for a new task. Then I can bind them to an icon or a keycombo, and can modify them instantly in nano rather than diving into a dozen config dialogs just to change session or something like that. A big plus is that this is DE-WM-independent ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum