Hello!
I'd like to propose an enhancement for the Firefox's start script. It includes two changes:
1. Give the user the choice which version of Firefox is started, especially on 64-bit architectures. 2. Use alsa-oss to allow Firefox (or its plugins) play sound. AFAIK they use OSS now, which will fail in most cases, because /dev/dsp is almost constantly in use by arts/esd/whatever.
Motivation ========== I lately installed F7 on an AMD64 machine and had some problems with firefox plugins, because most of them don't exist for 64 bit architectures. I decided to use the 32 bit version, but it's not easy to achieve it, because /usr/bin/firefox alwas uses the output of uname -m to choose the version.
And alsa-oss simply because I was sorry either to have a soundless browser or to change scripts.
How to do it ============ I have attached a patch, which will do what I suggested. It uses two environment variables: MOZ_ARCH and MOZ_AOSS.
If MOZ_ARCH is set, it's value is used to determine the firefox version, if it's not set, uname -m is called like before.
Simmilarly MOZ_AOSS could contain the path to the aoss application. If not set, it would default to /usr/bin/aoss. If set to "none", alsa-oss would be ommited completely.
Both variables could be set in /etc/profile.d to provide system wide settings.
What do you think about these enhancements?
On 09/09/2007, Adalbert Prokop adalbert.prokop@gmx.de wrote: [snip]
- Use alsa-oss to allow Firefox (or its plugins) play sound. AFAIK they use OSS now, which will fail in most cases, because /dev/dsp is almost constantly in use by arts/esd/whatever.
Last time I tried, on a 64-bit platform you can not use alsa-oss with 32-bit Firefox. Still nice if you happen to be running at the native wordsize, though.
On recent dmix-capable soundcards, this should not be a problem, no?
Am Montag, 10. September 2007 schrieb Michel Salim:
Hi!
- Use alsa-oss to allow Firefox (or its plugins) play sound. AFAIK
they use OSS now, which will fail in most cases, because /dev/dsp is almost constantly in use by arts/esd/whatever.
Last time I tried, on a 64-bit platform you can not use alsa-oss with 32-bit Firefox. Still nice if you happen to be running at the native wordsize, though.
Hmmm, the only thing I can say for sure is: it works in F7. ;-) I did not thing about it and just tried it. After I've patched the Firefox start script and let it point to /usr/lib/mozilla (not lib64) I simply did
aoss firefox
and it was good enough. I would investigate it deeper, but the problem is: I have no access to this machine any more. It was my friend's laptop.
On Sun, 9 Sep 2007, Michel Salim wrote:
On 09/09/2007, Adalbert Prokop adalbert.prokop@gmx.de wrote: [snip]
- Use alsa-oss to allow Firefox (or its plugins) play sound. AFAIK they use OSS now, which will fail in most cases, because /dev/dsp is almost constantly in use by arts/esd/whatever.
Last time I tried, on a 64-bit platform you can not use alsa-oss with 32-bit Firefox. Still nice if you happen to be running at the native wordsize, though.
Last time you tried might have been before I fixed aoss to allow for that. :-) The aoss script first checks if you have the 64-bit library, and by default uses that. *Unless* you incant it with the first argument of "-32", in which case it'll check if you have the 32-bit library, and if so, use it instead (and error out if not, which may be a bit unhelpful if it's initiated by a GUI). If it doesn't detect a 64-bit alsa-oss-libs, it assumes you have the 32-bit ones (as the package containing the script depends on *one* of them). I committed these changes to alsa-oss on February 8th, FWIW, due to BZ#221711 and Jason Tibbitts' recommendations (via IRC). Apparently I may have broken the aoss man page. The script could probably use a -h flag, too. Not sure if it'd be in bad taste to fix those before F8 without an open bug.
Jima
On 10/09/2007, Jima jima@beer.tclug.org wrote:
On Sun, 9 Sep 2007, Michel Salim wrote:
On 09/09/2007, Adalbert Prokop adalbert.prokop@gmx.de wrote: [snip]
- Use alsa-oss to allow Firefox (or its plugins) play sound. AFAIK they use OSS now, which will fail in most cases, because /dev/dsp is almost constantly in use by arts/esd/whatever.
Last time I tried, on a 64-bit platform you can not use alsa-oss with 32-bit Firefox. Still nice if you happen to be running at the native wordsize, though.
Last time you tried might have been before I fixed aoss to allow for that. :-) The aoss script first checks if you have the 64-bit library, and by default uses that. *Unless* you incant it with the first argument of "-32", in which case it'll check if you have the 32-bit library, and if so, use it instead (and error out if not, which may be a bit unhelpful if it's initiated by a GUI).
Ah! I currently do not have my Fedora laptop with me, so I could not check, and before that, I have been using a dmix-enabled sound device, so my observation was rather out-of-date.
On Mon, 2007-09-10 at 00:09 +0200, Adalbert Prokop wrote:
- Use alsa-oss to allow Firefox (or its plugins) play sound.
I'm curious. Why does everyone suggest using alsa-oss instead of just slaving pcm.!dsp to default?
On Sun, 2007-09-09 at 19:32 -0400, Ignacio Vazquez-Abrams wrote:
On Mon, 2007-09-10 at 00:09 +0200, Adalbert Prokop wrote:
- Use alsa-oss to allow Firefox (or its plugins) play sound.
I'm curious. Why does everyone suggest using alsa-oss instead of just slaving pcm.!dsp to default?
I've never heard of it? :)
Am Montag, 10. September 2007 schrieb Ignacio Vazquez-Abrams:
Hi Ignacio!
- Use alsa-oss to allow Firefox (or its plugins) play sound.
I'm curious. Why does everyone suggest using alsa-oss instead of just slaving pcm.!dsp to default?
I'm curious. What do you mean by slaving pcm.!dsp to default?
For example the flash plugins tries to write to /dev/dsp0 directly. If I don't use aoss, there is little chance I it succeeds, is there?
On Mon, 2007-09-10 at 14:01 +0200, Adalbert Prokop wrote:
Am Montag, 10. September 2007 schrieb Ignacio Vazquez-Abrams:
Hi Ignacio!
- Use alsa-oss to allow Firefox (or its plugins) play sound.
I'm curious. Why does everyone suggest using alsa-oss instead of just slaving pcm.!dsp to default?
I'm curious. What do you mean by slaving pcm.!dsp to default?
My ~/.asoundrc is attached. I'm thinking that you could just slave the channels to default instead of hw:0,0. Feel free to experiment with it.
2007/9/10, Adalbert Prokop adalbert.prokop@gmx.de:
Hello!
I'd like to propose an enhancement for the Firefox's start script. It includes two changes:
- Give the user the choice which version of Firefox is started, especially on 64-bit architectures.
- Use alsa-oss to allow Firefox (or its plugins) play sound. AFAIK they use OSS now, which will fail in most cases, because /dev/dsp is almost constantly in use by arts/esd/whatever.
Motivation
I lately installed F7 on an AMD64 machine and had some problems with firefox plugins, because most of them don't exist for 64 bit architectures. I decided to use the 32 bit version, but it's not easy to achieve it, because /usr/bin/firefox alwas uses the output of uname -m to choose the version.
so the fix is to get the plugins properly working with x86_64? workarounds will only slow down solutions because of the lack of motiviation to properly push fixes instead of working around with hacks.
regards, Rudolf Kastl
And alsa-oss simply because I was sorry either to have a soundless browser or to change scripts.
How to do it
I have attached a patch, which will do what I suggested. It uses two environment variables: MOZ_ARCH and MOZ_AOSS.
If MOZ_ARCH is set, it's value is used to determine the firefox version, if it's not set, uname -m is called like before.
Simmilarly MOZ_AOSS could contain the path to the aoss application. If not set, it would default to /usr/bin/aoss. If set to "none", alsa-oss would be ommited completely.
Both variables could be set in /etc/profile.d to provide system wide settings.
What do you think about these enhancements?
-- Bye, Adalbert
It is said that the lonely eagle flies to the mountain peaks while the lowly ant crawls the ground, but cannot the soul of the ant soar as high as the eagle?
-- fedora-devel-list mailing list fedora-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-devel-list
Am Montag, 10. September 2007 schrieb Rudolf Kastl:
Hi Rudolf!
I lately installed F7 on an AMD64 machine and had some problems with firefox plugins, because most of them don't exist for 64 bit architectures. I decided to use the 32 bit version, but it's not easy to achieve it, because /usr/bin/firefox alwas uses the output of uname -m to choose the version.
so the fix is to get the plugins properly working with x86_64? workarounds will only slow down solutions because of the lack of motiviation to properly push fixes instead of working around with hacks.
Yes, the first part of my proposal is about getting plugins work properly with x86_64.
It is also about increase usability and acceptance of Fedora by the man-in-the-street.
I fully agree that it would the very good if we had native plugins for every achitecture and it would be almost perfect if all of them were open source. Unfortunatelly, this is not the case.
My goal was to improve the linux experience for the ordinary user who is not interested in political decisions. NVidia's and ATI's closed source drivers also come as easy-to-install packages for Fedora.
And Linux Torvalds also does not let the kernel be a weapon in closed/open source wars. His arguments fit quite well here (and I agree with them): open software should be usable for any purpose, as long as it does not violate the license. I believe Linux would already be dead for a long time I it was used "against" closed source. Coexistance is crucial.
What my patch does is just giving the user another option, how he can use a piece of software.
Adalbert Prokop wrote:
Hello!
I'd like to propose an enhancement for the Firefox's start script. It includes two changes:
- Give the user the choice which version of Firefox is started, especially on 64-bit architectures.
You should look into playing with nspluginwrapper.
- Use alsa-oss to allow Firefox (or its plugins) play sound. AFAIK they use OSS now, which will fail in most cases, because /dev/dsp is almost constantly in use by arts/esd/whatever.
I'd rather see Firefox patched to drop it's ESD support in favor of moving to gstreamer/pulseaudio or something of the sort.
Christopher Aillon schrieb am Montag, 10. September 2007:
Hi Christopher!
- Give the user the choice which version of Firefox is started, especially on 64-bit architectures.
You should look into playing with nspluginwrapper.
I already stumbled over this project. :-) The flash and AcrobatReader can be wrapped. But then there is still a big piece missing: Java.
GCC-Java has not matured far enough. Sun does not provide a 64 bit plugin. (I was very astonished about it...) And Blackdown has only Java 1.4.2 which crashed Firefox repeatable when surfing on www.map24.de.
So which options does one have under such cicumstances? :-)
On Tue, 2007-09-11 at 00:27 +0200, Adalbert Prokop wrote:
You should look into playing with nspluginwrapper.
I already stumbled over this project. :-) The flash and AcrobatReader can be wrapped. But then there is still a big piece missing: Java.
GCC-Java has not matured far enough. Sun does not provide a 64 bit plugin. (I was very astonished about it...) And Blackdown has only Java 1.4.2 which crashed Firefox repeatable when surfing on www.map24.de.
So which options does one have under such cicumstances? :-)
# yum --enablerepo=development install java-1.7.0-icedtea-plugin
and report any bugs to http://icedtea.classpath.org/bugzilla/ ! --
Richi Plana
On 2007-09-09, 22:09 GMT, Adalbert Prokop wrote:
- Give the user the choice which version of Firefox is
started, especially on 64-bit architectures.
See https://bugzilla.redhat.com/show_bug.cgi?id=236521 -- if you have something to add to the discussion there (and I doubt it), then add comment to the bugzilla, please.
Thanks,
Matej