Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Setting a default browser in UNIX/X11 apps UNIX
Just as many of you, I was thrilled to see Quartz-accelerated X11 for OSX. I jumped aboard quickly and started recompiling my favourite apps. Since I don't like any of available Mac newsreaders, I installed my favourite from my Linux days, Pan. I started reading some groups and then I found myself with a problem. How can I manage to open links in my default OSX browser when I click on them?

The answer was simpler than I thought. I just put 'open' (no quotes) as my browser in Pan's preferences. I clicked on the link, and Safari fired up. Amazing.

I guess this should work with any other gtk app with the ability to change the default browser and probably with any other UNIX app with the same ability.

[Editor's note: I haven't tested this one...]
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)

Setting a default browser in UNIX/X11 apps | 7 comments | Create New Account
Click here to return to the 'Setting a default browser in UNIX/X11 apps' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: Glanz on Jan 15, '03 12:06:48PM

You just hit on something very important IMHO! I have never tried to make the liason X11/OSX in this fashion.

[ Reply to This | # ]
In Java apps, too...
Authored by: sharumpe on Jan 15, '03 03:33:24PM

This one is so obvious I had overlooked it for a long while. Thanks for posting this one!

I'm usin Sun's Forte for Java to do most of my Java programming. It needs a browser configured for testing URLs and viewing JavaDocs. This worked great for that purpose.

Mr. Sharumpe

[ Reply to This | # ]
Authored by: bhines on Jan 15, '03 12:11:06PM
There is also a nice replacement for the "open" command, with more features, called "launch". It is available via Fink, or at

[ Reply to This | # ]
Authored by: Glanz on Jan 15, '03 12:35:46PM

Well I'll be.... I wasn't aware of that app. Thanks again!

[ Reply to This | # ]
Works under LyX
Authored by: RikSca on Jan 15, '03 03:09:18PM

I use LyX alot, primiarly for work journalling. Lyx has the capability of viewing the document as a PDF, but always brought up Ghostscript, which is fine. Since both are X11 apps, printing is an issue.

After reading this hint, I changed the PDF viewer to 'open'. Now the PDF comes up in Preview. Which is nice in itself, but also gives me a "print preview" and I can print directly from Preview.

[ Reply to This | # ]
Authored by: liedra on Jan 15, '03 05:35:22PM

This also works in X-Chat (you need to put a ! before it in your prefs (Settings -> URL Handlers) to tell X-Chat to go out to the shell with the command).

- liedra

[ Reply to This | # ]
Setting a default browser in UNIX/X11 apps
Authored by: UnknownPPC on Oct 13, '03 02:43:47PM
I got it to launch safari but not the URL with GTK X-Chat. here is what I put. !open /Applications/ 'openURL(%s)'. Safari launches perfectly but the URL is never retrieved. Any ideas would help.

-Mr. Unknown-

[ Reply to This | # ]