maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [Solved] starting microb browser without the bookmarks window (https://talk.maemo.org/showthread.php?t=87977)

Wikiwide 2012-11-23 19:08

Re: starting microb browser without the bookmarks window
 
Quote:

Originally Posted by impeham (Post 1297611)
i don't understand what you're saying - can you give a command example?

In X-Terminal, code:
Code:

browser --view=tab --url="about:mozilla"
will open MicroB with webpage "about:mozilla" loaded. All pages are in tabs within one window.
The screenshot was with:
Code:

browser --view=box --url="about:mozilla"
It's an easier way to to make it open the microb browser with the URL you wish to see, and without the separate bookmarks window opening.

There is also an old discussion, but its dbus command didn't quite work for me.

Also, changing "browser.startup.homepage" in "about:config" seemed to have no effect. Maybe, after restart?

Best wishes...

peterleinchen 2012-11-23 19:43

Re: starting microb browser without the bookmarks window
 
@wikiwide
on which system with which version are you running your --view=box or --view=tab options?

On mine N900 with kp50 and microb-engine 20100401-1.9.2-5.2+0m5 they do not work.

But -and only using- the option --url="site_address" works fine.

laasonen 2012-11-23 19:50

Re: starting microb browser without the bookmarks window
 
Quote:

Originally Posted by reinob (Post 1297483)
I tried killing a single browser window with wmctrl -i -c <window id> but it closed all browser windows.

In that case I'm starting to run out of ideas, but you could try to use xdotool to bring the bookmark window on foreground and click alt+f4.

Code:

ID=`xdotool search --name "Web"`
xdotool windowactivate --sync $ID key --clearmodifiers --delay 100 alt+F4

I'm hoping that works, but I'm not sure, because I can't test. There are three things what might need modification:
  1. Search method/application's name
  2. Time given for the X server to bring the window to foreground
  3. Closing method? Does alt+F4 work? Do we need to use cursor instead?

impeham 2012-11-23 20:22

Re: starting microb browser without the bookmarks window
 
Quote:

Originally Posted by Wikiwide (Post 1297637)
In X-Terminal, code:
Code:

browser --view=tab --url="about:mozilla"
will open MicroB with webpage "about:mozilla" loaded. All pages are in tabs within one window.
The screenshot was with:
Code:

browser --view=box --url="about:mozilla"
It's an easier way to to make it open the microb browser with the URL you wish to see, and without the separate bookmarks window opening.

There is also an old discussion, but its dbus command didn't quite work for me.

Also, changing "browser.startup.homepage" in "about:config" seemed to have no effect. Maybe, after restart?

Best wishes...

for me it starts the default browser - opera - how do i use this specifically for microb?

Wikiwide 2012-11-23 20:43

Re: starting microb browser without the bookmarks window
 
Quote:

Originally Posted by impeham (Post 1297658)
for me it starts the default browser - opera - how do i use this specifically for microb?

Hmf... I don't even know how to change on Maemo 5 which browser is default...
Maemo 5: 21.2011.38 (CSSU Testing)
Ah, code to start normal window with needed URL without seeing bookmarks window (probably doesn't work when MicroB isn't default browser, though):
Code:

/usr/bin/browser_dbuscmd.sh load_url about:mozilla
Actual D-Bus command can be found inside "/usr/bin/browser_dbuscmd.sh", which belongs to package "microb-eal".
Best wishes.

Quote:

Originally Posted by peterleinchen (Post 1297648)
@wikiwide
on which system with which version are you running your --view=box or --view=tab options?

On mine N900 with kp50 and microb-engine 20100401-1.9.2-5.2+0m5 they do not work.

But -and only using- the option --url="site_address" works fine.

What does "browser --help" say? Because my "microb-engine" seems to have exactly the same version, and I have seen these command-line options working before CSSU version of Maemo was installed.
__________________
Per aspera ad astra...

peterleinchen 2012-11-23 21:35

Re: starting microb browser without the bookmarks window
 
@wikiwide
browser --help
just opens the bookmark window without leaving any message in x-term.

Defining default browser on Maemo is easily done via package 'browser-switchboard'.

If your commands would work it would be smth like
microb --url="about:mozilla"
(but this also opens the bookmark window)

Wikiwide 2012-11-23 22:00

Re: starting microb browser without the bookmarks window
 
Quote:

Originally Posted by peterleinchen (Post 1297687)
@wikiwide
(but this also opens the bookmark window)

What about, in X-Terminal?
Code:

dbus-send --system --type=method_call --dest="com.nokia.osso_browser" --print-reply /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"about:mozilla"
Best wishes.

peterleinchen 2012-11-23 22:38

Re: starting microb browser without the bookmarks window
 
Yep, this (of course) works.
But it opens Opera when Opera is the default browser, so not what the OP is asking for ...

laasonen 2012-11-24 13:52

Re: starting microb browser without the bookmarks window
 
I took a fast look at browser-switchboard's source code and it looks like it replaces microb's dbus service and uses maemo-invoker to open microb when needed.

Something like this might work, if you are lucky:
Code:

/usr/bin/maemo-invoker browser
wmctrl -c Web
/usr/bin/maemo-invoker browser --url http://google.fi

Sure way would be to:
  1. Replace browser-switchboard's dbus-service with microb's dbus service
  2. Close all microb windows, if bookmark window opens
  3. Open webpage via dbus
  4. Replace microb's dbus-service with browser-switchboard's dbus service

impeham 2012-11-25 08:46

Re: starting microb browser without the bookmarks window
 
Quote:

Originally Posted by laasonen (Post 1297878)
I took a fast look at browser-switchboard's source code and it looks like it replaces microb's dbus service and uses maemo-invoker to open microb when needed.

Something like this might work, if you are lucky:
Code:

/usr/bin/maemo-invoker browser
wmctrl -c Web
/usr/bin/maemo-invoker browser --url http://google.fi

Sure way would be to:
  1. Replace browser-switchboard's dbus-service with microb's dbus service
  2. Close all microb windows, if bookmark window opens
  3. Open webpage via dbus
  4. Replace microb's dbus-service with browser-switchboard's dbus service

Interesting idea - i'll try it thanks :)


All times are GMT. The time now is 00:21.

vBulletin® Version 3.8.8