So as it was promised, konqueror session management is already done. I’ve just sent an email to kfm-devel with the patch attached and hopefully the patch will enter into trunk before the hard feature freeze (next monday) so that we get it in Konqueror 4.1.
The session management support is pretty similar to the one that Opera has. Let’s say it’s inspired in Opera =). And as everyone likes screenshots, here there is one that shows the new menus for session management:
So you can easily save current session, open one of the saved sessions, or manage current sessions. And only one more item was added to the File Menu, which is the same menu where session management resides in Opera.
The Manage sessions dialog lets you save current session in a new session or in an existing session (overwriting it). It also can rename an existing session, or delete it. Or even open one of those sessions. Quite straightforward if you look at it, actually:
And I have reserved the best part for the end. Proper crash session recovery! Because Konqueror shouldn’t, but it can crash sometimes. And it crashes even more when you use KDE trunk. Until now, the only option you had to recover from a crash was using the crash plugin which is sub-optimal.
What I’ve done is something similar to what Opera, Firefox and many others browsers do: Save session every X seconds (it’s configurable via konquerorrc, 10 seconds by default as in firefox). This is done for all konqueror processes, and it’s saved in ~/.kde/share/apps/konqueror/autosaved/. Each process saves its session timely there in a file with a name similar to “:1.114″ which identifies it. When a konqueror instance is closed cleanly, its file is removed.
Thus, every time a new window or konqueror process is launched, Konqueror reads that directory and asks to DBus if there’s any service registered with the name “:1.114″, for example, or whatever name have the autosaved files. This is done very fast, because no text parsing or waiting is needed, so the user doesn’t feel any delay.
If for some reason there’s a file with a name that is not related to a registered dbus service, that means that something wrong happened i.e. a konqueror process crashed or froze. And in that case, you get this nice dialog:
Which allows you to restore session if you want, or not, or even not restoring it now but restoring it later (opening a new konqueror process / window). As David Faure suggested me, it also allows you to check “do not ask again” and always do whatever you choose automatically without asking everytime. Nice isn’t it?
There’ still some related fixes I want to add to SVN before hard feature freeze, like adding a KAction menu to “Hibernate konqueror”, i.e. Save current session and close konqueror, so that next time you open konqueror it can be restored. Also listing the crashed and still not restored sessions (i.e. you clicked in “ask me later”) in the sessions menu.
Oh and adding an option to undo closed tab to right click menu of the konqueror tabbar is a must too, I use that option a lot now in firefox and we need it too
.



Cool news. I like konqueror. But this is most wanted features.
I’m waiting “Hibernate konqueror” function. The best thing I like about opera is that i can close it and after opening browser shoes same tabs.
Cool! A long awaited feature for Konqueror, thanks for your great work! When it will be committed to trunk?
Whoo, that’s nice! Yay for crash recovery, thanks a lot for that feature
However, can I propose a few small interface changes?
* My pet peeve, icons: Please don’t use icons just because you can, but only where they make sense. Particularly, the button icons in the crash recovery dialog (“Restore session”, “Do not restore”, “Ask me later”) make little sense because the user can’t quickly associate the actions with those icons, and worse, the way you use the icons there is *slightly* different to what they normally mean. That’s confusing, and it would be better not to have any icons on the buttons there. Also, please use the “edit-rename” icon for the “Rename” button in the session management dialog instead of “document-save-as”, don’t use an icon for the “Sessions” sub-menu as there’s no appropriate icon for that, and don’t use the “folder” icon for the sessions in the management dialog if they all use the same icon – it doesn’t convey additional information.
* It would be neat to have a consistent sessions interface between Konqueror and the existing Kate sessions menu structure. That would include renaming “Manage sessions…” to “Manage…”, “Save this session…” to “Save As…”, and introducing a “Save” action that saves the currently opened session without asking for its name. (Alternatively, you could talk to the Kate team to adapt their Sessions menu to your structure… but whatever the outcome, it should be consistent throughout KDE.)
* For the long term, we should ask ourselves how the new sessions feature interacts with the already existing”View Profiles” feature in the Sessiongs menu. I would assume that it’s difficult for the user to tell the difference between those two, especially since both can save URLs as well. I think it’s probably confusing if not unnecessary to keep both of them – maybe you can merge those two into one “Session” feature? I also find it awkward to have one of those in the “File” menu while the other one is in “Settings”, that should really be worked out. Perhaps introduce a separate “Sessions” menu like the one from Kate, and put both Sessions and View Profiles there until they are merged? Please bring this up with the Konqueror devs.
Didn’t this already exist in konqueror (other than the crash handling, which is insanely welcome) in the form of view profiles?
Hi
@Joshua: View profiles are for konqueror settings, like toolbars and menus and such, but Sessions are just for websites and tabs opened by Konqueror.
actually i think Konqueror’s menu’s are becoming a mess.I dont know how your Konqueror’s “Files” menu is that clean, but i have hundreds of ‘Open with foo’ items there and other menu items are becoming a mess too.
Window menu is bloated too.items at there should probably go into submenus.
Also ‘Bookmarks’ menu could be a sub-menu in ‘Tools’ menu.
one other thing is ‘View profiles’.is this thing really usefull? i havent seen anyone using it, so it would be nice if konqueror devs remove it (if it is not really used).
Watch the “:” in those file names — Win32 won’t like them
@Emilsedgh: That may be what they are for, but with the little “Save URLs in profile” checkbox, it amounts to pretty much the same thing.
Even if you weren’t able to do that, the view profiles allow you to set konqueror up differently for different tasks. I can set it to have a multi-pane view for file management (I like having both time and name sorted panes locked onto the same URL so as I move through the filesystem the panes always show the same folder) while have my web browsing interface be as simple as only having a location bar and the rest of the window just be used for the web page (no navigation buttons or oter toolbars to take up space). Without the view profiles I would have to stick with just one or the other.
Thank you.
Maybe this is not related to konq. only, I do not like how to navigate tabs.
@Jakob
icons: I like icons, I want icons. For example in the restore session dialog, I like the red X button for “Do not restore” because it kind of warns me “hey, be careful you will loose the saved session”. The chronometer for aks me later kind of tells you “sometime you will be asked again”. And the “Restore session” has a “window-new” icon, which is related, because it will open a new window indeed.
That doesn’t mean you’re not right: I probably should ask for a “ask-later” icon, for example, and let the icon people deal with how should it look like =)
About the edit-rename, and removing sessions’ icons in the menu and in the Session management dialog, take it for granted I will fix it.
consistent interface: I’ve just changed my code to use the same strings as Kate =) I don’t like Kate’s menu structure, too verbose.. I prefer the one I created which resembles opera’s. I definitely don’t want having a new top-level Sessions menu for one, etc. After all sessions is not as important in konqueror as in Kate so I want to keep it as simple as it gets for now.
view profiles: it’s not same thing as someone already pointed And they are in different places because of that. In fact, when you save a session the current konqueror profile is saved with it, so that it can be restored. And saving a session includes caching the pages and saving back-forwards history and even form-data, meanwhile saving the profile doesn’t only saves the URLs.
@Emilsedgh
Konqueror menu’s are a mess and that *must* be dealt with soon. All those open With items should probably be in a sub-menu. And the View profiles menus should probably copy the menu-arrangement of the sessions menu i.e. one submenu with all the options. KISS.
But no, I’d definitely not put bookmarks under “Tools” menu, and it should keep being top level or enter inside the “Go” menu when the location bar can search inside bookmarks & history and thus the bookmarks menu is not so highly needed.
Thanks for all the feedback!
about the undo close, would be better “undo close tab” and “closed tabs list”, as firefox… so you can choose to reopen one of the last N closed tabs
I guess you don’t start the save session timer again after a save, until the session contents change, right? This will save battery.
@xdmx
You already have a undo closed item and undo closed items in Konqueror. What I mean is adding a shortcut in the contextual menu of the tab bar for “undo last closed tab” as in Firefox.
@Will
Too much complicated, not really feasible. Session state changes even when you type in a form or scrolls in a page. I implement it the straightforward way: every X (X = 10seconds by default) seconds, sessions is saved. That’s how it’s done elsewhere and it works fine: kmail, Opera, Firefox..
Will this seesion saving be used when saving desktop session on exit? Would be weary handy, in KDE3 it doesn’t save back-forward history etc.
Thank you very much for that! Time to recompile
@edulix:
i’m still using kde 3.5.8, so i don’t know if there is already this or not, btw i meant something like this: http://img403.imageshack.us/img403/402/32af8.jpg
A nice one is also the undo with the middle mouse button, it’s quite useful
Thank you! Opera was my baby until they forgot how to make Flash work under Linux, then I moved to Konqueror. I love the tight integration and low overhead of it, but I dearly missed features like these from Opera.
btw. Is konqueror 4.1 webkit based? I remember seeing some information that this will be case but it’s silent from that time.
@arekm: As far as I know, KHTML is still default. Some distributors (e.g. openSUSE) already offer a webkitpart package. The Webkit KPart can then be activated in systemsettings, at “Advanced > File Associations”: Select text/html at the left, and change the position of webkitpart in the “Embed” tab.
@Sebastian Sauer
Note that the patch has not yet landed into trunk, although you can get it from kfm-devel.
@Serhiy Kachanuk
Yes, that’s already working in KDE 4.0.0 and newer versions
@xdmx
Uhm I will take a look at that, I like having small contextual menus though.
When I’m asked a question like “Do you want to restore everything you had open when the program crashed?”, my answer is always the same: “I don’t know. What did I have open?”
Show us a list, please.
@Forrest
Really interesting idea. I’m taking Google Browser Sync as a reference http://www.google.com/tools/firefox/browsersync/index.html
Greeting’z,
This is a great feature thats been needed for a long time,
Thank You.
I’ve got a couple thoughts to add:
> First, as (Forrest) suggests “Show us a list, please”,
if a session with multiple tabs crashes, you should be able
to edit/select the tab/URLs to be restored (for those rare
cases when just one URL continues to crash), show them as a
list with “Select All/None” button, and check box for each,
and maybe an “Open in New Session” button for each URL,
also would be nice to have an option to Bookmark all or each
URL when Restoring, or have a auto-generated list of the URLs
in the Side-Bar like the History tab.
> Second, perhaps the entire “Session Management” feature could
become a desktop-wide service for any app to utilize, integrated
with the “Crash Handler”, providing the Session Management as a
standard component for the whole Desktop session, to every
individual app that wants to use it, then when something does
crash, at any level, the “Crash Handler” would not only alert
the user about the problem, but offer to Restore there app to the
last auto-saved state.
> Third, the “Profile Manager” is an Absolutly Essential feature,
I use it constantly, and think its one of those great features
that gets overlooked, However it could use another config option
wether or or not to (when there is only one tab/URL open):
1> save with the current URL
2> (when overwriting an already saved profile) save the previous
URL
3> save with the default URL (about:/).
> I’ve want to say this for awhile, when I was trying out the
OpenSuSE+KDE-4.0.0 several months ago, I noticed that when I
saved a file, all the Spaces were automaticly converted to
Underscores, YES!! (Thank You 10 Million Fold, who ever did
that!!) now just auto-convert those Other annoying characters
that bork shell scripts ie: `~!@#$%^&*()=|\{}[]:;”‘,?/ into
the few that don’t ie: -_+. that would be wonderfull.
> Woud it be possible to fix the “Web Archiver” so that when
opening archived pages they did not prompt for Cookies, and
Broken PHP/Java/etc.. Scripts, and most especially, not attempt
to load the Evil that are Advertisement’s, Please ?!?
(those nasties make .war files a pain, especially as Previews)
Also, ensuring that the web archiver does not get forgotten
or removed, as I have well over 100,000. (with 8995 currently
on disk).
> Last, an optional “URI Selector” pull down menu prefixed to the
URL field, that list all supported URI’s, especially the KDE
specific ones like “fish://”, and when selected automatically load
it’s about, overview, or man page.
Zarantu
That’s really cool and it’s something I’ve really miss. It is one of the major reasons why I use Firefox.
My pet peeve: CTRL-L (going to the URL bar) clears the URL bar. I much prefer the way Firefox and other browsers does it. Just mark the entire url, then when I start typing, the current url gets replaced, but it also gives me the option to copy the current URL. I find that I use that feature often.