Thread: [GD-Linux] opening a URL in the default browser
Brought to you by:
vexxed72
From: <cas...@ya...> - 2003-09-13 17:44:05
|
Hi, does somebody know if linux provides a generic way of opening an URL using the default browser of the current desktop? Thanks in advance, -- Ignacio Castaño cas...@ya... |
From: Brian H. <ho...@py...> - 2003-09-13 20:33:20
|
I don't believe this is possible, you have to do some convoluted searching for the appropriate browser. I _think_ I've seen some sample source code for this, and I know our own apps supports this. Brian On Sat, 13 Sep 2003 19:53:41 +0200, Ignacio Casta=F1o wrote: > Hi, > > > does somebody know if linux provides a generic way of opening an > URL using the default browser of the current desktop? > > Thanks in advance, |
From: Ryan C. G. <ic...@cl...> - 2003-09-13 23:02:37
|
> I don't believe this is possible, you have to do some convoluted > searching for the appropriate browser. I _think_ I've seen some > sample source code for this, and I know our own apps supports this. Some Unix libraries and applications follow the "BROWSER" environment variable, in the way that "EDITOR" is generally respected as a means to determine the preferred text editor. From python's library reference (since they describe it well enough) ... "Under Unix, if the environment variable BROWSER exists, it is interpreted to override the platform default list of browsers, as a colon-separated list of browsers to try in order. When the value of a list part contains the string %s, then it is interpreted as a literal browser command line to be used with the argument URL substituted for the %s; if the part does not contain %s, it is simply interpreted as the name of the browser to launch." UT2003 does this, but if BROWSER isn't set, we use a default like this: "opera:mozilla:galeon:konqueror:netscape:xterm -e links:xterm -e lynx:"; This is all trial and error, but I tried to organize the defaults in order of what will likely be a preference if it exists on a system at all (i.e. - If opera is installed, it's almost certain the user went out of their way to have it, so try it first. "netscape" generally exists on any modern Linux system if nothing more modern has been added, and "lynx" is a desperate fallback. In more recent times, "galeon" should probably be tried before "mozilla" for the same reason "opera" is at the front of the list.) It's not perfect, but it generally seems to work, and if the user gets a browser they don't prefer by default, they can always set the environment variable to their liking. But there isn't an honest-to-god facility for determining the correct browser. --ryan. |
From: <cas...@ya...> - 2003-09-14 01:20:34
|
Ryan C. Gordon wrote: > Some Unix libraries and applications follow the "BROWSER" environment > variable, in the way that "EDITOR" is generally respected as a means > to determine the preferred text editor. From python's library > reference (since they describe it well enough) ... > > "Under Unix, if the environment variable BROWSER exists, it is > interpreted to override the platform default list of browsers, as a > colon-separated list of browsers to try in order. When the value of a > list part contains the string %s, then it is interpreted as a > literal browser command line to be used with the argument URL > substituted for the %s; if the part does not contain %s, it is simply > interpreted as the name of the browser to launch." Thanks for pointing that out! > UT2003 does this, but if BROWSER isn't set, we use a default like > this: > > "opera:mozilla:galeon:konqueror:netscape:xterm -e links:xterm -e > lynx:"; This is similar to our current approach, but with some additional browsers like FireBird. We also had another idea: use 'which' to get the full path to each executable and obtain its atime, to use the browser that was used the last time. -- Ignacio Castaño cas...@ya... |
From: Ryan C. G. <ic...@cl...> - 2003-09-14 05:12:16
|
> This is similar to our current approach, but with some additional > browsers like FireBird. We also had another idea: use 'which' to get the > full path to each executable and obtain its atime, to use the browser > that was used the last time. Wow...we search the path for BROWSER entries that aren't fully qualified, but checking the atime is hardcore. :) --ryan. |
From: Daniel V. <vo...@ep...> - 2003-11-09 17:14:22
|
Does anyone know of libraries providing functionality a la Microsoft's Speech SDK for Linux and/ or Mac? http://www.microsoft.com/speech/download/sdk51/ I'm interested in both speech recognition and speech synthesis = functionality as we utilize them for the Windows version of UT2004 and wouldn't mind having equivalent features for the Mac/Linux version. -- Daniel, Epic Games Inc. |
From: Phil C. <phi...@te...> - 2003-11-09 17:51:59
|
The Mac used to have something called PlainTalk - don't know if it comes with MacOS X. There seem to be numerous commercial packages that will run on Linux, e.g. IBM ViaVoice. On the open-source front, I just read in IEEE Spectrum that Intel released an audio-visual speech recognition library as open-source. It's on sourceforge in the opencvlibrary project as the openAVSR package. Looks like it'll run on windows and linux (x86, I assume). That's probably more than what you're looking for, but I thought it sounded pretty cool. Got a lot of hits for speech libraries on sourceforge, many of them implemented in Java, e.g. FreeTTS (speech synthesis). CMU Sphinx for speech recognition seems like a possibility. Apache-style license and runs on windows, linux and java. -Phil Daniel Vogel wrote: > Does anyone know of libraries providing functionality a la Microsoft's > Speech SDK for Linux and/ or Mac? > > http://www.microsoft.com/speech/download/sdk51/ > > I'm interested in both speech recognition and speech synthesis functionality > as we utilize them for the Windows version of UT2004 and wouldn't mind > having equivalent features for the Mac/Linux version. > > -- Daniel, Epic Games Inc. > > > > ------------------------------------------------------- > This SF.Net email sponsored by: ApacheCon 2003, > 16-19 November in Las Vegas. Learn firsthand the latest > developments in Apache, PHP, Perl, XML, Java, MySQL, > WebDAV, and more! http://www.apachecon.com/ > _______________________________________________ > Gamedevlists-linux mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-linux > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_idU4 > -- Phil Chu phi...@te... http://www.technicat.com/ |
From: <ma...@ch...> - 2003-11-11 15:12:30
|
On Sun, 9 Nov 2003, Daniel Vogel wrote: > I'm interested in both speech recognition and speech synthesis functionality > as we utilize them for the Windows version of UT2004 and wouldn't mind > having equivalent features for the Mac/Linux version. For synth, festival is often recommended: http://www.cstr.ed.ac.uk/projects/festival/download.html I have no idea about recognition, other than the programs already mentioned in another post. Googling will turn up a number of pages though. Mads -- Mads Bondo Dydensborg. ma...@ch... You know you're a Linux geek when... You find the thought of rebooting after installing a piece of software utterly absurd. - segfault |
From: Bert F. <be...@is...> - 2003-11-11 20:08:47
|
ma...@ch... wrote: > On Sun, 9 Nov 2003, Daniel Vogel wrote: > > >>I'm interested in both speech recognition and speech synthesis functionality >>as we utilize them for the Windows version of UT2004 and wouldn't mind >>having equivalent features for the Mac/Linux version. Mac OS X comes with both speech recognition and generation: http://developer.apple.com/ue/speech/ -- Bert |
From: Brian H. <ho...@py...> - 2004-06-22 02:37:59
|
Can anyone give me a quick summary of the state of ALSA vs. OSS today? It's my understanding that ALSO is considered more modern but that adoption is slower, hence OSS is a bit more reliably available -- but is that still the case, and if it is, is it even relevant for the fraction of Linux users that play games? Thanks, Brian |
From: Timothee B. <tt...@id...> - 2004-06-22 09:29:18
|
Brian Hook wrote: >Can anyone give me a quick summary of the state of ALSA vs. OSS today? > It's my understanding that ALSO is considered more modern but that >adoption is slower, hence OSS is a bit more reliably available -- but >is that still the case, and if it is, is it even relevant for the >fraction of Linux users that play games? > >Thanks, > >Brian > > > I am not a specialist on sound APIs, but most modern distributions come with ALSA. It has become the default API in 2.6 kernels, and is considered the default sound API these days. It provides a backward compatible OSS device emulation, but it's not always enabled at compile time ( and not always working right if you use DMA modes ). Writing directly for ALSA is a better choice I think. TTimo |
From: Jan E. <ch...@in...> - 2004-06-22 10:04:49
|
On Tue, 22 Jun 2004, Timothee Besset wrote: >Brian Hook wrote: > >>Can anyone give me a quick summary of the state of ALSA vs. OSS today? >> It's my understanding that ALSO is considered more modern but that >>adoption is slower, hence OSS is a bit more reliably available -- but >>is that still the case, and if it is, is it even relevant for the >>fraction of Linux users that play games? >> >>Thanks, >> >>Brian >> >> >> >I am not a specialist on sound APIs, but most modern distributions come >with ALSA. It has become the default API in 2.6 kernels, and is >considered the default sound API these days. It provides a backward >compatible OSS device emulation, but it's not always enabled at compile >time ( and not always working right if you use DMA modes ). Writing >directly for ALSA is a better choice I think. My understanding is that OSS still supports some sound cards that ALSA doesn't, so if you have such a card then OSS is the way to go. If on the other hand ALSA support is available then that is the preferred way. For me ALSA has been nice, and the Debian packages makes configuration a non-issue. -- Gravity is a habit that is hard to shake off. -- Terry Pratchett, Small Gods |
From: Ryan C. G. <ic...@cl...> - 2004-06-24 01:08:10
|
>>>Can anyone give me a quick summary of the state of ALSA vs. OSS today? >>>It's my understanding that ALSO is considered more modern but that >>>adoption is slower, hence OSS is a bit more reliably available -- but >>>is that still the case, and if it is, is it even relevant for the >>>fraction of Linux users that play games? 1) You can't count on ALSA being available right now, since there are gaps where OSS provides drivers and ALSA doesn't, and not everyone has upgraded to 2.6 (and won't for quite a while). 2) You can't count on OSS being available, since OSS Compatibility in ALSA might be disabled. 3) There're still wackos using ESD or ARTS. There's really no away around the fact that audio is still a mess on Linux. Best plan is to use either SDL or OpenAL and let that deal with the lowlevel. --ryan. |
From: J C L. <cl...@ka...> - 2003-09-14 02:06:33
|
On Sat, 13 Sep 2003 16:33:21 -0400 Brian Hook <ho...@py...> wrote: > On Sat, 13 Sep 2003 19:53:41 +0200, Ignacio Casta=F1o wrote: >> does somebody know if linux provides a generic way of opening an URL >> using the default browser of the current desktop? > I don't believe this is possible, you have to do some convoluted > searching for the appropriate browser. I _think_ I've seen some > sample source code for this, and I know our own apps supports this. Its actually not directly possible. You can make a number of large assumptions, and thus make an educated guess, but that's about it. If They're running KDE and Konquerer is installed, then it is minimally not an unlikely choice, but has no guarantees. If they are running Gnome, Gnome has a concept of a default handler for HHTP URLs, and the user has set that preference (frequently not the case), and the browser that the preference points to is even installed (may or may not be true, then that is also a fairly reasonable guess. If they're not running either KDE or Gnome then you really have no idea. Just check the process table to see if you can find a browser being used by the current user, and use that. If that fails, just pick the first recognisable thing you find off $PATH. Or you could just ask the user... -- J C Lawrence ---------(*) Satan, oscillate my metallic sonatas. cl...@ka... He lived as a devil, eh? http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live. |
From: J C L. <cl...@ka...> - 2003-09-14 02:02:19
|
On Sat, 13 Sep 2003 19:53:41 +0200 ISO <ISO-8859-1> wrote: > Hi, does somebody know if linux provides a generic way of opening an > URL using the default browser of the current desktop? Umm, who or what says the current user even has a default browser let along a desktop? Both are frequently false. -- J C Lawrence ---------(*) Satan, oscillate my metallic sonatas. cl...@ka... He lived as a devil, eh? http://www.kanga.nu/~claw/ Evil is a name of a foeman, as I live. |