Tag : firefox

post image

How to run graphics-accelerated GUI apps in LXD containers on your Ubuntu desktop

In How to run Wine (graphics-accelerated) in an LXD container on Ubuntu we had a quick look into how to run GUI programs in an LXD (Lex-Dee) container, and have the output appear on the local X11 server (your Ubuntu desktop).

In this post, we are going to see how to

  1. generalize the instructions in order to run most GUI apps in a LXD container but appear on your desktop
  2. have accelerated graphics support and audio
  3. test with Firefox, Chromium and Chrome
  4. create shortcuts to easily launch those apps

The benefits in running GUI apps in a LXD container are

  • clear separation of the installation data and settings, from what we have on our desktop
  • ability to create a snapshot of this container, save, rollback, delete, recreate; all these in a few seconds or less
  • does not mess up your installed package list (for example, all those i386 packages for Wine, Google Earth)
  • ability to create an image of such a perfect container, publish, and have others launch in a few clicks

What we are doing today is similar to having a Virtualbox/VMWare VM and running a Linux distribution in it. Let’s compare,

  • It is similar to the Virtualbox Seamless Mode or the VMWare Unity mode
  • A VM virtualizes a whole machine and has to do a lot of work in order to provide somewhat good graphics acceleration
  • With a container, we directly reuse the graphics card and get graphics acceleration
  • The specific set up we show today, can potential allow a container app to interact with the desktop apps (TODO: show desktop isolation in future post)

Browsers have started having containers and specifically in-browser containers. It shows a trend towards containers in general, it is browser-specific and is dictated by usability (passwords, form and search data are shared between the containers).

In the following, our desktop computer will called the host, and the LXD container as the container.

Setting up LXD

LXD is supported in Ubuntu and derivatives, as well as other distributions. When you initially set up LXD, you select where to store the containers. See LXD 2.0: Installing and configuring LXD [2/12] about your options. Ideally, if you select to pre-allocate disk space or use a partition, select at least 15GB but preferably more.

If you plan to play games, increase the space by the size of that game. For best results, select ZFS as the storage backend, and place the space on an SSD disk. Also Trying out LXD containers on our Ubuntu may help.

Creating the LXD container

Let’s create the new container for LXD. We are going to call it guiapps, and install Ubuntu 16.04 in it. There are options for other Ubuntu versions, and even other distributions.

$ lxc launch ubuntu:x guiapps
Creating guiapps
Starting guiapps
$ lxc list
+---------------+---------+--------------------+--------+------------+-----------+
|     NAME      |  STATE  |        IPV4        |  IPV6  |    TYPE    | SNAPSHOTS |
+---------------+---------+--------------------+--------+------------+-----------+
| guiapps       | RUNNING | 10.0.185.204(eth0) |        | PERSISTENT | 0         |
+---------------+---------+--------------------+--------+------------+-----------+
$

We created and started an Ubuntu 16.04 (ubuntu:x) container, called guiapps.

Let’s also install our initial testing applications. The first one is xclock, the simplest X11 GUI app. The second is glxinfo, that shows details about graphics acceleration. The third, glxgears, a minimal graphics-accelerated application. The fourth is speaker-test, to test for audio. We will know that our set up works, if all three xclock, glxinfo, glxgears and speaker-test work in the container!

$ lxc exec guiapps -- sudo --login --user ubuntu
ubuntu@guiapps:~$ sudo apt update
ubuntu@guiapps:~$ sudo apt install x11-apps
ubuntu@guiapps:~$ sudo apt install mesa-utils
ubuntu@guiapps:~$ sudo apt install alsa-utils
ubuntu@guiapps:~$ exit $

We execute a login shell in the guiapps container as user ubuntu, the default non-root user account in all Ubuntu LXD images. Other distribution images probably have another default non-root user account.

Then, we run apt update in order to update the package list and be able to install the subsequent three packages that provide xclock, glxinfo and glxgears, and speaker-test (or aplay). Finally, we exit the container.

Mapping the user ID of the host to the container (PREREQUISITE)

In the following steps we will be sharing files from the host (our desktop) to the container. There is the issue of what user ID will appear in the container for those shared files.

First, we run on the host (only once) the following command (source),

$ echo "root:$UID:1" | sudo tee -a /etc/subuid /etc/subgid
[sudo] password for myusername: 
root:1000:1
$

The command appends a new entry in both the /etc/subuid and /etc/subgid subordinate UID/GID files. It allows the LXD service (runs as root) to remap our user’s ID ($UID, from the host) as requested.

Then, we specify that we want this feature in our guiapps LXD container, and restart the container for the change to take effect.

$ lxc config set guiapps raw.idmap "both $UID 1000"
$ lxc restart guiapps
$

This “both $UID 1000” syntax is a shortcut that means to map the $UID/$GID of our username in the host, to the default non-root username in the container (which should be 1000 for Ubuntu images, at least).

Configuring graphics and graphics acceleration

For graphics acceleration, we are going to use the host graphics card and graphics acceleration. By default, the applications that run in a container do not have access to the host system and cannot start GUI apps.

We need two things; let the container to access the GPU devices of the host, and make sure that there are no restrictions because of different user-ids.

Let’s attempt to run xclock in the container.

$ lxc exec guiapps -- sudo --login --user ubuntu
ubuntu@guiapps:~$ xclock
Error: Can't open display: 
ubuntu@guiapps:~$ export DISPLAY=:0
ubuntu@guiapps:~$ xclock
Error: Can't open display: :0
ubuntu@guiapps:~$ exit
$

We run xclock in the container, and as expected it does not run because we did not indicate where to send the display. We set the DISPLAY environment variable to the default :0 (send to either a Unix socket or port 6000), which do not work either because we did not fully set them up yet. Let’s do that.

$ lxc config device add guiapps X0 disk path=/tmp/.X11-unix/X0 source=/tmp/.X11-unix/X0 
$ lxc config device add guiapps Xauthority disk path=${XAUTHORITY} source=/home/${USER}/.Xauthority

We give access to the Unix socket of the X server (/tmp/.X11-unix/X0) to the container, and make it available at the same exactly path inside the container. In this way, DISPLAY=:0 would allow the apps in the containers to access our host’s X server through the Unix socket.

Then, we repeat this task with the ~/.Xauthority file that resides in our home directory. This file is for access control, and simply makes our host X server to allow the access from applications inside that container. For the host, this file can be found in the variable $XAUTHORITY and should be either at ~/.Xauthority or /run/myusername/1000/gdm/Xauthority. Obviously, we can set correctly the path= part, however the distribution in the container needs to be able to find the .Xauthority in the given location.

How do we get hardware acceleration for the GPU to the container apps? There is a special device for that, and it’s gpu. The hardware acceleration for the graphics card is collectively enabled by running the following,

$ lxc config device add guiapps mygpu gpu
$ lxc config device set guiapps mygpu uid 1000
$ lxc config device set guiapps mygpu gid 1000

We add the gpu device, and we happen to name it mygpu (any name would suffice). In addition to gpu device, we also set the permissions accordingly so that the device is fully accessible in  the container. The gpu device has been introduced in LXD 2.7, therefore if it is not found, you may have to upgrade your LXD according to https://launchpad.net/~ubuntu-lxc/+archive/ubuntu/lxd-stable Please leave a comment below if this was your case (mention what LXD version you have been running). Note that for Intel GPUs (my case), you may not need to add this device.

Let’s see what we got now.

$ lxc exec guiapps -- sudo --login --user ubuntu
ubuntu@guiapps:~$ export DISPLAY=:0
ubuntu@guiapps:~$ xclock

ubuntu@guiapps:~$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel Open Source Technology Center (0x8086)
...
ubuntu@guiapps:~$ glxgears 

Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
345 frames in 5.0 seconds = 68.783 FPS
309 frames in 5.0 seconds = 61.699 FPS
300 frames in 5.0 seconds = 60.000 FPS
^C
ubuntu@guiapps:~$ echo "export DISPLAY=:0" >> ~/.profile 
ubuntu@guiapps:~$ exit
$

Looks good, we are good to go! Note that we edited the ~/.profile file in order to set the $DISPLAY variable automatically whenever we connect to the container.

Configuring audio

The audio server in Ubuntu desktop is Pulseaudio, and Pulseaudio has a feature to allow authenticated access over the network. Just like the X11 server and what we did earlier. Let’s do this.

We install the paprefs (PulseAudio Preferences) package on the host.

$ sudo apt install paprefs
...
$ paprefs

This is the only option we need to enable (by default all other options are not check and can remain unchecked).

That is, under the Network Server tab, we tick Enable network access to local sound devices.

Then, just like with the X11 configuration, we need to deal with two things; the access to the Pulseaudio server of the host (either through a Unix socket or an IP address), and some way to get authorization to access the Pulseaudio server. Regarding the Unix socket of the Pulseaudio server, it is a bit of hit and miss (could not figure out how to use reliably), so we are going to use the IP address of the host (lxdbr0 interface).

First, the IP address of the host (that has Pulseaudio) is the IP of the lxdbr0 interface, or the default gateway (ip link show). Second, the authorization is provided through the cookie in the host at /home/${USER}/.config/pulse/cookie Let’s connect these to files inside the container.

$ lxc exec guiapps -- sudo --login --user ubuntu
ubuntu@guiapps:~$ echo export PULSE_SERVER="tcp:`ip route show 0/0 | awk '{print $3}'`" >> ~/.profile

This command will automatically set the variable PULSE_SERVER to a value like tcp:10.0.185.1, which is the IP address of the host, for the lxdbr0 interface. The next time we log in to the container, PULSE_SERVER will be configured properly.

ubuntu@guiapps:~$ mkdir -p ~/.config/pulse/
ubuntu@guiapps:~$ echo export PULSE_COOKIE=/home/ubuntu/.config/pulse/cookie >> ~/.profile
ubuntu@guiapps:~$ exit
$ lxc config device add guiapps PACookie disk path=/home/ubuntu/.config/pulse/cookie source=/home/${USER}/.config/pulse/cookie

Now, this is a tough cookie. By default, the Pulseaudio cookie is found at ~/.config/pulse/cookie. The directory tree ~/.config/pulse/ does not exist, and if we do not create it ourselves, then lxd config will autocreate it with the wrong ownership. So, we create it (mkdir -p), then add the correct PULSE_COOKIE line in the configuration file ~/.profile. Finally, we exit from the container and mount-bind the cookie from the host to the container. When we log in to the container again, the cookie variable will be correctly set!

Let’s test the audio!

$ lxc exec guiapps -- sudo --login --user ubuntu
ubuntu@pulseaudio:~$ speaker-test -c6 -twav

speaker-test 1.1.0

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 349525
Period size range from 10 to 116509
Using max buffer size 349524
Periods = 4
was set period_size = 87381
was set buffer_size = 349524
 0 - Front Left
 4 - Center
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
 5 - LFE
Time per period = 8.687798 ^C
ubuntu@pulseaudio:~$

If you do not have 6-channel audio output, you will hear audio on some of the channels only.

Let’s also test with an MP3 file, like that one from https://archive.org/details/testmp3testfile

ubuntu@pulseaudio:~$ sudo apt install mpg123
...
ubuntu@pulseaudio:~$ wget https://archive.org/download/testmp3testfile/mpthreetest.mp3
...
ubuntu@pulseaudio:~$ mplayer mpthreetest.mp3 
MPlayer 1.2.1 (Debian), built with gcc-5.3.1 (C) 2000-2016 MPlayer Team
...
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   3.7 (03.7) of 12.0 (12.0)  0.2% 

Exiting... (Quit)
ubuntu@pulseaudio:~$

All nice and loud!

Troubleshooting sound issues

AO: [pulse] Init failed: Connection refused

An application tries to connect to a PulseAudio server, but no PulseAudio server is found (either none autodetected, or the one we specified is not really there).

AO: [pulse] Init failed: Access denied

We specified a PulseAudio server, but we do not have access to connect to it. We need a valid cookie.

AO: [pulse] Init failed: Protocol error

You were trying as well to make the Unix socket work, but something was wrong. If you can make it work, write a comment below.

Testing with Firefox

Let’s test with Firefox!

ubuntu@guiapps:~$ sudo apt install firefox
...
ubuntu@guiapps:~$ firefox 
Gtk-Message: Failed to load module "canberra-gtk-module"

We get a message that the GTK+ module is missing. Let’s close Firefox, install the module and start Firefox again.

ubuntu@guiapps:~$ sudo apt-get install libcanberra-gtk3-module
ubuntu@guiapps:~$ firefox

Here we are playing a Youtube music video at 1080p. It works as expected. The Firefox session is separated from the host’s Firefox.

Note that the theming is not exactly what you get with Ubuntu. This is due to the container being so lightweight that it does not have any theming support.

The screenshot may look a bit grainy; this is due to some plugin I use in WordPress that does too much compression.

You may notice that no menubar is showing. Just like with Windows, simply press the Alt key for a second, and the menu bar will appear.

Testing with Chromium

Let’s test with Chromium!

ubuntu@guiapps:~$ sudo apt install chromium-browser
ubuntu@guiapps:~$ chromium-browser
Gtk-Message: Failed to load module "canberra-gtk-module"

So, chromium-browser also needs a libcanberra package, and it’s the GTK+ 2 package.

ubuntu@guiapps:~$ sudo apt install libcanberra-gtk-module
ubuntu@guiapps:~$ chromium-browser

There is no menubar and there is no easy way to get to it. The menu on the top-right is available though.

Testing with Chrome

Let’s download Chrome, install it and launch it.

ubuntu@guiapps:~$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
...
ubuntu@guiapps:~$ sudo dpkg -i google-chrome-stable_current_amd64.deb
...
Errors were encountered while processing:
 google-chrome-stable
ubuntu@guiapps:~$ sudo apt install -f
...
ubuntu@guiapps:~$ google-chrome
[11180:11945:0503/222317.923975:ERROR:object_proxy.cc(583)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[11180:11945:0503/222317.924441:ERROR:object_proxy.cc(583)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
^C
ubuntu@guiapps:~$ sudo apt install upower
ubuntu@guiapps:~$ google-chrome

There are these two errors regarding UPower and they go away when we install the upower package.

Creating shortcuts to the container apps

If we want to run Firefox from the container, we can simply run

$ lxc exec guiapps -- sudo --login --user ubuntu firefox

and that’s it.

To make a shortcut, we create the following file on the host,

$ cat > ~/.local/share/applications/lxd-firefox.desktop[Desktop Entry]
Version=1.0
Name=Firefox in LXD
Comment=Access the Internet through an LXD container
Exec=/usr/bin/lxc exec guiapps -- sudo --login --user ubuntu firefox %U
Icon=/usr/share/icons/HighContrast/scalable/apps-extra/firefox-icon.svg
Type=Application
Categories=Network;WebBrowser;
^D
$ chmod +x ~/.local/share/applications/lxd-firefox.desktop

We need to make it executable so that it gets picked up and we can then run it by double-clicking.

If it does not appear immediately in the Dash, use your File Manager to locate the directory ~/.local/share/applications/

This is how the icon looks like in a File Manager. The icon comes from the high-contrast set, which now I remember that it means just two colors 🙁

Here is the app on the Launcher. Simply drag from the File Manager and drop to the Launcher in order to get the app at your fingertips.

I hope the tutorial was useful. We explain the commands in detail. In a future tutorial, we are going to try to figure out how to automate these!

Announcing the Certificate Watch (CertWatch) Firefox addon

CertWatch is a Firefox add-on that helps you control how digital certificates are used when you visit secure websites. While there exist tools that help control how, for example, scripts like Javascript are executed (NoScript addon), there has not been a tool for digital certificates.

The closest Firefox addon to the functionality of CertWatch is Certificate Patrol, which keeps track of website certificates and notifies when a revisited website has a different website certificate. CertWatch collects more information than Certificate Patrol and keeps track of root, intermediate and website certificates, plus visit details.

Once you install CertWatch and restart Firefox, CertWatch will take up to 30 seconds to parse all root certificates that your Firefox comes with. Every secure website that you visit is vouched for by some root certificate that pre-exists in Firefox. Your Firefox has about 150 of those root certificates, and you can traditionally view them in Edit»Preferences»Advanced»Encryption»View Certificates»Authorities.

Screenshot of CertWatch 1.0 running for the first-time

Screenshot of CertWatch 1.0 running for the first-time

This is Firefox 4 (beta1) with a new profile. Both Firefox 4 and Firefox 3.6.8 (as found in Ubuntu 10.04) come with 149 root certificates. If you have more than 149, then you accepted yourself extra root certificates which are fully enabled and can vouch for secure websites. As you browse, your Firefox collects intermediate certificates (I plan to explain all these in future posts at certwatch.simos.info). These are added to Firefox without user interaction, as long as the respective root certificate is in Firefox as well.

Screenshot of CertWatch 1.0 Preferences

Screenshot of CertWatch 1.0 Preferences

These are the preferences, accessible from Tools » CertWatch Preferences. When you visit a secure website, there is a process where the website certificate is vouched by the root certificate that Firefox already knows. Between the website and root certificates there could be intermediate certificates, creating what is called a certificate chain.

What the preferences do is specify when you should get a notification while you visit a secure website. The default preferences say that for the certificate chain of a secure website, show the certificate details if any of the website, intermediate or root certificates are encountered for the first time.

Let’s visit https://addons.mozilla.org/ with CertWatch installed.

Screenshot of CertWatch 1.0 - certificates at addons.mozilla.org (animated GIF)

Screenshot of CertWatch 1.0 - certificates at addons.mozilla.org (animated GIF)

Each tab correspond to a certificate. All these three certificates are the certificate chain that verifies the secure website https://addons.mozilla.org/. The numbers at the tab names indicate how many times CertWatch encountered these certificates. It’s the first time, so they all show 1. The black star ★ indicates whether the CertWatch Preferences apply for each certificate. Since the preferences indicate first time only, then all tabs get a star.

From the list of root certificates, only a handful of them will be ever used during your browsing and with CertWatch you now have the facility to figure out which ones are actually being used. At this stage I would consider this as the first most important use of CertWatch; keeping track on how many times certificates are used. If you encounter a new certificate when you visit a revisited website, then this is something to investigate.

CertWatch keeps its copy of certificates in an SQLite database in your Firefox profile. For Linux, the path is ~/.mozilla/firefox/YOURPROFILENAME/CertWatchDB3.sqlite. You can read the database with any SQLite client such as the Firefox Addon SQLite Manager or sqlitebrowser (Packaged in Debian and Ubuntu as sqlitebrowser). In the SQLite database you can view the root/intermediate certificate table, the website certificate table, and the website visits table. In all cases the full certificate is stored in case you want to contribute to the EFF SSL Observatory.

CertWatch is developed on Ubuntu Linux 10.04, with Eclipse 3.6 (Helios) and the JSDT environment.

Install the latest version of CertWatch, which is available from the addons.mozilla.org (AMO) CertWatch page.

Follow the progress of CertWatch at the http://certwatch.simos.info/ CertWatch blog.

Here are some secure websites for testing, https://www.google.com/, https://www.paypal.com/, https://www.facebook.com/, https://twitter.com/

Three facts about Firefox in Greece

Firefox statistics in Greece since March 1st 2010 (BrowserChoice day)

Since the start of 2010, Firefox and Internet Explorer were more or less head to head in Greece at about 44% each.

Since the start of March 2010, Firefox increased the gains compared to Internet Explorer.

The peak half-way in the graph corresponds to the Greek Orthodox Easter vacation period.

The graph depicts the weekly browser statistics in Greece from February 2010 up to the end of May 2010.

Daily browser statistics in Greece for 2010

The daily statistics have a peculiar pattern. During weekends, the usage stats for Firefox are shot up while Internet Explorer shows a significant dip.

However, during the weekdays the stats for the two main browsers are balanced out. This pattern (which is replicated in most European countries), shows that a significant number of people at work are forced to use Internet Explorer. It is easy to identify country-wide strikes through the disruptions in this pattern.

The graph depicts the daily browser statistics in Greece for May 2010.

Browser statistics for Greece, during the first half of 2010.

Firefox increased the market share to almost 2% since the start of 2010.

At the same time, Internet Explorer lost close to 5% of market share.

Apart from Firefox, Chrome was a big benefactor of market share, increasing to almost 9%.

The graph depicts the monthly browser statistics for Greece, for the first five months of 2010.

The Greek localisation of Mozilla Firefox is maintained by Kostas Papadimas.

What is the case with other countries? Did BrowserChoice have an effect to other European countries?

Επιλέξτε πρώτο το Firefox!

Από την πρώτη Μαρτίου 2010, οι χρήστες Windows στην Ευρωπαϊκή Ένωση έχουν την επιλογή για το λογισμικό του περιηγητή (web browser). Η επιλογή θα ενεργοποιηθεί μέσω του συστήματος WindowsUpdate.

Σελίδα BrowserChoice.eu

Μπορείτε να δείτε πως φαίνεται η ελληνική σελίδα από το σύνδεσμο επιλογής λογισμικού περιήγησης για την Ευρωπαϊκή Ένωση.

BrowserChoice.eu επιλέξτε πρώτο το Firefox

Επιλέξτε πρώτο το Mozilla Firefox διότι πρώτο μέλημα του λογισμικού είναι η ασφάλειά σας.

Η δικτυακός τόπος browserchoice.eu παρέχεται από τη Microsoft. Τη λειτουργία του browserchoice.eu την έχει επιβάλει η Ευρωπαϊκή Ένωση όταν καταδίκασε τη Microsoft σε πρόσφατη δίκη περί μονοπωλίου.

Στους όρους χρήσης του browserchoice.eu η Microsoft αναφέρει για το θέμα αυτό

ΚΟΙΝΟΠΟΙΗΣΕΙΣ

Η τοποθεσία BrowserChoice.eu σχεδιάστηκε σύμφωνα με μια απόφαση της νομοθεσίας περί ανταγωνισμού της Ευρωπαϊκής Επιτροπής τον Δεκέμβριο του 2009.

© 2009 Microsoft Corporation. Με επιφύλαξη κάθε νόμιμου δικαιώματος.

ΝΑΙ! Mozilla Firefox No1 στην Ελλάδα!

Μιλήσαμε πρόσφατα για τα στατιστικά χρήσης του Firefox στην Ελλάδα. Αυτή τη στιγμή έχουμε νέα στατιστικά που συμπεριλαμβάνουν και τον Ιανουάριο 2010.

Firefox vs IE (τέλος 2009 - Ιανουάριος 2010)

Με βάση τα στατιστικά στοιχεία από την υπηρεσία statcounter.com, ο Firefox στην Ελλάδα έχει φθάσει για πρώτη φορά το 45% στο μερίδιο αγοράς λογισμικού περιήγησης του διαδικτύου, ξεπερνώντας τον Internet Explorer.

Είναι εξαιρετικό νέο, και συμβαδίζουμε με άλλες χώρες όπως τη Γερμανία με το να χρησιμοποιούμε ελεύθερο λογισμικό και Firefox.

Firefox και Ελλάδα

Στατιστικά χρήσης λογισμικού περιήγησης ιστοσελίδων για την Ελλάδα (2008-2009)

Τα πιο πρόσφατα στατιστικά χρήσης λογισμικού περιήγησης ιστοσελίδων (web browser) για την Ελλάδα δείχνουν το Firefox να προσεγγίζει το μερίδιο αγοράς του Internet Explorer.

Η πηγή των στατιστικών είναι η υπηρεσία StatCounter.

Σε Γερμανία, Ουγγαρία και Σλοβακία, οι χρήστες Firefox έχουν ξεπεράσει αυτούς από IE. Στην Ελλάδα πότε θα φθάσουμε στο σημείο αυτό;

Try Firefox 3.5 (pre), with in-built video support (+subtitles)

You can try out Firefox 3.5 (not final yet) now and have a sneak preview of the new features.
Among the new features is the in-built support for video (there is a new video tag you can add to your (X)HTML pages)).

With some extra Javascript, it is possible to top up the video playback with subtitles, in your language!

1. Therefore, grab a copy of Firefox 3.5 (pre).

2. When you run it, it is advised to run it as

./firefox -ProfileManager -no-remote

This asks you to select a different profile, so you can create a special profile just for testing Firefox 3.5. The -no-remote option helps you to have independent Firefox sessions from your normal Firefox you may be running.

3. Visit the Firefox 3.5 video demonstration page with subtitles.

4. Here is a version with translated subtitles for Greek.

Mozilla 3.5 demonstrating video with Greek subtitles

Note that Firefox supports the OGV video container format. Therefore, you may need to convert your videos to OGV.

GMail J2ME application for your mobile phone

We talked a couple of years ago about the Google J2ME (Java for Mobile devices such as mobile phones) application that you can download and install on your phone. With this application, you can run GMail on you mobile phone, and access your e-mails with your data plan (GPRS, EDGE or 3G).

https://i1.wp.com/www.google.com/xhtml/images/screenshots/gmail.gif

To install the J2ME application, visit (with your mobile phone) the URL

gmail.com/app

If GMail recognises that you are using a compatible mobile phone, it will direct you to download and install the application to your phone. The current version of the application is about 260KB.

If you want to save some of your data bandwidth, you can change the User-Agent string of your Firefox (use the User Agent Switcher Firefox Extension) to one of a mobile phone, then visit with your browser. In this case, you can get the application from googlemail-nokia.jar (version 2.0.6/L2). If you can afford it however, it is better to install from gmail.com/app, because this would set a list of reasonable defaults.

Rendering bug in Firefox, threat level: annoyance

There is this rendering bug in Firefox that currently can be classified as an annoyance.

It was discovered during a discussion at the Ubuntu-GR mailing list and reported in June 2008, and at that time it would cause Firefox to crash. Therefore, it was deemed as a security issue, and the bug report was not made public. Just recently, the issue was revisited, current versions of Firefox do not crash, and the security tag was removed. It is quite possible that there is some existing report on the issue, and not being classified as a security bug, it will be easier sort out. Thus, have a look at bug report #441307.

The source of the rendering bug is the HTML code

<HR WIDTH=143165425 ALIGN=RIGHT>

So, you send an HTML e-mail and you add the above code. The code says to show a Horizontal line, with some huge width (here, you simply put 143165425).

If you received such an annoying e-mail, here is how it may look like (Yahoo WebMail)

If you received such an annoying e-mail, here is how it may look like (Yahoo WebMail)

How GMail might look like when you receive such an HTML email.

How GMail might look like when you receive such an HTML email.

Some versions of Firefox respond differently to this rendering bug, which probably relates to a different set of linked libraries. For example, the Firefox 3 found in Ubuntu Linux 8.10 is able to show the e-mail in GMail just fine (though it messes up with other pages). The above screenshots are by Minefield 3.1b2pre (64-bit). The Windows version of Firefox is also affected.

To try out yourself, create a file /tmp/mypoc.html with contents

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR=”#ffffff”>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=2 BGCOLOR=”#e0e0e0″>
<TR>
<TD>
<HR WIDTH=143165425 ALIGN=RIGHT>
</TD>
</TR>
</TABLE>
This is a test.
<HR WIDTH=143165425 ALIGN=RIGHT>
Some more text.
</BODY>
</HTML>

Load it up in Firefox. Click to Select All, then Copy. You can then paste in your mailer, when you compose as HTML (for example, with Thunderbird).

Just to reiterate, this issue is currently at level annoyance, unless someone manages to produce an HTML file that can crash Firefox. If you manage to do so, please file a bug report at http://bugzilla.mozilla.org/ and specify the security settting so that the bug gets high priority.

Firefox 3 statistics, and the Greek language

Firefox 3 was released on the 17th June, 2008 and up to now, an impressive 22 million copies have been downloaded.

kkovash had a peek at the stats and produced a nice post with diagram for the downloads of the localised versions of Firefox 3 (that is, excluding en-US).

Firefox 3 Downloads; part of EMEA region, focus on Greece

Downloads at [Release+3] days (20th June 2008)

Dark red signifies that there have been more than 100,000 downloads originating from the respective country. It is quite visible that most European countries managed to surpass the 100,000 threshold. Greece at that point was hovering to about 50,000 downloads. In the Balkan region, Turkey was the first country to grab the red badge.

It is interesting to see that Iran has been No 2 in the whole of Asia (No 1 has been Japan). Only now China managed to reach the second place, and pushed Iran in the third place. When taking into account the population gap and the political situation, Iran achieved a amazing feat.

In the first few days, a few countries only managed to jump fast over the 100K mark. It appears that these countries have strong social network communities, that urged friends to grab a copy of Firefox 3.

Firefox 3 downloads, showing Greece, with Red status

This is a recent screenshow (26th June 2008), at [Release+9] days. Greece has achieved Red status the other day. In the Balkan region, Turkey, Romania and Bulgaria had reached 100,000 first.

In the EU region, it is notable that Ireland, at 76,000 downloads, is lagging behind.

Another observation is that the countries from Africa are lagging significantly from the rest of the world. Low broadband Internet penetration and limited number of Internet users is likely to be the reason.

How many downloads have there been for the Greek localisation of Firefox 3;

kkovash reveals that there have been about 60,000 downloads for the Greek localisation of Firefox 3. This would approximately mean that more than 60% of the downloads in Greece have been for the localised version. Great news.

Today you’ll make history with Firefox

Today you’ll make history with Firefox

Are you ready to make history? Are you ready to set a World Record? Today is Download Day. To become part of the official Guinness World Record you must download Firefox 3 by 17:00 18:15 UTC on June 18, 2008, or roughly 24 hours from now.

Download page with live download statistics

The sender of this email is Mozilla Corporation, 1981 Landings Drive, Bldg. K, Mountain View, CA 94043-0801.

Did you receive your notification for your pledge?

The Firefox Download Day has just started. We are already counting 1 and a half hours in the download day. See download countdown which shown until when your downloads count for the record attempt.

Mozilla.com is currently very slow due to the repeated attempts to download. I hope the issue is resolved soon.

Update +2 hours: Now it works; when you visit the download page, it now shows correctly that Firefox 3.0 is available for download.

Update +16 hours: The download count reached 5,400,000 downloads. It is good to drive it higher. You can get your national download total, and ask your friends and family to help increase it.

Update +20 hours: The download count is over 6,000,000 downloads. Due to the technical issues at the start of the record attempt, the deadline for downloads has been extended by one hour and 15 minutes.

Update +24 hours: The download count is nearing 8,000,000 downloads. We have a bit more than an hour to go (due to the technical issue that delayed the start of the downloads). Can we make it to 8 million?

Update +25 hours: We did it! 8 million downloads in 24 hours! World record!

Update +30 hours: The world record attempt has been completed. Still, the Firefox 3 downloads continue. At the moment we surpassed 9.4 million downloads and counting.

Firefox Download Day Today! Check the start time!

Tuesday, 17th June 2008, is the Firefox 3 download day.
Download Day
For the world record attempt, check the start time for your location before downloading Firefox.

If you are located in Athens, Greece, we start at 20:00, Tuesday 17th June 2008.

If you are located in London, UK, we start at 18:00, Tuesday 17th June 2008.

Check the correct start time for your location.

Download Firefox 3!
Download Day - English
For more information, see http://www.spreadfirefox.com/