My thoughts on Slackware, life and everything

Tag: firefox (Page 1 of 2)

Pale Moon update fixes high CPU usage for HD video playback

Some people had reported choppy playback and/or a high CPU load when using the 27.4.0 release of the Pale Moon browser – for instance when playing HD videos on Youtube. See these topic posts on the LQ Slackware forum. A bugfix update of Pale Moon was released a few days ago and according to the releasenotes, the new Pale Moon 27.4.1 addresses these issues. I have uploaded fresh packages for palemoon-27.4.1 to my package repository so that you can check that this is true.

Remember to install ffmpeg if you are running Slackware 14.2. A ffmpeg package was added to slackware-current but you still might want to replace that package with my enhanced build of it. And if you are using Slackware’s KDE 4 you must replace Slackware’s oxygen-gtk2 package with my updated version of oxygen-gtk2 to prevent browser crashes.
This is what Youtube reports about the media capabilities of Pale Moon 27.4 on Slackware:

 

If your Pale Moon browser shows that “MSE & WebM VP9” is not supported, you need to go into the browser preferences menu and in the “Content” tab, un-check the “Use MSE asynchronously” so that you can check “Enable MSE for WebM video”:

NOTE: let me know and do not bother the Pale Moon developers with any issues you encounter while using my Slackware package instead of the official binaries.

Update to Flash Player plugs vulnerabilities

Adobe issued a security bulletin for their Adobe Flash Player. On APSB13-04 two CVE’s are mentioned – CVE-2013-0633 and CVE-2013-0634. Of those two, CVE-2013-0634 is the vulnerability which affects Linux users, because it is being exploited “in the wild” in attacks delivered via malicious Flash (SWF) content hosted on websites that target Flash Player in Firefox.

There is an update available for Chrome browser (update to the latest release please) and for the Flash Player plugin for Firefox. I have a package for that flashplayer-plugin and therefore I pushed an update so that you can “safely” use Flash content again in Firefox.

Mind you – if you are using the beta Steam Client for Linux (i.e. the client for Valve Software’s gaming platform) you will have a package for that flash player because it is used to display the video content in the Steam client. If you use Steam on multilib Slackware64 then you will have a “compat32” package of that flashplayer-plugin – do not forget to update that one as well!

Packages for flashplayer-plugin 11.2.202.270 can be obtained (and used on Slackware 13.37 and higher, and perhaps even older releases) in the following places:

After the package upgrade, restart Firefox and visit this website to verify that your Flash Player Plugin is indeed the correct version: http://www.adobe.com/software/flash/about/

Eric

Make firefox understand downloaded files

 It is quite annoying that Firefox always forgets what application to use for “opening” a file which you just downloaded. Also, the context menu “Open containing folder” in the Downloads overview does not work. Thanks to a hint from user cendryon in  a discussion at LinuxQuestions.org, a clean and simple solution surfaced which I had not thought of myself (even though I implement the same techique in my Dropbox client package):

Using “xdg-open” you can improve the integration of Firefox into your Desktop Environment a lot:

  1. Stop firefox if it is running
  2. Delete or rename the mimetypes cache (where firefox keeps its file association settings):
    $ rm ~/.mozilla/firefox/<yourprofile>/mimeTypes.rdf
  3. Start firefox again
  4. Download any file if you had not done this before
  5. Open that file from the “Tools > Downloads” menu (by right-clicking on it and selecting “Open“). When asked to choose the application for opening the fike, browse to “/usr/bin/xdg-open“. then check the checkbox to “Remember your choice“.

After you’ve configured Firefox like that, both the  “Open” and “Open containing folder” context menus will work. If you are running KDE (which was the subject of that discussion on LQ.org) you can then change the preferred programs through KDE’s “file associations” settings. Brilliant.

Have fun,

Eric

Setting up your own Mozilla Sync server

Last sunday was not a good weekend, from a software usability point of view.

I had not worked with the laptop (running 64-bit Slackware-current) for a few days and thought I’d do some preparation work for the upcoming KDE release (you know, checking out if any dependencies needed adding or updating, build script checks and such). However, I spent most of my time swearing at the Firefox browser.

What happened? I still do not know the cause, but within seconds of starting Firefox, it would consume roughly 70% of all available memory…  that is 2 GB of real RAM and 3 GB of swap. Even with one tab open, and a simple HTML page loaded, and with all my add-ons disabled, the situation did not improve.

Let me tell you, in such a situation a man can go nuts! Every click on a Firefox menu or button, or a page flip, would cause the laptop to freeze for up to 20 seconds while Linux was swapping massive amounts of useless data back and forth between RAM and swap.

Finally and enraged, I killed the firefox process, deleted my ~/.mozilla/firefox directory (to be honest, I renamed it) and fired up the browser again. And voilà! Firefox was behaving like a gentleman again. Of course, that left me without my bookmarks, browsing history, browser preferences, and saved passwords. Or did it?

A month or so ago, I decided to try the feature which is supported in Firefox since version 4, called “Mozilla Sync”. This feature allows you to store your bookmarks, browsing history, browser preferences, and saved passwords on a remote server. It even allows you to work on multiple computers and have the same Firefox configuration on all these computers. That’s a pretty cool feature. I have setup sync on my Android phone’s Firefox browser too. Having enabled the sync feature was my life saver during this weekend horror show! After I had removed the ~/.mozilla/firefox directory I quickly configured Firefox with my sync key and moments later I had my old browser configuration back… sans the ludicrous memory consumption. I was a happy puppy again.

That could have been the end of my blog post.

However I wrote this as a preamble to what I am going to show you next – how to setup your own Sync Server at home (or at work).

When I was contemplating the (dis)advantages of using Mozilla Sync, I was not too fond of the idea that the Sync Server which Firefox will use by default is hosted by Mozilla. Even though your data is supposedly being encrypted with your unique sync key before it gets uploaded to Mozilla, it feels awkward to see all your passwords and browsing data being transfered to a 3rd party. Furthermore, the geek in me was just dying to setup a sync server of my own.

Luckily, Mozilla is open as always and makes the Open Source Sync Server code available to everyone who wants to play with it. And setting it up proved to be not difficult at all. Note: Mozilla have re-designed and re-written the original Sync Server (it was called “Mozilla Weave Server” at the time, and was almost impossible to setup… I tried, back in october 2010). It’s now written in Python, and the steps to create your own Sync Server are described on this page: http://docs.services.mozilla.com/howtos/run-sync.html. That page is what you should follow. The rest of my article tries to bring more detail to the process of configuring your Slackware box to become a real Sync Server.

Of course  you want to install this on a Slackware server! There are some explicit dependencies as mentioned on the Mozilla page I referred to earlier, but python 2.6 and sqlite3 are already suppied by Slackware, and I created a package for virtualenv (for Slackware 13.1 and 13.37) which you can download here: http://slackware.com/~alien/slackbuilds/virtualenv/ .

Note (20120627): it looks like installing this virtualenv package is no longer needed, but I did not check this. A comment from Old_Fogie at the bottom of this package indicates that virtualenv is downloaded automatically during the “make build” you will run as part of the next step in my procedure. My suggestion is to skip the installation of my virtualenv package at first, and see what happens you run the “make build”. If you get an error about missing virtualenv, then install that package and re-run “make build”…

The Sync Server code is hosted in a Mercurial repository and since Slackware ships a Mercurial client, that code is easy to check out to a local directory where you continue to build the server binary:

$ mkdir -p /usr/local/server-full
$ cd /usr/local/server-full
$ hg clone https://hg.mozilla.org/services/server-full/ .
$ make build

Now, this server is ready to run, but unless you make some configuration changes it is not going to do you much good.

By default, the server stores your sync data in a sqlite database, which is fine with me (you can use a real MySQL server database if you want), but it will create the sqlite database in /tmp which is entirely inappropriate. Further down I will show you what to modify so that your clients’ sync data go somewhere less “volatile”.

The python-based Sync Server can run all by itself on a configurable port number (5000 by default) which is just fine if you are its only user in your little LAN. But even Mozilla advises to put a real webserver between you and the Sync Server. For this I used Slackware’s apache webserver. This means, you will need one additional package, mod_wsgi which you can download here: http://slackware.com/~alien/slackbuilds/mod_wsgi/ . I created a separate system user and group (weave:sync) which is going to run the Sync Server so that it can not interfere with Apache if anything goes crazy:

# groupadd sync
# useradd -g sync weave

If you omitted the creation of the homedirectory for this “weave” user account, then create it like this:

# mkdir /home/weave
# chown weave:sync /home/weave
# chmod 711 /home/weave

You then create a new file “/etc/httpd/extra/httpd-wsgi.conf” with the following content (adapt to your actual sync server hostname):

   <Directory /usr/local/server-full>
      Order deny,allow
      Allow from all
    </Directory>

    <VirtualHost *:80>
      ServerName sync.myserver.net
      DocumentRoot /usr/local/server-full
      WSGIProcessGroup sync
      WSGIDaemonProcess sync user=weave group=sync processes=2 threads=25
      WSGIPassAuthorization On
      WSGIScriptAlias / /usr/local/server-full/sync.wsgi
      CustomLog /var/log/httpd/sync.myserver.net-access.log combined
      ErrorLog  /var/log/httpd/sync.myserver.net-error.log
    </VirtualHost>

As you may notice, this tells that a script called “sync.wsgi” is going to be spawned as user “weave:sync” whenever a client connects to http://sync.myserver.net . You will have to modify your apache main configuration too (i.e. “/etc/httpd/httpd.conf“), in order to make it load the mod_wsgi module and use its configuration file. Add these lines to the httpd.conf:

# Activate the WSGI module (serving python binaries to the web):
Include /etc/httpd/extra/mod_wsgi.conf
# Act as a reverse proxy to the Mozilla Sync server:
Include /etc/httpd/extra/httpd-wsgi.conf

… followed by an Apache restart (you can run “apachectl configtest” first, to check for mistakes in the modified configuration if you can’t affort your webserver to go down thanks to a typo)

Now comes the part where you configure the Sync Server configuration files. Take a look inside your directory “/usr/local/server-full” where the Sync Server code has been downloaded and built. You will find the aforementioned “sync.wsgi” script there. Open the file in an editor. Read through the file and change it to something which you find better suited. For instance, I changed “/tmp” to “/var/tmp” in the line “os.environ[‘PYTHON_EGG_CACHE’] = ‘/tmp/python-eggs'”:

os.environ['PYTHON_EGG_CACHE'] = '/var/tmp/python-eggs'

Next, edit the file “development.ini” (that name is configured in “sync.wsgi” in case you want to give it another). In that file, I changed the location of another log file so that it gets written in “/var/tmp”. The line “args = (‘/tmp/sync-error.log’,)” changes to:

args = ('/var/tmp/sync-error.log',)

This “development.ini” file also mentions the filename of the actual sync configuration (yeah, my idea too was that this level of nesting configuration files seems unwanted): it has the name “etc/sync.conf” relative  to the server’s directory. It requires some editing! For instance, look for the two lines that look like this and change the path name to a safer location in your filesystem! I decided to create the SQL database file in the “weave” user’s own homedirectory, so I changed the line “sqlite:////tmp/test.db” to:

sqluri = sqlite:////home/weave/my_weave_server.db

The default value for the quota assigned to each sync account is too low (it’s set to 5 MB). Mozilla states that 99.9% of all clients which connect to its public server use less than 25 MB of quota, so use that value. The line “quota_size = 5120” changes to:

quota_size = 25600

Then, look for the following line and make absolutely certain that it is changed to the Apache http:// URL of your Sync Server, i.e. the URL that the sync clients are going to use:

fallback_node = http://localhost:5000/

You can play with other options in this file to see what they can offer. For instance,  I disabled “captcha” and did not enable SSL, but you may decide that this is important to you.

Don’t forget to restart your apache server if you have not yet done so.

And now it is time to tell your Firefox browser to use this new service!

  • Select “Tools > Setup sync…”:

  • In case this is the first time you talk to your Sync Server, you need to setup an account, so click the button “Create a New Account“. This opens a new dialog box where you can type your email address (this is your account name), associated password and then in the dropdown do not select “Firefox Sync Server“… instead, you choose “Use a custom server“, it allows you to enter the URL for your brand-new private Sync Server. Once the account has been created, Firefox will show you the sync key it will be using to encrypt your data. That key is important, you will need it if you want to add more computers to your sync account. And that’s basically it – the sync process will start immediately:

  • Else if you already have a Sync Account and want to add a second computer to it, you can click on “Connect” in the first dialog which will open a new dialog. There are two ways to add this computer to your existing sync account. Either enter the code which is being shown on another computer which is already syncing to the server; or else you click on “I don’t have the device with me“. This is what you would usually do I guess… it is combersome to search for another computer or hand-held if all you need to do is know your sync key:

  • If you know your sync key you can enter that in the following dialog, along with your account details and the server URL:

  • The sync key which is associated with your sync account can be retrieved at any moment should you have forgotten to write it down. Just go to a computer which has been setup for Sync, and open your Firefox browser’s Preferences at the “Sync” tab. Under “Manage your account” you will find a menu item to display your key (as well as a way to change your account’s password). More help can be found at http://support.mozilla.com/kb/what-firefox-sync .

Have fun! Eric

Dumping google toolbar

Well, I guess it is time to dump good old Google Toolbar.

In a previous post of mine, I showed you how to allow Firefox to keep using the Google Toolbar even though it lists as “unsupported” since firefox-5. But this is not a long-term option of course – at some point the plugin will become incompatible because it is no longer being developed and it will de-stabilize my browser.

So I was thinking, what are the reasons why I wanted to stick with the Google toolbar for so long? The plugin has some great features which I really don’t want to miss. Let me list them here, along with ways to get the same or similar functionality in Firefox but without using the Google Toolbar.

  1. Search through my search history. I guess this is is the feature I use most. Of course, Firefox keeps an accessible history of the URLs you visited, but re-using previous search phrases is something different. The Google Toolbar showed your entire search history in a neat dropdown. But this functionality is also present in Firefox’s own search field… I just never knew. If you type a single space character into the search entry field, then Firefox will display a dropdown with all your previous search phrases.
  2. Translate web pages. Using this a lot as well, to find out what those damn Russians are telling about Slackware… but there are other plugins that add the same functionality to your right-click context menu in Firefox. One that seems to get the best reviews because of its feature set is gTranslate. One disadvantage compared to the googlebar is, that it does not give me the option to translate a complete web page, it is limited to translating selected bits of text.
  3. Bookmark sync. When you work on many different computers and want your bookmarks available everywhere, then Google Toolbar woould let you. However, Firefox has its own “sync” functionality since version 4 which allows you to sync your bookmarks, history and other stuff to a central server, much like Google does too. And if you do not want to rely on 3rd party servers you can always setup your own private bookmark server like I did, using SiteBar. A killer feature of SiteBar is that it has ACLs (access control lists) allowing users of the service to share (parts of) their bookmarks with other users or groups.
  4. Use highlighted text to search in Google. It is so convenient to just highlight a piece of text and then right-click to use that text as a search phrase in Google. It is a must-have feature for me, but luckily there is an add-on called Context Search which will even expand the list of selectable search engines to beyond just Google.

Well that was not all that many reasons for needing the Google Toolbar, but even then: their value is high because of the way they allow me to be more productive and efficient in my work. I guess I will have to give the alternatives a try and see if I can live without the Google Toolbar. Realizing that I have to, I can only say “so long, and thanks for all the fish” to the people who have been developing this plugin over the years.

While I am at it, I think I am also going to try out Right-Click-Link (opening URLs in a new tab that are listed in a page as plain text), which seem to be useful as well.

Eric

« Older posts

© 2024 Alien Pastures

Theme by Anders NorenUp ↑