Default to launching MicroB if default_browser is unset
[browser-switch] / browser
1 #!/bin/sh
2
3 case "$1" in
4         --url=* )
5                 url="${1#--url=}"
6                 ;;
7         --url )
8                 url="$2"
9                 ;;
10 esac
11
12 if pidof browser > /dev/null 2>&1; then
13         method=open_new_window
14 else
15         method=switchboard_launch_microb
16 fi
17
18 dbus-send --session --type=method_call --print-reply --dest="com.nokia.osso_browser" /com/nokia/osso_browser/request com.nokia.osso_browser.$method string:${url:-"new_window"} > /dev/null 2>&1
19 exit 0