Changing default browser working with Mongoose binary

144 views
Skip to first unread message

joefulls

unread,
Jan 3, 2016, 11:22:47 AM1/3/16
to mongoose-users
Hi everybody, 

Is there anyway to force the mongoose web server to run using a specific browser like (IE, Chrome, etc.)? 

I looks like mongoose fires the default browser used in the local PC. Is there any way to let it fire anything else than the default browser?

My case scenario: using mongoose to start and index.html file.

Any help is highly appreciated.

Thank you

Sergey Lyubka

unread,
Jan 3, 2016, 11:25:27 AM1/3/16
to mongoose-users
If you put your index.html in the document root, it'll be opened.

--
You received this message because you are subscribed to the Google Groups "mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-user...@googlegroups.com.
To post to this group, send email to mongoos...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

joefulls

unread,
Jan 3, 2016, 11:35:14 AM1/3/16
to mongoose-users
Hi Sergey,

Meanwhile, the index.html file is located in the same directory as the mongoose.exe. Double-clicking the mongoose.exe fires the default browser on my PC (IE in my case) loaded with the current index.html - works fine.

The problem is when I try to run it from another PC, it chooses to run with the other PC's default browser, while I need it to work only with IE.

So I'm looking for a way to tell mongoose: start the index.html using IE (on all PCs), not the default browser (chrome, firefox, etc.).

Any idea?

Thanks a lot

Sergey Lyubka

unread,
Jan 3, 2016, 11:42:41 AM1/3/16
to mongoose-users
Got it.
No, that's not currently possible.
Mongoose binary is hardwired to: ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOW);
ShellExecute command opens the default browser with mongoose URL. 

It would be possible to change "start_browser" option to "on_start_command" where you can specify what to run, by default that would be opening a default browser. That is not in our development plan though. If you're interested in that feature, file an issue against the mongoose github repo.



joefulls

unread,
Jan 4, 2016, 7:38:51 AM1/4/16
to mongoose-users
I think it will be fine adding this feature to a future release, it will more flexibility - something really important for IoT devices.

Meanwhile, I solved the issue by setting up a batch file that first starts the mongoose server (with start_browser = no) and then starts the specified browser (IE in this case) with the appropriate http link.

Please keep up the good work.

Thank you very much,

Georgios Samaritakis

unread,
Apr 12, 2018, 11:48:30 AM4/12/18
to mongoose-users
joefulls could you post your batch file here?
Reply all
Reply to author
Forward
0 new messages