KDE: How to save more than 1 session and choose one on login?

Can someone tell me how to save more than 1 session (in KDE) and choose among them at login?

I have several different projects I’m working on each month. Any particular project requires me to have 3-8 documents open (to read, sometimes .doc, sometimes .pdf), a number of different webpages (also for reading), alone with 2-3 different docs open in editors.

When I want to switch from project A to project B (or from project B to playing games), it is nice to be able to close everything, have a clear memory (and desktop/workspaces) and then be able to go back to project A or B or games, etc. later in the day, tomorrow, next week, etc.

There must be a way to do this, right? The basic session saver does a GREAT job saving 1 session for me, so it must have a way to remember several and let me choose. But how?

Searching in forums only produced this little nugget from an old post: That I can use
qdbus org.kde.ksmserver /KSMServer saveCurrentSessionAs “name”

to save any particular session with a particular name. But then how do I reload that one as opposed to another? (For that matter, where does it save them?)

Thank you in advance for any help!

Rick

You could consider having more than one user account. Then log in to the appropriate one. Then configure each to preserve sessions via System Settings >> Startup and Shutdown >> Session Management.

On 07/27/12 21:36, rabarrett pecked at the keyboard and wrote:
> Can someone tell me how to save more than 1 session (in KDE) and choose
> among them at login?
>
>
Use different logins for each.

On 07/28/2012 03:36 AM, rabarrett wrote:
> There must be a way to do this, right?

back in the old days ('90s) with OS/2 you could create a ‘work folder’
on the desktop and place in it (links to) an open copy of (for example)
a pdf viewer open to a particular pdf, a web browser open to a page,
docs open in editors/applications a spread sheet open to (say) Taxes2012…

and, then work on (say) your personal income taxes …when done with
that for the day, then just close that ‘folder’ and it and all in the
folder would close…and none of the browsers, editors, doc viewer,
spread sheets etc etc etc etc inside were left running…

tomorrow, just click on the folder, and when it opened everything inside
it opens to just where you were yesterday when you closed it…

maybe a FATE <https://features.opensuse.org/> could be worthwhile…OR
does KDE’s “Activities” do the same??? (i’ve not used “Activities” but
if it does as described, then i will begin!)


dd

I am with those promoting this. Typicaly a case for diferrent user acounts. It will not only enable you to keep different sessions saved, but also to keep the complete environments apart. Thus having a complete different Desktop look for different project/user (even KDE for one and Gnome for other). And, as one can have different sessions open at the same time, you can easily switch between ssesions and thus users and thus projects, with a simple Ctrl-Alt Fn with no need to log out/in all the time during he day when you want to change.

Also keeping apart all the files from the different projects ensures that interference between them is avoided.

Well, I appreciate the idea of having multiple users, though I’m not sure it’s idea, it’s a possible work around to what I want.

It seems like it will require setting up n profiles, n browsers and other options & specifications (the way I want, even if they’re the same from one user to another), etc.

There’s also a little difficulty in accessing similar files, though I suppose I could share directories, etc.

It’s a reasonable work around, but since the capability is clearly there (if KDE can save one session for each user), why isn’t there a way to save multiple sessions and choose?

Thanks for the (partial) solution/work around, I hadn’t thought of that yet.

Rick
(I’ll look into “Activities,” I’m not sure what’s being referred to yet.)

That is done by making users sharing the same group and then users giving apropriate read/write/execute access to the group.
Unix/Linux is a multi-user system and you should at least understand the basics of this.

Because it is saved in a specific set of files in the users home directory. And as long as the desktop software (like KDE) does not implement having multiple sets in there (and a way to differentiate between them)), there is but one* /homerabarrett/.kde4/…* for user abarrett.

It might be possible to design/program such a feature. But my guess is that you must try to ask that in a Feature Request facility of e.g. KDE or Gnome, or where you want it. Be prepared then to offer a solid case, because support for your case must come from those who want this like you and who see there it is a possibility to make it.

Using multiple users ended up being a very poor solution. There are just too many preferences I have to reset within each profile: display properties, web browser extensions and book marks, email program preferences, etc, etc. Having to set them all to my preferred choices in each program for each of 5 users is a lot of pointless work. It would be nice if I could just choose from several sessions. Programmers see the need for multiple desktops, why not multiple sessions saved?

On 08/25/12 23:26, rabarrett pecked at the keyboard and wrote:
> Using multiple users ended up being a very poor solution. There are
> just too many preferences I have to reset within each profile: display
> properties, web browser extensions and book marks, email program
> preferences, etc, etc. Having to set them all to my preferred choices
> in each program for each of 5 users is a lot of pointless work. It
> would be nice if I could just choose from several sessions. Programmers
> see the need for multiple desktops, why not multiple sessions saved?
>
>

Just set them up in the first user profile and copy them to the other
ones. It’s just a matter of a couple of directories. And make sure you
change the perms on the copies to the new user profile.

Just a thought.

Absolutely - I disagree with everyone here. You don’t create a new user for the sole purpose of restoring a session. We’re not the Borg.

You could at least have changed and exported KDEHOME before login to avoid adding users … but it would just have been another stupid workaround.

It seems not to be possible (or I don’t know how) without hacking ksmserver. I posted a hack (not a solution) here: http://forums.opensuse.org/english/other-forums/development/programming-scripting/477708-manually-saving-restoring-kde-sessions.html. But if it works for you, you can call it a ‘solution’.

The closest thing I can think of to do this, while having all of your preferences the same but still having some things customizable, is to use multiple activities. The only downside to this is that anything you leave open in any activity will stay open unless you close the application. As far as I can see, stopping the activity does not close the programs. Neither does deleting the activity (it will show the programs from the deleted activity in the current activity). If you have a lot of memory, then this isn’t as much of a problem.

The upside is that you can have a work activity and have everything open that you want to be open in that activity. When you want to go to a different project or to games, you would then switch to the activity with those files and applications. By default KDE’s task manager only shows open windows from the current activity so when switching between activities, only the programs open in that activity will show in the task manager. This also allows you to use the different desktop activities as well. Such as having a folder view desktop of a current project’s files, but then a regular plain desktop for internet browsing, or the search and launch activity for easily getting to games.

To make this work, you could create a folder for a project and put the files for that project in that folder. You could also then add program shortcuts relevant to that project into the folder as well. Then use either the folder view desktop to launch all the files you need open from the desktop, or the folder view widget with any other desktop. Then close the applications once you’re done with that activity (if memory is an issue).

Just my two cents.

Take care,

Ian

Edit (longer than 10 minutes): It seems stopping an activity will shut down most, if not ALL of the programs in the activity. When you start the activity back up all the programs you had open when it was stopped open back up. I tested with a couple of documents open in libre office, dolphin open, and firefox open. Everything but Firefox closed. Tried again with konqueror and konqueror does close when the activity is stopped.

So it seems the multiple activity option may also be feasible. It would take some testing on your end to see if all the software you use closes properly when an activity is stopped.

Take care,

Ian