Forums Register Login

Info about all installed browsers on a Linux system

+Pie Number of slices to send: Send
Hi Ranchers,

I need a way to find out what are the various browsers installed on a Linux system.

Can someone please point me out how to accomplish this?

TIA,
Basu.
+Pie Number of slices to send: Send
There's no universal way to do it. You could use the platform's package manager to query for known browser names; this would miss browsers that were not installed by the package manager, and it's distro-specific (rpm, apt, etc)

You could ask the desktop environment; first, of course, you'd have to figure out which one was in place, then query it in an environment-specific way.

Finally, you could search for known executable names -- mozilla, konqueror, etc. If I had to do this, I think I'd do it this way.
+Pie Number of slices to send: Send
depending on exactly what the linux platform is, the package manager might actually be of considerable help. packages often can list what "features" they provide, and some package managers can be asked what packages provide a given "feature". for example, on my Mandrake Linux system, i can do this:

here, the "webclient" feature should be "provided" by every package that can serve as a "web browser" of sorts. but there are several things to note:
  • some of the items make little sense. "kdebase-common", for example. well, that's because the KDE desktop environment has a "file manager" that can double as a web browser... but unless you knew that about KDE, you'd be unlikely to know what that item was about.
  • some of the items aren't what you'd think of as a "web client". wget, for example, just downloads files to your hard disk, it doesn't try to display them at all. is that a "web client"? well, it speaks HTTP, so...
  • it missed my firefox, because that wasn't installed using the package manager.
  • i had to know that "webclient" was the right "feature" to use. not every distribution will necessarily use that name for it.
  • not every distribution will necessarily use a package manager that can do this at all!
  • so, for certain specific cases — for example, if you decide to formally support only one linux distribution — this might be of some use. but in the general case, when you need true platform independence, Ernest's advice is far better; in those cases, you'll just have to search for executable file names. or ask the user which browser to start.
    +Pie Number of slices to send: Send
    Another rough method is apropos:


    This lists unexpected results too, and misses firefox as well as konqueror, who didn't filled the man-pages correctly.
    Shame on them
    [ July 06, 2005: Message edited by: Stefan Wagner ]
    Grow your own food... or this tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 8632 times.
    Similar Threads
    Which Linux to Use
    GWT Debugging Problem
    Problem Accessing SCJP Test Page
    To Mr Michael Ernest
    Images in Debian
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Apr 15, 2024 22:11:56.