One of the features I’d like all browsers, that support tabbed-browsing, should include by default is to let the user save the current window’s tab layout (aka tab session) to a file and also provide the ability to load such a saved tab session. My main browser, Epiphany, does not have this functionality and I couldn’t find any extensions that do something like that. So, since Epiphany supports extensions written in Python, I decided to write one.
Part of the functionality I have described above is actually implemented into Epiphany, but is only used internally. The tab layout is saved in an XML file (~/.gnome2/epiphany/session_crashed.xml
) every time the browser is used. If Epiphany is closed abnormally, then, the next time it is launched, it offers the option to recover the last session. This serves well, but I cannot understand why this feature was not further extended in order to let the users also save/load tab sessions at will.
I wrote an extension that does exactly that. This is a rough first release, but seems to work well. There is no installation script or patch for the official epiphany-extensions
package at the moment.
What it does
This extension adds two menu entries under the “Tools” menu:
- Save Tab Session
- Saves the current window’s tab session in a file of your choice, using the .ephytabs filename extension. The XML file format is exactly the same as the one that Epiphany uses to automatically save the recovery session.
- Load Tab Session
- Loads a tab session from a file. A tab session can also be loaded from the saved file by using Epiphany’s shell option “
--load-session=
“.
Requirements
Here is a list of what you will need in order to use the extension:
- The epiphany-extensions package.
- If you use Python older than 2.5, it is required that you install either the cElementTree or the elementtree module. Either one will do.
- If you use Python 2.5 or newer[1], then you will need nothing else, as the aforementioned modules are have been included in the standard library in Python 2.5.
[1]: Here is how to find out which version of Python your system uses. Issue the following command:
python -c "print __import__('sys').version.split()[0]"
The required software should exist into the official package repositories for your distribution. For example:
To install the epiphany-extensions
RPM package in a Fedora/OpenSUSE (with yum configured) system, do a:
# yum install epiphany-extensions
or in order to install the epiphany-extensions
DEB package in an Ubuntu/Debian system:
# apt-get install epiphany-extensions
How to install the plugin
The plugin is written in Python, which means you do not need to compile it.
There are two ways to install the plugin, just for you or for all users (system wide). Choose whichever suits your needs:
-1- In order to install it for use in your own user account, drop the tab-session-management.ephy-extension and tab-session-management.py files in the ~/.gnome2/epiphany/extensions/
directory. If that directory does not exist, just create it.
-2- In order to install the plugin system-wide, it is needed to put the tab-session-management.ephy-extension and tab-session-management.py files in the /usr/lib/epiphany/2.XX/extensions/
directory (where XX
the epiphany version).
Finally, restart Epiphany.
How to use
First, you have to enable the plugin in the Tools->Extensions panel. Look for “Tab Session Management”.
Then, open some web pages in tabs, choose Tools->Save Tab Session and set a filename for the session. The Epiphany tab session files will have the .ephytabs
extension in their filenames.
In order to load a saved session, go Tools->Load Tab Session and choose the appropriate session file in the dialog.
License
This project is released under the terms of the GNU General Public License version 2 or later.
Download
All versions of the software, including the latest stable release, are available from the development web site’s download area.
This project has been discontinued.
Nautilus Action
This is optional.
Here is a Nautilus Action, so that you can open saved tab sessions into Epiphany from within Nautilus.
Download the action package from the download area and extract it.
Then, run the nautilus-actions-config utility or go to System->Preferences->More Preferences->Nautilus Actions Configuration
From there:
- Choose:
Import/Export
- Select:
Import new configurations
- Browse to the extracted action file (load_ephy_session_nautilus_action.schemas) in the
File to Import
field - Type of configuration:
Automatic
- Press
OK
From now on, whenever you right-click on .ephytabs files, you can load a session by choosing “Load Epiphany Tab Session“.
Tab Session Management extension for Epiphany by George Notaras is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright © 2006 - Some Rights Reserved
I’m moving from firefox to epiphany.
Do you know of any epiphany extension that allows the rescaling of tabs, i.e. I would like to have the dimension of tabs to be reduced to that all of them fit into the current window.
Thanks!
Hi Paolo. Unfortunately, the number of extensions for Epiphany can in no way be compared to the numerous extensions for Firefox. I haven’t read anything about a plugin with the functionality you ask for.
This GNOME wiki page contains a list of 3rd party plugins. Many more exist though as custom hacks around the web.
Hello!
Is it possible to load the previous session automatically?
Regards!
@Felipe: This would require keeping track of which session had been opened last. It requires a bit of coding, but, unfortunately, I’ve stopped developing this project.