maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   OPERA HACK: Set as default browser + Open multiple windows!!! (https://talk.maemo.org/showthread.php?t=85445)

AJMAL P.M 2012-07-12 00:01

OPERA HACK: Set as default browser + Open multiple windows!!!
 
2 Attachment(s)
'Do not use any of the methods below. We don't need this since last Opera update is capable to open multiple external links and it can now be set as default browser from phone Application Settings."


============================================


Update: Use the UPDATED METHOD rather than the below method. See the updated method at the end of this post.

Mommy I found it! ;)

Yesterday I went through this thread (http://talk.maemo.org/showthread.php?t=84733) and got some hints regarding how to pass the url text to Opera. (Thanks to ajalkane and f7391) But there were some disadvantages.

1) Works only one time.

2) One should exit opera before click any other links in apps like rss feed/ other apps.

3) If opera is already opened, link won't work.

After some failed attembts I found a way to make opera works whenever you click a link. No matter whether Opera is opened or not. And it opens multiple Opera windows!!! Open as much as Opera you want. Crazy..!


Coming to the hack

Edit defaults.list and operamobile-labs.desktop found in
Code:

/usr/share/applications/
In default.list replace 'browser.desktop' with 'operamobile-labs.desktop'. They are in random places so be more careful.

In operamobile-labs.desktop edit
Code:

Exec=/usr/bin/invoker --single-instance --type=e /opt/operamobile-labs/operamobile to Exec=/usr/bin/invoker --type=e /opt/operamobile-labs/operamobile %U
Place the files back to /usr/share/applications/ That's it.

Those who don't want to do editing stuff, download the attatched zip and extract it to Downloads and read the txt file inside the extracted folder.


Disadvantage:

1) No tabed browsing for external links.

2) Won't work in conversation view. (Don't worry there is a way. Tap and hold the link. Voila! you have more options. Select web/firefox)

3) Two web options appear in conversation view. (Not really a problem. Both web options open nokia browser)

Advantage:

1) Works all the time

2) Multiple windows

EDIT:

How to Install.?

Download the attachment.

Extract it to Downloads directory.

Open terminal

devel-su
rootme (or your password)
Code:

sh /home/user/MyDocs/Downloads/Set_opera_default/install.sh
How to uninstall?

Make sure you have Set_opera_default folder in "Downloads"

Open terminal

devel-su
rootme (or your password)
Code:

sh /home/user/MyDocs/Downloads/Set_opera_default/uninstall.sh

UPDATED METHOD (based on eccenux's comment)

For advanced users

STEP1: Create a new .desktop file with the code below.

Code:

[Desktop Entry]
Version=1.0
Type=Application
Encoding=UTF-8
Name=Opera Default
Exec=/opt/operamobile-labs/operamobile %U
Icon=/usr/share/icons/hicolor/80x80/apps/operamobile-labs.png
MimeType=text/html;text/xml;application/xhtml+xml;application/x-mimearchive;application/xml;application/rss+xml;application/rdf+xml;image/svg+xml;image/gif;image/jpeg;image/png;image/x-bmp;image/x-xbm;application/mime;
Categories=Application;Network;WebBrowser;
NotShowIn=X-MeeGo;

STEP2: Name the .desktop file as operamobile-labs-default.desktop.

STEP3: Copy it to /home/user/.local/share/applications/

STEP4: Add the below lines to defaults.list found in /home/user/.local/share/applications/

Code:

x-maemo-highlight/feed-url=operamobile-labs-default.desktop
x-maemo-highlight/http-url=operamobile-labs-default.desktop
x-maemo-urischeme/http=operamobile-labs-default.desktop
x-maemo-urischeme/https=operamobile-labs-default.desktop
x-maemo-urischeme/ftp=operamobile-labs-default.desktop
x-maemo-urischeme/file=operamobile-labs-default.desktop

Those who don't want to code

Download the second attachment (opera-as-default-browser.zip). Extract opera-as-default-browser.zip and copy files to /home/user/.local/share/applications/ using filebox. (Don't forget to delete defaults.list file already exist there.)


Now you will be able to open multiple windows whenever you click a link, at the same time you can use original opera mobile shortcut normal way.

jflatt 2012-07-12 00:07

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Settings, Applications, Web, Default browser doesn't work?

AJMAL P.M 2012-07-12 00:18

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
It does not show opera. I'm on PR1.2. Does PR1.3 supports opera?

AJMAL P.M 2012-07-12 00:46

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
I wasted my time creating deb file. The deb file only contain defaults.list & operamobile-labs.desktop in proper path. When I install it says Can't install.. installation interrupted. I think the problem is in the addition/replacement of the deskrop file. Is there anything like a script needed? Who can help?

Hacker 2012-07-12 00:58

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Quote:

Originally Posted by AJMAL P.M (Post 1236335)
It does not show opera. I'm on PR1.2. Does PR1.3 supports opera?

I have PR 1.3 and Opera 12.00.2, and I can confirm that the Opera browser is still not on the default browser selection menu. I voiced this problem with the folks at Opera some time ago, but no luck.

Hacker 2012-07-12 01:23

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Thanks for working on this. It may help to include a few screenshots or even upload a YouTube video showing how the hack works, and link to that here.

Most importantly, an easy way to uninstall and return things to normal just in case. Some people know how to backup and copy over files, but some do not.

Lastly, you may want to contact the developer for N9 QuickTweak about adding this tweak to that collection. People would be interested in this option.

AJMAL P.M 2012-07-12 03:48

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
I tried to create a .deb file for easy installation and uninstallation but there was error in package. I need expert's help. As a next step created a shell script. Installation and uninstallation work fine without extra terminal work. There is a .txt file inside Set_opera_default folder. Read it. Anyway I have included the instructions. See first post. The installation script create backup of original files. When you uninstall it original files will be returned. Uninstall script makes Nokia browser/Firefox as default browser depends on which was the default browser before.

What screenshots you want? I will provide as soon as possible. And yeah, thanks for that advice. I will contact N9Quicktweak dev.

Hacker 2012-07-12 07:31

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Is this script for PR1.2 or PR 1.3? I have Opera version 12.00.2 running on PR 1.3 and I can't get the Opera Default behavior to work at all. I followed your installation steps, which seemed to work fine. I then went to various hyperlinks on Twitter, Facebook, google.com, etc., and I couldn't get any of them to open Opera all. At first, I tried with Opera closed and then I tried with Opera open and had no luck either way.

Any ideas or suggestions?

AJMAL P.M 2012-07-12 10:25

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Quote:

Originally Posted by Hacker (Post 1236438)
Is this script for PR1.2 or PR 1.3? I have Opera version 12.00.2 running on PR 1.3 and I can't get the Opera Default behavior to work at all. I followed your installation steps, which seemed to work fine. I then went to various hyperlinks on Twitter, Facebook, google.com, etc., and I couldn't get any of them to open Opera all. At first, I tried with Opera closed and then I tried with Opera open and had no luck either way.

Any ideas or suggestions?

Oops ! Looks like problems in PR1.3. Could you pls give these files

Code:

/usr/share/applications/defaults.list
Code:

/usr/share/applications/operamobile-labs.desktop
Code:

/home/user/.local/share/applications/defaults.list

AJMAL P.M 2012-07-12 10:33

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Anyone else having problem in PR1.3?

eccenux 2012-07-12 17:37

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
It would probably work but It actually is a bad idea to overwrite files like that. Especially those in /usr/share/applications

There is a better and update insensitive way.
Step 1. Go to /home/user/.local/share/applications

Step 2. Create operamobile-labs-open.desktop:
Code:

[Desktop Entry]
Version=0.1
Encoding=UTF-8
Name=Opera-opener
Type=Application
Exec=/opt/operamobile-labs/operamobile %U
Icon=/usr/share/icons/hicolor/80x80/apps/operamobile-labs.png

Step 3. Open defaults.list (the one in /home/user/.local/share/applications) and at the end add:
Code:

x-maemo-urischeme/http=operamobile-labs-open.desktop
x-maemo-urischeme/ftp=operamobile-labs-open.desktop
x-maemo-urischeme/https=operamobile-labs-open.desktop
x-maemo-urischeme/file=operamobile-labs-open.desktop
x-maemo-highlight/http-url=operamobile-labs-open.desktop
x-maemo-highlight/ftp-url=operamobile-labs-open.desktop
text/html=operamobile-labs-open.desktop

Note that since you created a desktop file you created a link on your application screen. You can simply hide it in some folder.

eccenux 2012-07-12 17:52

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
BTW. There is also a hack to hide unwanted links.

First you open:
/home/user/.config/meegotouchhome-nokia/launcherbuttons.data

Then you search for the link you want to hide e.g.:
/home/user/.local/share/applications/operamobile-labs-open.desktop

The line will look something like:
/home/user/.local/share/applications/operamobile-labs-open.desktop=launcher/0/84
You then change "launcher" to e.g "hide" and in this case you get:
/home/user/.local/share/applications/operamobile-labs-open.desktop=hide/0/84

Now you can restart your phone and your done.

Hacker 2012-07-12 21:53

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Woot! Opera is now my default browser--everything is working superfast now.

This forum rocks!

ladoga 2012-07-13 05:56

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Quote:

Originally Posted by eccenux (Post 1236656)
Note that since you created a desktop file you created a link on your application screen. You can simply hide it in some folder.

I think you can add
Code:

NotShowIn=X-MeeGo;
to .desktop file to disable icon.

AJMAL P.M 2012-07-14 10:59

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Quote:

Originally Posted by ladoga (Post 1236876)
I think you can add
Code:

NotShowIn=X-MeeGo;
to .desktop file to disable icon.

Yes, adding that line to created .desktop file in /home/user/.local/share/applications/will hide opera icon. Simplest method.

AJMAL P.M 2012-07-14 11:06

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
And sorry for a silly fault. There was a '>' in the desktop file code posted in the first post. Typing mistake. Corrected it eventhough the best method is said by eccenux

Schturman 2012-07-14 13:05

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Need to be rebooted at the end of process ?

AJMAL P.M 2012-07-14 13:24

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Works without reboot.

Schturman 2012-07-14 13:55

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Ok, thanks.
I added updated method to the N9QT..

Iryus 2012-07-15 01:18

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
NIce job man, thank you :)

wout.martens 2012-07-17 21:08

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
can you open new links in tabs rather than opening multiple windows?

Garrett_PL 2012-07-19 21:26

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Quote:

Originally Posted by AJMAL P.M (Post 1236503)
Anyone else having problem in PR1.3?

Work's like charm for me (on PR 1.3). Damn, why did I waste so many hours strugling with stock or Nightly browser on N9 when Opera is just amazing to work with. When loaded as default, it's just squizing tears of joy out of me:D

xMaki 2013-07-24 18:27

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Hello. I've followed instructions of the updated method (those who don't want to code) but now links wont open in any browser. Can anyone help me?

AJMAL P.M 2013-07-25 02:34

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
1 Attachment(s)
Quote:

Originally Posted by xMaki (Post 1361809)
Hello. I've followed instructions of the updated method (those who don't want to code) but now links wont open in any browser. Can anyone help me?

Extremely sorry for not updating the thread. Since the last Opera update you don't need this thread anymore. By default opera now opens extrnal links in multiple tabs and you can also set opera as default browser from Settings » Applications » Web » Default Browser

For your current issue please

1) Delete the defaults.list and operamobile-labs-default.desktop you recently placed in /home/user/.local/share/applications/ using any file manager.

2) Then place below uploaded defaults.list file there.

xMaki 2013-07-25 08:11

Re: OPERA HACK: Set as default browser + Open multiple windows!!!
 
Quote:

Originally Posted by AJMAL P.M (Post 1361900)
Extremely sorry for not updating the thread. Since the last Opera update you don't need this thread anymore. By default opera now opens extrnal links in multiple tabs and you can also set opera as default browser from Settings » Applications » Web » Default Browser

For your current issue please

1) Delete the defaults.list and operamobile-labs-default.desktop you recently placed in /home/user/.local/share/applications/ using any file manager.

2) Then place below uploaded defaults.list file there.

It works now. Thanks.


All times are GMT. The time now is 15:09.

vBulletin® Version 3.8.8