• Welcome to Jose's Read Only Forum 2023.
 

Getting Browser Plugins

Started by Donald Darden, January 29, 2008, 03:48:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Donald Darden

Most people still use Internet Explorer under Windows.  The second most popular web browser is FireFox, which is the first choice for web broswers under Linux.  There are other options, such as Kongueror, as sort of mesh between a PC and a web browser, iceweasel, Opera, and others.

The purpose of web browser plugins is to add features or abilities to the web browser.  Pllugins may allow the browser to play video clips, open PDF documents, and perform other useful tasks.  As it happens, Opera uses both widgets and plugins, and some might think widgets are plugins.  With Opera though, plugin management is found under the Advanced tab.

The focus here is on making sure that you can get the necessary plugins for FireFox, since that is the browser of choice for many people.  There are generally two ways in which this happens.  First, you might visit a web site that works best when a given plugin is used, and the site or FireFox might offer you the chance (and the choice) of plugins to install.  That information will appear on the screen.  This could be the least painful way to add the needed plugins to your PC.  Note that you will probably have to restart FireFox before they take effect - and you understand that means closing any incidence of FireFox and clicking on it to start it again.

So all you have to is figure out which web pages to visit that will require plugins, then maybe you can get all that you need in this manner, right?  Well, maybe not.  I use www.cox.net as my ISP, and while FireFox prompts me for a Flash compatable plugin, and gives me the choice of two, when I get to my regiional page and want to look at the AP news movie clips, I find az problem:  These are .WMV files, and FireFox does not prompt me for a plugin, then fails to access and play them properly.  So I have to do the other thing:  Use a search engine to look for any information related to my problem, and see if any of the advice I find works to fix the problem on my machine.

Ubuntu does not do a lot to make it easy to modify your software using the graphical user interface (GUI).  The idea seems to be, that as a user, you should not have to do administrative things, and that as administrator, you do not have to have access to the GUI (in fact, you cannot log into the GUI as either root or super user),  I know some people that have given up on Ubuntu because of this, but it is not that hard to work around this restriction.

First of all, if you are going to be doing things that might involve a command line interface, you need to know how to start a terminal console session.  Using the Applications tag on the top menu, you can then go to Accessories.Terminal and start one there.  When you get into the Terminal Console, you can enter sudo -s, hit Enter, after which you will usually be asked for your user password.  That will initiate and sustain a super user mode, as long as the terminal console window is kept open.

Your other option for opening a terminal console window would mean enabling more terminals via the Add/Remove...button at the bottom of the Applications list.  You can set the selection to All, or to a specific category, change the choice from installed or supported applications to Third Party or All Open Source applications.  And you can use the search field if you know any part of the name for an application that you are interested in, such as Terminal.  There are several to choose from, and you can have more than one.

Some of the Terminals you add may come up under Applications/System Tools.  It really makes little difference which one you use, but they are somewhat different, and you may come to prefer one over the others.

When you install new applications, they do not always show up on your menu.  You can use Syste,/Preferences/Main Msnu to enable or disable different applications from appearing there at will.  You can do much more in terms of restructuring your menus, but mostly you are interested in making it convenient to run certain applications when you want to.

Back to the problem of not being able to play AP news clips in FireFox, we go looking for something on the topic.  Using Google as our search enging, I phrased the problem with these words:  Ubuntu Firefox wmv. which is the system software, application, and type of file that I am trying to reference. 

Anyway. this was my starting point.  I found a lot of posts, and I changed the words and searched other posts, and I finally sound something that seemed pretty clearcut and straightforward:  http://ubuntuforums.org/showthread.php?t=540412

Now it turns out that there are four elements involved:  First, I needed to install mplayer, which would allow me to play movies.  Second, I would have to install mozilla-mplayer, which is a helper application, or plugin in this case, that would activate mplayer from within Firefox.  Third, I woulld need to acquire the necessary Codecs binaries for mplayer that would enable it to play an wmv file,  And fourth, I needed to make some additions to a config file that would enable it to play news movie clips.  The link worked in three out of four cases on my PC.  The one time it did not work, Firefox instead proposed that it use movie player to play the wmv clip, then installed it for me, then went looking for the right codecs as well.

I have found it much more difficult to get Opera to work properly with plugins,  Which is sort of strange, because Opera points you to different plugins for different files, most of which it associates with mozilla.  It would seem that Opera should look for and access these plugins on its own, but even when I have copied or created links to plugins and put them where Opera should find them, they don't appear to work.

Donald Darden

In my struggles to decide what works best, I've reinstalled Ubuntu on three partitions a number of times, and each time I have struggled with getting Firefox to play back news clips properly..  The methods described in my last post usually work, but not always,  So this time I tried something different, which is to use apt-get remove firefox, and allow it to remove a number of packages, including ubuntu docs.  I then uaws apt-get install firefox, and when I tried to click on a ,WMV file, it gave me the option of opening it with an application of my choice,  I took the default, then chose to have it search for additional codecs,  With these instakked, I then was able to play the .WMV file without problems, so I set that as the default behavour for the future,

I bought a Microsoft USB Headset with mic with a Christmas gift card, and gave it a try yesterday,  Ti works under Windows 2000 and XP without problems, but the software for LifeChat will only install on Windows XP + SP2.  I wanted to see if I could get it to work in Ubuntu, and in a guest OS under VirtualBox,  The results are not all in, but so far I am a bit disappointed.  The volume contol settings appear on the screen when I change them, but they have no effect on the sound.  The headset shows up as a Microsoft LifeChat LX-3000, which is correct, and it gets tones in the headset when I set the system to USB Audio and test it.  But otherwise, I have not yet figured out how to get it to work properly.  It may prove to be something I can't do, but there are a number of posts out there that I have not read yet on the subject.   

Donald Darden

#2
I finally got back to a point of stability with my PC, but the event with having to convert my C: drive to NTFS, reinstall windows there, then reinstall key apps, eventually led to me having to reinstall all three Linux partitions as well.

Oh well.  Practice makes perfect they say.

I found a new method for getting FireFox to play streaming media files, which is a variation on some of the ways I used in the past, and I also got the web headset to work with streaming media as well, at least on two of the Ubuntu partitions.  I am using Ubuntu 7.10 on all three as a starting point.  Eventually I may make some changes, but I've gotten rather fond of Ubuntu, so plan to stick with it for now.  Having three installs is helpful, because I can try different things, or attempt the same thing more than once, which helps my understanding.  I decided to begin a log of my third attempt with FireFox, so that I can capture the process for others to follow if they need to.  That is the purpose of this post.  It will serve that purpose.

Ubuntu 7.10 comes with FireFox installed.  The automatic update process will ensure that you have the latest version of everything.  And the Add/Remove Software option will allow you to add more packages if you want, installing them for you (or removing them if you turn off the check mark associated with installed packages).  But this install of FireFox does not natively support streaming media, which are wmv files.

Instead. FireFox is preconfigured to use totem for processing video, and the support for video formats is not as extensive with totem as found for mplayer.  So we want to replace totem with mplayer.  Then we need to add mozilla-mplayer, which is a plugin that interfaces mplayer to FireFox.  And for the usb headset support, we have to modify mplayer to work with a different output device.  Sounds simple, but getting to the point of knowing what needs to be done and doing it has taken some time.

There are many hacks posted for getting mplayer to work with FireFox.  I actually use an approach the combines several of these methods, and the way I am doing it now seems somewhat better than some earlier attempts I made.  I've done it twice now, so hopefully it will go well as I try to document it this time.

To begin, I use Google and search for ubuntu firefox mplayer.  I could have just used firefox mplayer as I did initially, but the particular posts I want were all targeted at the Ubuntu distriburtion, so I am cutting to the chase.  The following found link gives me the first part of the puzzle:

http://onlyubuntu.blogspot.com/2007/11/install-mplayer-and-multimedia-codecs.html

The name codec is a contraction of the words coder/decoder, and in this context, it is the method required for playing, displaying or creating video/audio files.  There have been many formats created, and each requires its own codec in order to be accessed correctly.  mplayer, which stands for movie player, is able to work with a wide range of codecs and give you access to the corresponding contents of various files.  But firefox requires mozilla-firefox, a plugin, in order to work with mplayer.  And you must not only acquire mplayer and mozilla-mplayer, but make sure you get the necessary codecs as well.  Note that you need to read through and follow the above link all the way to the bottom, or you will miss a couple of essential steps.

One difference that I used was not to use apt-get install mplayer as suggested, although this does work. Instead, I visited the www.mplayer.org site and followed its directions for using apt-get install subversion, then using the instructions provided for subversion to acquire the latest version of mplayer, then downloaded the codecs archive, extracted its contents onto my PC, then created three folders and copied the contents into each of these.  The cp (copy) command supports the ability to create links instead, so you can consolidate your efforts by not having so much duplication on your hard drive.  The decision about what three folders to use are clued in the README link found on the www.mplayer.org web page.

This is the mplayer download page:  http://www.mplayerhq.hu/design7/dload.html.
Use apt-get install subversion in order to add this package to Ubuntu  To issue this command, you must open a terminal console, and the first command you will need to type there is sudo -s to establish the superuser mode,  Thje password requested is for your user account.  Then use the following command line given to get subversion to fetch mplayer for you:

svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Under Places, I picked my home directory, then added two new folders:  Download and Extract.  I set FireFox to download into Download, and when I perform an Extract using the Archive Manager, I put the contents into Extract.  You might choose to do otherwise.  You want to download the file found under MPlayer v1.0rc2 source, picking a suitable HTTP or FTP web site.  The download should then let you open the archive using the Archive Manager.

Creating and modifying the contents of the necessary folders is not permitted to the user, so we again use our superuser mode and the Terminal Console to do what has to be done.  The README link opens a file that parallels instructions found on the download page itself, but with the added information of where the codecs need to be copied to.  It suggests either /usr/local/lib/codecs or the past association of /usr/local/lib/win32.  To be safe, I used mkdir to create three folders named /usr/local/lib/codecs, /usr/local/lib/win32, and /usr/lib/win32.  Then after positioning the superuser inside the extracted folder using cd, I used cp -r * [directory} to copy the contents into each directory in turn (using the above folder names in place of [directory]. I came up with the third directory at some point when I found a problem where someone apparently had left out /local/ for a dependency, and the addition of a third driectory fixed the problem.

Okay, we've got mplayer now, either by apt-get install or by using svn.  We can get mozilla-mplayer as well with apt-get install mozilla-mplayer.  And I am going to assume that you have used apt-get remove totem-mozilla  The order of doing things is not real critical here, and if something doesn't seem to quite work, doing it again doesn't really hurt.

To test Firefox and mplayer together, you need a link that provides streaming media.  When I start Firefox, I can visit www.cox.net, and immediately get informed that I need the Flash Player from Apple.  So I get that along the way.  But www.cox.net wants my zip code, so that it knows what local links to give me.  My zip code is 32506, and it create a cookie to take me to my local events web page in the future, then takes me there.  Then under my News tab, I have Local, National, and AP Video News.  Others may look for a BBC or other News Video website.

If you have not installed mplayer and mozilla-mplayer, then clicking on a video link will probably leave you hung at a black screen.  Totem doesn't handle the wmv file that follows.  However, it should all work after you use apt-get install mplayer mozilla-mplayer and also get the necessary codecs.

Getting the usb headest to work was a bit trickier.  First, use the System?Preferences/Sound link to change that Autodetect defai;t to USB Audio and test to make sure you can hear the tone through the headset.  Autodetect always goes for the first device, at zero (0), and that is usually the installed soundcard or integrated soundchip.  The usb headset is more likely to be device 1 through 7, depending upon how many sound devices you have installed.  To find out, you can use ls /dev/dsp* and see how many devices are identified.  The next question is which one is your usb headset.  One way to find out is to pump something through the device and see what you hear.  For example, you could enter cat /bin/bash >> /dev/disp1, and see if you hear wierd sounds or noise through the headset.

Once you know which device represents the usb headset, and have also set up your sound controls to use the correct alsa mixer for your headset, you need to tell mplayer specifically to use this as your audio output device.  The general format for this is mplayer -ao alsa:device=hw=1.  As I understand this, you are telling mplayer to use alsa and the device (hardware controller) device 1 (/dev/dsp1) for the audio output.

Your other settings should have also identified the same alsa mixer for your usb headset.  But it probably still does not work.  So there seems to be one more step to take.  You use the command asoundconf list to see how the results of your other efforts, and this will show your built-in soundchip or card as device 0, and the next device (if you only have two) may just say default.  In fact any device flagged as default at this point is likely your usb headset.  But you still do not have any sound.  So try asoundconf --help,  One of the options listed will be set-default-card and another will be reset-default-card.  The first takes a parameter, which turns out to be the name of the device to use.  But your device is not listed by name, but rather listed as default.  It turns out, you can use asoundconf -set-default-card default, and it will activate the default.  The mistake was thinking the default was already active.

But there is one other factor I had to try before I got it to work on my PC.  In reading though the many options for mplayer (use info mplayer, man mplayer, mplayer --help, or look for a user guide online) I noted that there was yet another option that I had to try, which was to add the switch -softvol when calling mplayer.  So I used mplayer -ao alsa:device=hw=1 -softvol, and my usb headset began working with mplayer.

And it just worked for me again.  I now have streaming media with sound coming through my usb headset for the third time, and I now consider this matter resolved.

Donald Darden

There are many plugins to add functionality and further integration for the FireFox web browser.  The use of mplayer is but one example.  If you look at the Add and Remove Software option that you find under Applications on Ubuntu, you will not a number of addins listed that are specific to FireFox.  But you are not necessarily limited to the ones listed there.  You can find further discussion and mention of plugins at several web sites:

http://plugindoc.mozdev.org/faqs/firefox-linux.html

http://plugindoc.mozdev.org/linux.html

http://www.yolinux.com/TUTORIALS/LinuxTutorialMozillaConfiguration.html

https://addons.mozilla.org/en-US/firefox/browse/type:7

http://www.linux.com/articles/44131

http://arstechnica.com/articles/columns/linux/linux-20050907.ars

http://www.cyberciti.biz/tips/linux-flash-java-realplayer-under-64bit-firefox.html