<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
On 2011-07-15 06:34, Atsuhito Kohda wrote:
<blockquote
cite="mid:20110715.133422.338256451.kohda@pm.tokushima-u.ac.jp"
type="cite">
<pre wrap="">recently TeXworks provides nice manual and we can see
it from menu with a browser.
But, strangely, on one of my Debian system it calls
/opt/google/chrome/google-chrome as a browser and,
because there is no such browser on my system, it fails
to show me a manual. (On another system, it works fine.)
I investigated various methods to define a default browser,
like x-www-browser, gconf-editor etc. but no success.
I'd like to know how TeXworks selects a default browser
for manual and if we can define it at compile time.
</pre>
</blockquote>
<br>
TeXworks uses QDesktopServices::openUrl (src/TWApp.cpp@305),
documented at
<a class="moz-txt-link-freetext" href="http://doc.trolltech.com/latest/qdesktopservices.html#openUrl">http://doc.trolltech.com/latest/qdesktopservices.html#openUrl</a><br>
That resource just states "Opens the given <i>url</i> in the
appropriate Web browser for the user's desktop environment".<br>
<br>
Digging into the Qt source code (Qt 4.7.2,
src/util/gui/qdesktopservices_x11.cpp) suggests the following things
are tried:<br>
1) `xdg-open`<br>
2) `gnome-open` or `kfmclient exec` (depending on desktop
environment)<br>
3) firefox<br>
4) mozilla<br>
5) netscape<br>
6) opera<br>
<br>
(note that this applies to local files (<a class="moz-txt-link-freetext" href="file://">file://</a> protocol). For
others, the DEFAULT_BROWSER and BROWSER environment variable are
tried between attempts 1) and 2).<br>
<br>
So, you probably know better how to configure these tools than I do,
but it should get you started in the right direction :).<br>
<br>
HTH<br>
Stefan<br>
</body>
</html>