Enhancement proposal for Firefox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- 
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?
--- firefox.orig	2007-07-18 07:22:32.000000000 +0200
+++ firefox	2007-08-30 17:37:27.000000000 +0200
@@ -34,9 +34,24 @@
 cmdname=`basename $0`
 
 ##
+## ALSA OSS
+##
+if [ -z "$MOZ_AOSS" ]; then
+	MOZ_AOSS=/usr/bin/aoss
+fi
+
+if [ "$MOZ_AOSS" = none ]; then
+	MOZ_AOSS=
+elif [ ! -x "$MOZ_AOSS" ]; then
+	MOZ_AOSS=$(which aoss 2>/dev/null)
+fi
+
+##
 ## Variables
 ##
-MOZ_ARCH=$(uname -m)
+if [ -z "$MOZ_ARCH" ]; then
+	MOZ_ARCH=$(uname -m)
+fi
 case $MOZ_ARCH in
 	x86_64 | ia64 | s390 )
 		MOZ_LIB_DIR="/usr/lib64"
@@ -197,4 +212,4 @@
   exec $MOZ_CLIENT_PROGRAM $MOZ_CLIENT_PROGRAM_PARAM "openurl($opt)" 2>/dev/null >/dev/null
 fi
 
-exec $MOZ_PROGRAM $MOZARGS ${1+"$@"}
+exec $MOZ_AOSS $MOZ_PROGRAM $MOZARGS ${1+"$@"}
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux