[maemo-developers] [maemo-developers] browser launch from shell script

From: Antonio Gomes tonikitoo at gmail.com
Date: Mon Dec 18 19:31:15 EET 2006
tomi,

have you tried

url = "/etc/fstab "

run-standalone.sh /usr/bin/browser --url=$url

?

it works for me with sirocco

On 12/16/06, Tomi Ollila <tomi.ollila at guru.guru-group.fi> wrote:
>
>
> I've been searhing a way to launch browser from shell script, and this
> is the only way I've found (couple of references):
>
> --8<----8<----8<----8<----8<----8<----8<----8<--
> #!/bin/sh
> #open a url passed as $1 (found on maemo-developers ml)
>
> if ! 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:"$1" ; then
>     DISPLAY=:0 run-standalone.sh /usr/bin/browser &>/dev/null &
>     sleep 5
>     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:"$1"
> fi
> --8<----8<----8<----8<----8<----8<----8<----8<--
>
> Is there a better way, or should I just use the following:
>
> --8<----8<----8<----8<----8<----8<----8<----8<--
> #!/bin/sh
>
> send_url ()
> {
>     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:"$1" && exit 0
> }
>
> send_url "$1"
> DISPLAY=:0 run-standalone.sh /usr/bin/browser >/dev/null 2>&1 &
> for _ in 1 2 3 4 5 6 7 8 9; do sleep 1; send_url "$1"; done
> exit 1
> --8<----8<----8<----8<----8<----8<----8<----8<--
>
>
> Tomi
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://maemo.org/mailman/listinfo/maemo-developers
>



-- 
--Antonio Gomes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20061218/4db92f6c/attachment.htm 
More information about the maemo-developers mailing list