Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-12

Launching URL in Linux

7 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author
to Tony Maro: Anybody have a clue of how to launch a URL (local filesystem or internet) in the default…
Tony Maro wrote 7 lines
Anybody have a clue of how to launch a URL (local filesystem or internet) in the default browser in Linux? I know I could do a shell execute of "mozilla http://whatever.com/" but that will only work if the user has Mozilla. Any ideas?

There is unfortunately no such mechanism. The 'default browser' does not exist on linux.
What you can do is try to detect whether the user runs KDE/Gnome, and run the default browser for these, and if not, let the user decide.

Personally, I would use a 'preferences' dialog to let the user select the browser he/she wants to use, and set some reasonable default.

Michael.

Reply by email

Unknown author
to Michael A. Hess: This is what our discussion on the developers list have been about recently and why we…
Michael A. Hess wrote 27 lines
Tony Maro wrote: > Well I was hoping to use HTML help files and have it just launch the > browser... If you can't get to the help files to find out how to make > help files work that might be a problem ;-) > > Can someone suggest a better way to handle help files without getting > too specific to distro or desktop? This is what our discussion on the developers list have been about recently and why we made that inquery about finding an HTML component for use with the LCL. We want to be able to have an embedded HTML content that can display at least HTML content for use as a help file. It doesn't get cross platform friendly but you can look at using gtkHTML. It would be nice to have an LCL component that wraps around this. You could also consider including Dillo with your application. It is fairly small but should be able to display anything you would want to for a help. You would know it is there and could call it directly. However by including this yourself it sort of gets away from the modularity aspect of Unix. You could also look into wrapping Dillo for use as an LCL component as well. http://dillo.cipsga.org.br/

Looks good. Maybe it can be used as a fallback-browser ?

Michael.

Reply by email

Tony Maro
to Unknown author: There is unfortunately no such mechanism. The 'default browser' does not exist on linux.…

Well I was hoping to use HTML help files and have it just launch the browser... If you can't get to the help files to find out how to make help files work that might be a problem ;-)

Can someone suggest a better way to handle help files without getting too specific to distro or desktop?

Show quoted text 26 lines
On 24 Dec 2002, Tony Maro wrote: > Anybody have a clue of how to launch a URL (local filesystem or > internet) in the default browser in Linux? > > I know I could do a shell execute of "mozilla http://whatever.com/" but > that will only work if the user has Mozilla. > > Any ideas? There is unfortunately no such mechanism. The 'default browser' does not exist on linux. What you can do is try to detect whether the user runs KDE/Gnome, and run the default browser for these, and if not, let the user decide. Personally, I would use a 'preferences' dialog to let the user select the browser he/she wants to use, and set some reasonable default. Michael. _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Michael A. Hess
to Unknown author: There is unfortunately no such mechanism. The 'default browser' does not exist on linux.…
Tony Maro wrote 6 lines
Well I was hoping to use HTML help files and have it just launch the browser... If you can't get to the help files to find out how to make help files work that might be a problem ;-) Can someone suggest a better way to handle help files without getting too specific to distro or desktop?

This is what our discussion on the developers list have been about recently and why we made that inquery about finding an HTML component for use with the LCL. We want to be able to have an embedded HTML content that can display at least HTML content for use as a help file.

It doesn't get cross platform friendly but you can look at using gtkHTML. It would be nice to have an LCL component that wraps around this.

You could also consider including Dillo with your application. It is fairly small but should be able to display anything you would want to for a help. You would know it is there and could call it directly. However by including this yourself it sort of gets away from the modularity aspect of Unix.

You could also look into wrapping Dillo for use as an LCL component as well.

http://dillo.cipsga.org.br/

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com Phone: 570-388-2211 Fax: 570-388-6101

Reply by email

Tony Maro

Anybody have a clue of how to launch a URL (local filesystem or internet) in the default browser in Linux?

I know I could do a shell execute of "mozilla http://whatever.com/" but that will only work if the user has Mozilla.

Any ideas?

Thanks,
Tony

Reply by email

Stefan. Hille
to Tony Maro

Hi

Tony Maro wrote
Anybody have a clue of how to launch a URL (local filesystem or internet) in the default browser in Linux?

What about using metamail?

metamail -c text/html somefile.html

will search the browser. This should work with most dists.

bye,

Stefan

--------------------------------------------------------- Stefan Hille email: 48155 Muenster voice: 0251/664695

Reply by email

Peter Vreman
to Tony Maro: Anybody have a clue of how to launch a URL (local filesystem or internet) in the default…
Show quoted text 11 lines
Hi On Tue, Dec 24, 2002 at 06:32:56PM -0600, Tony Maro wrote: > Anybody have a clue of how to launch a URL (local filesystem or > internet) in the default browser in Linux? What about using metamail? metamail -c text/html somefile.html will search the browser. This should work with most dists.

Debian does not have it installed. In Debian you've a wrapper "sensible-browser" that will take care of launching the browser.

Reply by email