maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Browser Switchboard - use any browser as the default (https://talk.maemo.org/showthread.php?t=38273)

jlacombe 2010-02-07 01:27

Re: Browser Switchboard - use any browser as the default
 
Quote:

Originally Posted by steven676 (Post 511639)
Firstly, did you restart your device after installing Browser Switchboard? If not, try that before doing anything else.

If restarting doesn't help, then try the following:
  1. Upgrade to Browser Switchboard 3.1-2fremantle1. (This shouldn't solve your problem, but it will make finding the problem easier.)
  2. Open an X Terminal, then type the following, pressing Enter after each line (the $ is a prompt that will be displayed to you, not something you type):
    Code:

    $ killall browser-switchboard
    $ browser-switchboard

    You should get output that looks something like this:
    Code:

    continuous_mode: 0
    default_browser: 'fennec'
    other_browser_cmd: 'NULL'
    Starting main loop

  3. Try to open one of your home screen bookmarks.
  4. Assuming it doesn't work, copy all of the stuff Browser Switchboard writes to the xterm and post it here so that I can have a look at it.

I certainly appreciate your help. Here is what I get after I follow your instructions....

continuous_mode: 1
default_browser: 'fennec'
other_browser_cmd: 'NULL'
Couldn't acquire name com.nokia.osso_browser

JL

steven676 2010-02-07 02:17

Re: Browser Switchboard - use any browser as the default
 
Quote:

Originally Posted by jlacombe (Post 513842)
I certainly appreciate your help. Here is what I get after I follow your instructions....

continuous_mode: 1
default_browser: 'fennec'
other_browser_cmd: 'NULL'
Couldn't acquire name com.nokia.osso_browser

JL

Hm. What does running "ps -ef | grep browser" in the terminal show?

kansei 2010-02-07 03:55

Re: Browser Switchboard - use any browser as the default
 
Quote:

Originally Posted by luca (Post 513242)
I can't thank you enough for browser-switchboard, but at the same time I cannot forget that on a sane platform all this contortions shouldn't be necessary.

On a sane computer platform, sure. Relative to most mobile platforms, this is a wonderful solution. On some mobile platforms you aren't even allowed to have an alternative browser :confused::eek:.

I don't think I need to mention the platform/company I'm referring to above. On the bright side, I know webOS has all the hooks in place and even some UI elements to select default applications for tasks, and yeah it's a lot cleaner than what we deal with on Maemo but that's because it came from Palm changing the OS not third party devs writing a solution that works within the confines of the OS. Perhaps with more people using Firefox now that it's "official", Nokia will add this functionality in in an upcoming update.

Either way, hanks for all your hard work steven676! Your app was the second installed on my N900 (after firefox of course).

jukey 2010-02-08 14:33

Re: Browser Switchboard - use any browser as the default
 
Hi Steven,

I was following your instruction with these notices:
Quote:

Originally Posted by steven676 (Post 513074)
Hopefully the following should now work 100% of the time:
1. Configure Browser Switchboard with any default browser other than MicroB.
2. Restart the device.
3. Open a link from an application or a desktop widget; the link should open in the default browser you configured.
4. Open MicroB by using the Web menu entry (you don't need to change the default browser setting or restart the device).

Everything works as you described until here. I registered that at this point are always The bookmark window and a blank page is opened.

Quote:

5. Open a link from an application or a desktop widget; the link should open in MicroB.
Thias also works fine
Quote:

6. Close all the MicroB browser windows.
7. Open a link from an application or a desktop widget; the link should open in the default browser you configured.
Here seems to be a bug. Always microb opens the link. Also if I close all microb windows before using the desktop bookmark link.
Quote:

8. Open MicroB by using the Web menu entry (it should come up).
This works well and this time only the initial bookmark page is shown. No empty page as seen after step 4.

I repeated the produce step by step after "killall browser-switchboard; browser-switchboard" but without a complete restart of the device. This time after step 4 again only the initial bookmark page is shown. No empty page.

This is the output:
Code:

~ $ killall browser-switchboard
~ $ browser-switchboard       
continuous_mode: 1
default_browser: 'fennec'
other_browser_cmd: 'NULL'
Starting main loop
open_address 'http://maemo.org/packages/repository/qa/fremantle_extras-testing/'
launch_other_browser with uri 'http://maemo.org/packages/repository/qa/fremantle_extras-testing/'
command: 'fennec 'http://maemo.org/packages/repository/qa/fremantle_extras-testing/''
Waited for a zombie
launch_microb with uri 'new_window'
Waiting for MicroB to start
Checking to see if MicroB is ready
Message has only 0 arguments, but more were expected

HTH, thanks, Uwe

steven676 2010-02-09 08:45

Re: Browser Switchboard - use any browser as the default
 
Quote:

Originally Posted by jukey (Post 516288)
I repeated the produce step by step after "killall browser-switchboard; browser-switchboard" but without a complete restart of the device. This time after step 4 again only the initial bookmark page is shown. No empty page.

This is the output:
Code:

~ $ killall browser-switchboard
~ $ browser-switchboard       
continuous_mode: 1
default_browser: 'fennec'
other_browser_cmd: 'NULL'
Starting main loop
open_address 'http://maemo.org/packages/repository/qa/fremantle_extras-testing/'
launch_other_browser with uri 'http://maemo.org/packages/repository/qa/fremantle_extras-testing/'
command: 'fennec 'http://maemo.org/packages/repository/qa/fremantle_extras-testing/''
Waited for a zombie
launch_microb with uri 'new_window'
Waiting for MicroB to start
Checking to see if MicroB is ready
Message has only 0 arguments, but more were expected


Okay, I'm not 100% sure I understand what happened here, but I am pretty sure it starts from a state which Browser Switchboard shouldn't end up in (MicroB running, but not handling com.nokia.osso_browser). Can you please try this again with a freshly restarted device?

jukey 2010-02-10 18:19

Re: Browser Switchboard - use any browser as the default
 
Quote:

Originally Posted by steven676 (Post 517387)
Okay, I'm not 100% sure I understand what happened here, but I am pretty sure it starts from a state which Browser Switchboard shouldn't end up in (MicroB running, but not handling com.nokia.osso_browser). Can you please try this again with a freshly restarted device?

I did step 1 to 7 again. The resault of step 7. was that microb opened again.:
Quote:

  1. Configure Browser Switchboard with any default browser other than MicroB.
  2. Restart the device.
  3. Open a link from an application or a desktop widget; the link should open in the default browser you configured.
  4. Open MicroB by using the Web menu entry (you don't need to change the default browser setting or restart the device).
  5. Open a link from an application or a desktop widget; the link should open in MicroB.
  6. Close all the MicroB browser windows.
  7. Open a link from an application or a desktop widget; the link should open in the default browser you configured.
  8. Open MicroB by using the Web menu entry (it should come up).

After restarting the device (between step 2. and 3.) I started the xterm stuff you will see here (includes step 1. to 7.):
Code:

~ $ killall browser-switchboard
killall: browser-switchboard: no process killed
~ $ browser-switchboard
continuous_mode: 1
default_browser: 'fennec'
other_browser_cmd: 'NULL'
Starting main loop
open_address 'https://bugs.maemo.org/index.cgi?GoAheadAndLogIn=1'
launch_other_browser with uri 'https://bugs.maemo.org/index.cgi?GoAheadAndLogIn=1'
command: 'fennec 'https://bugs.maemo.org/index.cgi?GoAheadAndLogIn=1''
launch_microb with uri 'new_window'
Waiting for MicroB to start
Checking to see if MicroB is ready
Message has only 0 arguments, but more were expected
Checking to see if MicroB is ready
MicroB ready

Please notice:
  • I don't closed fennec after step 3.
  • I don't closed microb after step 4.

The problem seems to be that you are not killing the microb browserdeamon after the last microb window is closed. Is a system message (don't know the correct word for that) sent if the last browser windwo closed?
If not that was the reason for me to ask you to change the "internet" shortcut to the default browser to avoid having more than one different browser running at the same time in memory.

What is the next step I can do to help you? :)

steven676 2010-02-11 12:14

Re: Browser Switchboard - use any browser as the default
 
If steps 1-8 outlined in my previous post actually work correctly 100% of the time for anyone on Fremantle, could you please speak up with your firmware version? (Failure reports would be appreciated as well, but success reports would be more puzzling.)

Quote:

Originally Posted by jukey (Post 519860)
The problem seems to be that you are not killing the microb browserdeamon after the last microb window is closed.

Bingo. What we're supposed to see after "MicroB ready" is this:

Code:

Checking to see if we should kill MicroB
Checking to see if we should kill MicroB
Closing MicroB

(which has been observed at least once in the wild -- which makes this report rather troubling).

Quote:

Originally Posted by jukey (Post 519860)
Is a system message (don't know the correct word for that) sent if the last browser windwo closed?

Is any documented signal sent when the last window closes? Not that I know of. I'm relying on behavior gleaned from tracing MicroB in the SDK to determine when the last browser window closes. Clearly, at least in your case, that behavior is not happening.

Quote:

Originally Posted by jukey (Post 519860)
What is the next step I can do to help you? :)

Can you repeat steps 1 to 6, and this time, find the PIDs for browserd ("ps -ef | grep browserd") before step 4, after step 4, and after step 6? (In the SDK, there are two browserds after step 4, and one of them closes and is replaced after step 6; it's this change that I have several ways of looking for. If this isn't happening consistently on the device, we're back to square 1 ...)

jukey 2010-02-11 16:28

Re: Browser Switchboard - use any browser as the default
 
Quote:

Originally Posted by steven676 (Post 521047)
If steps 1-8 outlined in my previous post actually work correctly 100% of the time for anyone on Fremantle, could you please speak up with your firmware version? (Failure reports would be appreciated as well, but success reports would be more puzzling.)



Bingo. What we're supposed to see after "MicroB ready" is this:

Code:

Checking to see if we should kill MicroB
Checking to see if we should kill MicroB
Closing MicroB

(which has been observed at least once in the wild -- which makes this report rather troubling).



Is any documented signal sent when the last window closes? Not that I know of. I'm relying on behavior gleaned from tracing MicroB in the SDK to determine when the last browser window closes. Clearly, at least in your case, that behavior is not happening.



Can you repeat steps 1 to 6, and this time, find the PIDs for browserd ("ps -ef | grep browserd") before step 4

Code:

~ $ ps -ef |grep browserd

 1205 user    40232 S    /usr/sbin/browserd -d
 1616 user    60128 S    /usr/sbin/browserd -s 1616 -n RTComMessagingServer
 1692 user      2092 S    grep browserd

Quote:

, after step 4,
Code:

~ $ ps -ef |grep browserd
 1205 user    40232 S    /usr/sbin/browserd -d
 1616 user    60128 S    /usr/sbin/browserd -s 1616 -n RTComMessagingServer
 1706 user    81260 S    /usr/sbin/browserd -s 1706 -n browserui
 1723 user      2092 S    grep browserd

Quote:

and after step 6?
Code:

~ $ ps -ef |grep browserd
 1205 user    40232 S    /usr/sbin/browserd -d
 1616 user    60128 S    /usr/sbin/browserd -s 1616 -n RTComMessagingServer
 1737 user    55720 S    /usr/sbin/browserd -s 1737 -n browserui
 1743 user      2092 S    grep browserd

Quote:

(In the SDK, there are two browserds after step 4, and one of them closes and is replaced after step 6; it's this change that I have several ways of looking for. If this isn't happening consistently on the device, we're back to square 1 ...)
Sounds like the SDK does the same as the device itself? Or did I misunderstand "one of them closes and is replaced after step 6"?

Ciao jukey

steven676 2010-02-12 01:03

Re: Browser Switchboard - use any browser as the default
 
Quote:

Originally Posted by jukey (Post 521391)
Sounds like the SDK does the same as the device itself? Or did I misunderstand "one of them closes and is replaced after step 6"?

At least in this respect, yes. I'll have a 3.1-2fremantle3 out soon with another method of detecting this browserd close-and-restart (which hopefully works consistently on the device, not just the SDK).

steven676 2010-02-14 07:56

Re: Browser Switchboard - use any browser as the default
 
A little bit later than I hoped, but source is now available on Garage for Browser Switchboard 3.1-2fremantle3; autobuilder issues appear to be holding up the building of packages for Fremantle.

The "only" change in this release is a change in how we detect when the last open MicroB window closes (summary: instead of looking for a D-Bus signal that turns out to also be emitted by the IM/SMS application, trace the browserd process as strace or gdb would do). For all the gory details, see the commit message and patch in Git.


All times are GMT. The time now is 11:44.

vBulletin® Version 3.8.8