Skip to content

Instantly share code, notes, and snippets.

@ruario
Last active August 29, 2015 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruario/df505eff1038d9769b60 to your computer and use it in GitHub Desktop.
Save ruario/df505eff1038d9769b60 to your computer and use it in GitHub Desktop.
Extracting Opera from the .deb package to run in place with a self-contained profile.

Running Opera without installing it

Using Opera developer version (28.0.1719.0) as an example:

ar p opera-developer_28.0.1719.0_amd64.deb data.tar.xz | tar -xJf- --strip 4 --exclude opera_sandbox --wildcards './usr/lib/*'
opera-developer/opera-developer --user-data-dir=opera-developer/profile &

For comparison with Opera 12:

tar xf opera-12.16-1860.x86_64.linux.tar.xz
opera-12.16-1860.x86_64.linux/opera &

Ok, it is messier but if you use a script to handle extraction and creation of a start-up script that uses --user-data-dir, then there is not a lot of difference. It is certainly not as bad as many would assume.

Note

This above assumes you have the variable OPERA_DEVEL_SANDBOX predefined and pointing to a valid root-owned, setuid sandbox application. You can actually take an Opera sandbox from any recent Opera package. You should be able to continue to use it for multiple releases before needing to update it. To extract and configure the one from Opera 28.0.1719.0 developer, issue:

ar p opera-developer_28.0.1719.0_amd64.deb data.tar.xz | tar -xJf- -C /var/tmp --strip 5 --wildcards '*/opera_sandbox'
sudo chown root:root /var/tmp/opera_sandbox && sudo chmod 4755 /var/tmp/opera_sandbox

Then define the variable (export OPERA_DEVEL_SANDBOX=/var/tmp/opera_sandbox) in your ~/.bashrc or somewhere else you feel is appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment