Ruarí's thoughts

Installing a second copy of Opera under KDE

, , , , , ,

The following are instructions for installing a second copy of Opera under KDE. Use these instructions for Gnome or Unity and these instructions for Xfce.

Firstly, grab a XZ compressed tar package that matches your OS and architecture. So if you use 32-bit Linux you want a package that ends ".i386.linux.tar.xz" and if you use 64-bit Linux you want a package that ends ".x86_64.linux.tar.xz".

Save it some where convenient and it should look something like this in your file manager:

Right click on this file and choose 'Extract Acrhive Here':

You should now have the original file plus a similarly named directory, like this:

Enter the directory and you will find the following Opera files:

Click on 'Tools -> Open Terminal', like so:

A terminal (konsole) will now open at this location. At this stage you have two options.

Firstly you could run Opera 'in place' which will mean that you don't actually have to install it but rather just run it directly from this directory. It will even store its profile (settings) within this directory. This is a particularly good choice if you want to start with a clean profile for every snapshot, or if you want to have a portable version of Opera that you can carry around on a USB drive (just extract the directory to the USB drive).

To run Opera in place, type the following and press the 'Enter (Return)' key:
./opera & 

That is it! wink When you are finished with Opera shut it down as normal. If you want to start it again, just navigate back to the extracted directory, start a terminal and issue the above command again.

Note: If you want your bookmarks and speeddials from your stable Opera install, the easiest way to copy them across is to enable Opera Link.

The second option is to install Opera alongside your stable version. The advantage here is that you could install one snapshot, configure it how you like and then upgrade it through all future snapshots, whilst retaining every one of your settings. You also get full desktop environment integration (e.g. a shortcut in the application menu). To start installation type the following in the konsole window that you opened from within this directory:
./install --user --unattended --suffix snapshot 

This means install Opera for the current user only (--user), without prompting for further options (--unattended) and with a suffix of 'snapshot' (--suffix snapshot).

Suffixes are used to allow multiple side by side installations, which is exactly what we want. The suffix renames Opera's files slightly so they don't conflict with the main install (since it has no suffix). You could use any keyword as a suffix, but snapshot seems appropriate here. wink

The install script will start installation and display the following:

A second copy of Opera is now installed alongside the stable version! bigsmile

You can confirm this by looking in your Applications menu:

Finally, if you ever want to uninstall the snapshot then start konsole (it doesn't matter from which directory when uninstalling) and issue the following command:
~/.local/bin/uninstall-opera-snapshot 

Installing a second copy of Opera under Gnome/UnityInstalling a second copy of Opera under Xfce

Comments

hundredorzero Thursday, December 1, 2011 8:39:29 PM

Ruari thanks for the tutorial. I am using Ubuntu 11.10 Oneiric Ocelot. I also have kde, xfce, lxde desktop environments installed over it. I was a little curious, so i tried to install second copy of Opera under kde but using gnome way, that's by running install script. But Install script opened in text editor, although it was executable. Now i have 2 questions.

Q-1: Can't we run install script inside terminal under kde?

Q-2: Should I go back to gnome for installing second copy of Opera? or should I just follow this blogpost?

Ruarí Ødegaardruario Friday, December 2, 2011 7:23:12 AM

The reason I wrote more than one blog post is that you cannot do it exactly the same way in every environment because as you saw double-clicking on a shell script has different results.

Originally posted by hundredorzero:

Q-1: Can't we run install script inside terminal under kde?

Of course, that is what I tell you how to do above! wink

Originally posted by hundredorzero:

Q-2: Should I go back to gnome for installing second copy of Opera? or should I just follow this blogpost?

Either will work but if you are already in KDE you can just follow this one as that is why I wrote it. wink

If you want to see the same install interface you saw in Gnome, you can adjust these directions very slightly. After the step above where you open a terminal within the extracted directory, issue:
./install

You can then follow the Gnome instructions from that point onwards.

Ruarí Ødegaardruario Friday, December 2, 2011 7:23:21 AM

The shell script itself works exactly the same, no matter the environment. The real install instructions are just two steps:

1.
tar xf opera-11.60-1180.i386.linux.tar.xz
2.
opera-11.60-1180.i386.linux/install

The reason I don't just provide these is because: I know that not everyone understands how to open a terminal (or is scared by the idea); not everyone would realise that they need to switch into the directory where the package was downloaded first (or how to do that); not everyone would adjust the commands to account for build number and system architecture (and then be confused when it fails); not everyone would pay careful attention to the options in the installer itself and may just accept defaults (which would be wrong for a side by side installation).

Hence these rather long blog posts. bigsmile

Ruarí Ødegaardruario Friday, December 2, 2011 7:28:37 AM

Actually here is a trick that might be easier and should work in every environment.

1. Unpack the tar.xz file
2. Navigate into the directory that was created using your graphical file manager.
3. Start a Gnome, Xfce or KDE terminal.
4. Drag the file called "install" from the extracted directory into the terminal (the result will be the full path to the install script).
5. Press the "Enter/Return" key in the terminal to start the install.
6. Follow the Gnome instructions from that point onwards.

hundredorzero Friday, December 2, 2011 4:12:26 PM

Thanks Ruari this all is of great help. I have successfully tried all the installation methods that you mentioned above. I have also perfectly understood that what we actually have to do is to extract downloaded file and then execute install script, no matter what route we take for this.
From now onwards i will be using custom bash file to automate all this.

Ruarí Ødegaardruario Friday, December 2, 2011 6:25:54 PM

wink

hundredorzero Wednesday, December 7, 2011 11:35:56 AM

Ruari can we get a permanent link for whatever is the latest snapshot? A link that doesn't change with each new build?
I need it to use it with wget, because i want to use it in bash script which i am using for installing latest snapshots as second copy of Opera. The only problem with my script is that downloading link is not permanent.

In case you need to know the script i am using:
cd ~/Desktop
wget http://snapshot.opera.com/unix/earthmother_11.60-1181/opera-11.60-1181.i386.linux.tar.xz
tar xf opera*.tar.xz
opera*.linux/install --user --unattended --suffix snapshot
rm -r opera*.linux
rm opera*.tar.xz

Ruarí Ødegaardruario Wednesday, December 7, 2011 12:09:50 PM

Ruarí Ødegaardruario Wednesday, December 7, 2011 12:47:40 PM

I suspect you want something like this:

#!/bin/bash
PKGLNK=$(wget -qO- http://my.opera.com/desktopteam/blog/ | sed -rn 's,.*unix/(.*_[0-9][0-9]\.[0-9][0-9]-[0-9]+).*,\1,p' | head -1)
wget -O- http://snapshot.opera.com/unix/${PKGLNK}/opera-next-${PKGLNK/*_/}.i386.linux.tar.xz | tar -xJf- -C /tmp
/tmp/opera-next-${PKGLNK/*_/}.i386.linux/install --user --unattended --name opera-snapshot
rm -fr /tmp/opera-next-${PKGLNK/*_/}.i386.linux

Note: There won't be more 11.60 builds and 12.00 is always Next. So you don't really need to set the 'snapshot' suffix at all, as it defaults to next in next builds. Remove '--name opera-snapshot' from the example above to use next instead.

Ruarí Ødegaardruario Wednesday, December 7, 2011 12:59:23 PM

Originally posted by hundredorzero:

Ruari can we get a permanent link for whatever is the latest snapshot?

Originally posted by ruario:

No, because you don't need it. wink

Actually, if I am honest this link does already exist:

http://snapshot.opera.com/unix/latest

However, I won't recommend that you base your script on that. Rather use one of my examples for parsing the latest download link from the Desktop Team blog. The reason I suggest this is because the latest link is manually updated (usually by me as it happens) after the blog post goes live. However we often forgot to do it right away and occasionally it has not updated it for a couple of days. Hence it is more reliable to parse the page if you actually want the latest link. wink

Ruarí Ødegaardruario Wednesday, December 7, 2011 1:32:19 PM

Actually I think you just want my script (opupdate) but you can re-implement your own if you really want. wink

hundredorzero Wednesday, December 7, 2011 8:20:43 PM

Originally posted by ruario:

I suspect you want something like this:


#!/bin/bash
PKGLNK=$(wget -qO- http://my.opera.com/desktopteam/blog/ | sed -rn 's,.*unix/(.*_[0-9][0-9]\.[0-9][0-9]-[0-9]+).*,\1,p' | head -1)
wget -O- http://snapshot.opera.com/unix/${PKGLNK}/opera-next-${PKGLNK/*_/}.i386.linux.tar.xz | tar -xJf- -C /tmp
/tmp/opera-next-${PKGLNK/*_/}.i386.linux/install --user --unattended --name opera-snapshot
rm -fr /tmp/opera-next-${PKGLNK/*_/}.i386.linux

Note: There won't be more 11.60 builds and 12.00 is always Next. So you don't really need to set the 'snapshot' suffix at all, as it defaults to next in next builds. Remove '--name opera-snapshot' from the example above to use next instead.

This script just runs and exits immediately. Does nothing that i could know.

hundredorzero Wednesday, December 7, 2011 8:27:45 PM

Originally posted by ruario:

Actually I think you just want my script (http://my.opera.com/ruario/blog/2011/01/10/a-poor-mans-auto-update-with-snapshot-support]opupdate[/url]) but you can re-implement your own if you really want. wink


Installed and run opupdate. smile and posted my comments here opupdate

Ruarí Ødegaardruario Wednesday, December 7, 2011 8:39:23 PM

Originally posted by hundredorzero:

This script just runs and exits immediately. Does nothing that i could know.



You sure, my.opera.com wasn't just unresponsive at that time. Not much space for error checking in 4 lines! wink

You could find out what is going wrong by running it as:
bash -x scriptname

P.S. There is always the following if you want to carry on working on your script:
wget -nv -O- http://my.opera.com/desktopteam/blog/ | grep -i "snapshot.opera.com/unix" | head -n1 | wget -erobots=off --force-html -ri- -l1 -nd -np -A.i386.linux.tar.xz

hundredorzero Wednesday, December 7, 2011 10:56:46 PM

Originally posted by ruario:

You sure, my.opera.com wasn't just unresponsive at that time. Not much space for error checking in 4 lines!


Yes sure.
In case it makes any difference, please note that i am doing all this under gnome (Ubuntu 11.10) and not under KDE.

Originally posted by ruario:

You could find out what is going wrong by running it as:

bash -x scriptname


Everything runs fine with this, I didn't spot any error. Opera Next was successfully installed.

Originally posted by ruario:

bash -x scriptname


Nice trick smile, i didn't know that before. It will be useful for me in future.

Originally posted by ruario:

P.S. There is always the following if you want to carry on working on your script:

wget -nv -O- http://my.opera.com/desktopteam/blog/ | grep -i "snapshot.opera.com/unix" | head -n1 | wget -erobots=off --force-html -ri- -l1 -nd -np -A.i386.linux.tar.xz


Thanks for this one. Works perfectly with my personal script.

Ruarí Ødegaardruario Wednesday, December 7, 2011 11:02:29 PM

Try changing the first line from:
#!/bin/bash
to
#!/bin/env bash

hundredorzero Thursday, December 8, 2011 8:58:42 PM

Originally posted by ruario:

Try changing the first line from:

#!/bin/bash
to
#!/bin/env bash


Tried it. No difference. But i think it's not needed anymore, since you have already solved my problem twice. Once by helping me with my personal script, and once by opupdate.

Landis Reedlandis Monday, April 8, 2013 9:01:13 AM

# ./opera & does Not work in KDE 4.8.5...
Has to be # ./opera& , No space or the ampersand (&) is passed to opera as an argument (url), if run from launcher, run in console.

Landis.

Ruarí Ødegaardruario Tuesday, April 9, 2013 11:12:17 AM

@landis: It works just fine with our without a space. Aspects such as the desktop environment and terminal emulator are irrelevant. That said, I am actually running that version of KDE myself right now and can confirm I have tested and had no issues with the space. wink

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies