Installing and using the Pipelight browser plug-in with Firefox 30 for Linux

pipelight-logoI use Gentoo Linux (~amd64) on my main laptop. Although I do not use Netflix or any of the other streaming video services that require the Microsoft Silverlight browser plug-in, I do need to use a browser with the Silverlight plug-in to access an office Intranet site. So I was interested in installing the Pipelight plug-in.

Although Pipelight works with most of the Silverlight test sites I have found on the Web, I cannot get it to work with the above-mentioned office Intranet site, which is why I ended up installing Firefox for Windows and Silverlight in WINE (see my previous post). Anyway, below I explain how I installed and configured Pipelight 0.2.7.1 and Firefox 30.0 for Linux. Even if you use a different Linux distribution to me, almost all of this post will still be relevant; only the package installation commands will differ.

Google Chrome 34 and onwards does not support NPAPI, so Pipelight does not work any more with Chrome. Actually, Mozilla has disabled some NPAPI support by default in Firefox 30: with the exception of the Flash plug-in you have to explicitly give permission for plug-ins to be activated via Click-to-Activate (also known as Click-to-Play). You can configure how Firefox Click-to-Activate behaves via Open menu > Add-ons > Plugins (choose either ‘Ask to Activate’, ‘Always Activate’ or ‘Never Activate’). See ‘Issues related to plugins – 4.1 Click to Play in Mozilla browser versions 23 and above‘ on the mozillaZine Website and ‘How to always activate a plugin for a trusted website‘ on the Mozilla Support Website.

I updated an existing Pipelight ebuild so that it will install the latest version of Pipelight (0.2.7.1) via a Portage local overlay. You can download the new ebuild from Gentoo Bugzilla Bug Report No. 481596 (see Comment 40). I can only get it to merge by using the -binary-pluginloader USE flag. [Update August 18, 2014: The package is now in the main Portage tree, at least for ~amd64]

Installation

Install Firefox if it has not already been installed:

root # emerge firefox

Install Pipelight (installation fails unless I disable binary-pluginloader):

root # USE="-binary-pluginloader" emerge pipelight

Install WINE with the Compholio patches:

root # USE="pipelight" emerge wine

As you can see below, I have wine-1.7.21 and pipelight-0.7.2.1 installed.

user $ eix -I wine
[I] app-emulation/wine
Available versions: 1.2.3^t (~)1.3.28^t 1.4.1^t 1.6.1^t 1.6.2^t (~)1.7.0^t (~)1.7.3^t (~)1.7.4^t (~)1.7.8^t (~)1.7.9^t (~)1.7.10^t (~)1.7.11^t (~)1.7.12^t (~)1.7.13^t (~)1.7.14^t (~)1.7.15^t (~)1.7.16^t (~)1.7.17^t (~)1.7.18^t (~)1.7.19-r1^t (~)1.7.20^t (~)1.7.21^t **9999^t {+X (+)alsa capi cups custom-cflags dbus dos (+)fontconfig +gecko gnutls gphoto2 gsm gstreamer jack (+)jpeg lcms ldap +mono mp3 nas ncurses netapi nls odbc openal opencl +opengl osmesa (+)oss +perl pipelight (+)png +prelink pulseaudio +realtime +run-exes samba scanner selinux (+)ssl test +threads +truetype (+)udisks v4l +win32 +win64 xcomposite xinerama (+)xml ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_X86="(+)32 (+)64 x32" ELIBC="glibc" LINGUAS="ar bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW"}
Installed versions: 1.7.21^t(13:39:36 06/07/14)(X alsa cups fontconfig gecko gphoto2 gsm jpeg lcms mp3 ncurses nls openal opengl perl pipelight png prelink pulseaudio realtime run-exes scanner ssl threads truetype udisks v4l xinerama xml -capi -custom-cflags -dos -gstreamer -ldap -mono -netapi -odbc -opencl -osmesa -oss -samba -selinux -test -xcomposite ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_X86="32 64 -x32" ELIBC="glibc" LINGUAS="en pt_BR -ar -bg -ca -cs -da -de -el -en_US -eo -es -fa -fi -fr -he -hi -hr -hu -it -ja -ko -lt -ml -nb_NO -nl -or -pa -pl -pt_PT -rm -ro -ru -sk -sl -sr_RS@cyrillic -sr_RS@latin -sv -te -th -tr -uk -wa -zh_CN -zh_TW")
Homepage: http://www.winehq.org/
Description: Free implementation of Windows(tm) on Unix
.
user $ eix -I pipelight
[I] www-plugins/pipelight
Available versions: (~)0.2.3[1] (~)0.2.6[2] (~)0.2.7.1[2] {adobereader +binary-pluginloader flash foxitpdf grandstream installation-dialogs npactivex roblox shockwave +silverlight static unity3d}
Installed versions: 0.2.7.1[2](21:57:35 10/07/14)(silverlight -adobereader -binary-pluginloader -flash -foxitpdf -grandstream -installation-dialogs -npactivex -roblox -shockwave -static -unity3d)
Homepage: http://fds-team.de/cms/index.html https://launchpad.net/pipelight
Description: A browser plugin which allows one to use windows-only plugins inside Linux browsers.
.
[1] "sabayon" /var/lib/layman/sabayon
[2] "local_overlay" /usr/local/portage

Now update the dependency-installer script and enable the plug-in:

user $ sudo pipelight-plugin --update # sudo has to be used for this command only.
user $ pipelight-plugin --enable silverlight

Applies to AMD ATI GPUs only: My main laptop has an AMD ATI HD 5850 GPU, and hardware acceleration causes Firefox to hang when the Pipelight plug-in is enabled, so I have to disable hardware acceleration:

user $ cp /usr/share/pipelight/configs/pipelight-silverlight5.1 ~/.config/

Edit the Pipelight configuration file:

user $ nano ~/.config/pipelight-silverlight5.1

In order to force GPU acceleration uncomment the line:
overwriteArg = enableGPUAcceleration=true

In order to disable GPU acceleration (even if your graphic driver is probably supported) uncomment the line:
overwriteArg = enableGPUAcceleration=false

Instead of disabling GPU hardware acceleration in the Pipelight configuration file (pipelight-silverlight5.1), I could have instead done it each time I launch Firefox by entering the following command:

user $ PIPELIGHT_GPUACCELERATION=0 firefox

But I prefer to be able to enter just the following command:

user $ firefox

or to launch Firefox from the as-installed entry for Firefox in the Desktop Environment’s launcher menu.

After launching Firefox for the first time, a series of pop-up windows will show that the Silverlight plug-in is being installed. Once the final pop-up window has closed, install the Firefox extension User Agent Overrider (do not install User Agent Switcher or any other user agent selection extension for Firefox), click on the down-arrow of the User Agent Overrider icon in Firefox and select ‘Windows / Firefox 29′ from the pull-down menu. I also selected ‘Preferences…’ and added another user agent string to the end of the list:

# Custom
Windows / Firefox 15: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1

Check that the plug-in is installed correctly

Enter about:plugins in the Firefox Address bar to check which plug-ins are installed, their version and current state.

Use the Pipelight diagnostic page to check the plug-in is working.

Pipelight options

To see what commands the Pipelight plug-in supports, enter the following command in a Konsole/Terminal window:

user $ pipelight-plugin --help

Further information

Below are some links to Silverlight tests and other information regarding Pipelight and Silverlight.

Silverlight test pages

Silverlight Version Test

Bubblemark animation test

Silverlight Project Test Page | Deep Zoom

Silverlight DRM Test (Select ‘No DRM’ because the following bug report says that the Silverlight DRM test at the aforementioned Web page is broken and Microsoft will not fix it: Bug 762056.)

Becky’s Silverlight Test Site

Microsoft Silverlight – IIS Smooth Streaming Demo

Experience IIS Smooth Streaming

Silverlight Project Test Page | Deep Zoom Tag Browser

Microsoft Case Studies

Silverlight Demos

Here is an article on Netflix’s intention to dump the awful Silverlight plug-in:
Netflix to dump Silverlight, Microsoft’s stalled technology

Background information on the Pipelight project

This presentation was made by the Pipelight developers:
Pipelight – Windows browser plugins on Linux

Useful pages on the Pipelight Web site

Pipelight | News

This page, about selecting a User Agent String that will work, is important to read if you’re having problems:
Pipelight | Installation – User Agent

Background reading on User Agent Strings

How to Change Your Browser’s User Agent Without Installing Any Extensions

The IE10 User-Agent String

You can find out your current user agent string by using the following link:
What’s My User Agent?

Alternative to using Pipelight

If you still have trouble viewing Web pages that use Silverlight, you might like to try an alternative approach: use Firefox for Windows and the Silverlight plug-in in WINE. See my previous blog post Installing Firefox for Windows and the Silverlight plug-in in WINE.

Installing Firefox for Windows and the Silverlight plug-in in WINE

I use 64-bit (~amd64) multilib Gentoo Linux on my main laptop, and had been using successfully Version 0.2.3 of the Pipelight browser plug-in in 64-bit Firefox 29.0.1 for Linux to access an office Intranet Web site that uses Microsoft Silverlight. However, after installing 64-bit Firefox 30.0 for Linux recently I found that Mozilla has removed NPAPI support by default in Firefox 30, and Web sites using Silverlight would no longer load.

By updating Pipelight to Version 0.2.6 and changing the user agent string — see ‘Firefox UserAgent Switcher list‘ — I was able to browse in Firefox 30.0 for Linux only some of the Web sites that use Silverlight, but the aforementioned Intranet Web site would no longer load and displayed the following error message instead:

It appears the browser you are using to access this site is unsupported. Please use one of the following browsers …

· Internet Explorer 8.0

· Internet Explorer 9.0

· Internet Explorer 10.0

If you are using one of these browsers and you are still seeing this message, please contact company support.

I tried changing Firefox’s user agent string to the following, which I found from the post ‘Firefox UserAgent Switcher list‘:

Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0

That user agent string allowed the Intranet’s Web page to start loading, but a window popped-up displaying the error message shown below and Firefox stopped responding (froze).

Error reading Localization file

[Xml_UnexpectedTokens2]
Arguments: Content-Type,”,’,4,18
Debugging resource strings unavailable. Often the key and arguments provide
sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?
linkid=106663&Version=5.1.30214.00&File=System.Xml.dll&Key=Xml_UnexpectedTokens2

After trying various user agent strings without success I decided to install 64-bit Firefox 30.0 for Windows and the 64-bit Silverlight plug-in in WINE. The 64-bit Firefox 30.0 for Windows installed successfully and I could launch it and browse the Internet. However, I found that the 64-bit Silverlight plug-in would not install (according to a message in the Silverlight Installer window, installation of the plug-in crashed at 82% complete), so I then installed 32-bit Firefox 30.0 for Windows with the 32-bit Silverlight plug-in, and that worked. Below I list the steps I used to install and configure 32-bit Firefox 30.0 with the 32-bit Silverlight plug-in in WINE (which, in my installation, was compiled to support both 32-bit and 64-bit Windows applications).

Installation and configuration of 32-bit Firefox for Windows and the Silverlight plug-in

1. I used a Web browser to download the file ‘Firefox Setup 30.0.exe‘ from the Mozilla Firefox Web site to the /home/fitzcarraldo/Downloads/ directory. The Mozilla Web site offers a choice of localised versions, so I downloaded the installer for Firefox for Windows in British English.

2. I opened a Konsole window and entered the following commands:

$ cd
$ export WINEPREFIX=$HOME/.wine-firefox
$ export WINEARCH="win32"
$ winecfg # Set Windows Version to Window 7.
$ cd ./.wine-firefox/drive_c/
$ wget http://winetricks.org/winetricks # Download winetricks so I can install Windows fonts.
$ chmod +x winetricks # Make winetricks script executable.
$ ./winetricks # Launch winetricks and install Windows fonts.
$ cp /home/fitzcarraldo/Downloads/Firefox\ Setup\ 30.0.exe .
$ wine Firefox\ Setup\ 30.0.exe
$ env WINEPREFIX="/home/fitzcarraldo/.wine-firefox" WINEARCH="win32" wine /home/fitzcarraldo/.wine-firefox/drive_c/Program\ Files/Mozilla\ Firefox/firefox.exe # Launch Firefox and download the Silverlight installer.

N.B. Keep the Konsole window open and use it to enter all the commands listed in this post.

Notice that I downloaded and launched the excellent winetricks script so that I could install some Windows fonts that Firefox for Windows might need to use. When the winetricks window opens, all I needed to do was:

  • Select ‘Select the default wineprefix’ and click ‘OK’
  • Select ‘Install a font’and click ‘OK’.
  • Select ‘allfonts’ and click ‘OK’.
  • Optionally, if you have an LCD monitor and you would like to enable subpixel font smoothing, select ‘Change Settings’ then ‘fontsmooth=rgb’ and click ‘OK’.

3. I used the 32-bit Firefox for Windows Web browser to download the Silverlight plug-in installer to the /home/fitzcarraldo/Downloads/ directory. The files downloaded were Silverlight.exe and Silverlight.exe:Zone.Identifier which were both downloaded when I clicked on the ‘Click to Install’ button on the ‘Get Microsoft Silverlight‘ Web page and I then moved them from the directory /home/fitzcarraldo/Desktop/ to the /home/fitzcarraldo/Downloads/ directory.

4. I exited Firefox for Windows and installed the Silverlight plug-in:

$ cp /home/fitzcarraldo/Downloads/Silverlight* .
$ wine Silverlight.exe # Now install 32-bit Silverlight.

5. Then I launched Firefox for Windows again to configure the User Agent:

$ env WINEPREFIX="/home/fitzcarraldo/.wine-firefox" WINEARCH="win32" wine /home/fitzcarraldo/.wine-firefox/drive_c/Program\ Files/Mozilla\ Firefox/firefox.exe

I entered ‘about:config‘ (without the quotes) in the Address bar and added a new preference named general.useragent.override containing the following string (it is a User Agent string for Microsoft Internet Explorer 10.6 in 32-bit Windows 7):

Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0

N.B. This is the user agent string I used to get a specific office’s Intranet Web site that uses Silverlight to load in the Firefox 30.0 for Windows browser. You may need to use a different user agent string for the particular Web site you want to load. Use a search engine to search the Web for suitable user agent strings for the specific Web site you wish to browse. I have seen various user agent strings given for Netflix, for example, so you may have to try several to find one that works for you.

Alternatively, rather than using about:config you could install a Firefox extension such as User Agent Switcher and the associated ‘useragentswitcher.xml‘ file (see the ‘Firefox UserAgent Switcher list’ reference above for details of how to install), which would allow you to add, edit and select user agent strings more easily. An alternative to User Agent Switcher is the Firefox extension User Agent Overrider which may give you better results than User Agent Switcher on some Web sites that use Silverlight. I have tried it and it enables me to view the Silverlight test pages on the Web (I selected ‘Windows / Firefox 29′ from the User Agent Overrider pull-down menu).

6. I also made sure that plugins.click_to_play is set to ‘true’ (it should be by default) and I gave permission to Firefox to use the Silverlight plug-in on the relevant Web site I wish to use (Open menu > Add-ons > Plugins). See ‘Issues related to plugins – 4.1 Click to Play in Mozilla browser versions 23 and above‘ on the mozillaZine Website and ‘How to always activate a plugin for a trusted website‘ on the Mozilla Support Website.

Launching Firefox for Windows correctly in Linux

To launch Firefox for Windows from the command line you will need to enter either of the following commands:

$ env WINEPREFIX="/home/fitzcarraldo/.wine-firefox" WINEARCH="win32" wine /home/fitzcarraldo/.wine-firefox/drive_c/Program\ Files/Mozilla\ Firefox/firefox.exe

$ env WINEPREFIX="/home/fitzcarraldo/.wine-firefox" WINEARCH="win32" wine C:\\windows\\command\\start.exe /Unix /home/fitzcarraldo/.wine-firefox/dosdevices/c:/users/Public/Start\ Menu/Programs/Mozilla\ Firefox.lnk

Alternatively, you can set up a Desktop Configuration File (.desktop file) on your Desktop and/or an entry in the Desktop Environment’s launcher menu. In my case, WINE took care of doing both of those during the installation of Firefox for Windows, and it used the standard Firefox icon. I just needed to edit the entry’s command for launching Firefox, to make it match one of the commands listed above.

Postscript

Regarding the file Silverlight.exe:Zone.Identifier that was downloaded when I downloaded the Silverlight installer (Silverlight.exe), I had never come across such a file type before but have now found out what it is:

File that contains metadata describing the security zones associated with another file; generated automatically when a file is downloaded from the Internet or received as an email attachment; often created by Internet Explorer.

See the article .ZONE.IDENTIFIER File Extension for details.

You can therefore forget about the Silverlight.exe:Zone.Identifier file (if one even exists in your case). The important thing is to download the Silverlight installer, which is a single .exe file.

Where have my Konqueror favicons gone?

I upgraded to KDE 4.13.0 recently only to find that Konqueror no longer displayed some of the favicons, neither in the Bookmarks menu nor in the URL address bar. It seems this is a known KDE bug first reported in 2007 (Bug 153049 – Konqueror from KDE4 doesn’t load some favicons) although apparently it does not affect many users, which is why it still has not been fixed, I suppose.

In 2010 a KDE user reported in the KDE Community Forums thread Konqueror favicons again the steps he used to fix the problem in his installation, but he did not give the precise file names and paths of the files he deleted. In any case, I did not fancy deleting any sockets.

I tried various things, such as exporting and reimporting bookmarks in Konqueror, but was unable to get the missing favicons to display again. In the end I accepted I would have to lose all my bookmarks and decided to reinstall Konqueror. However, not all files are removed when a package is uninstalled, so I made sure everything was gone as follows:

1. Uninstall Konqueror

# emerge -C konqueror

2. Delete left-over directories and files relating to Konqueror

# rm -rf /home/fitzcarraldo/.kde4/share/apps/konqueror/
# rm /home/fitzcarraldo/.kde4/share/config/konq*

3. Log out of KDE and switch to a VT (virtual terminal, a.k.a. console)

# rm /var/tmp/kdecache-fitzcarraldo/favicons/*
# rm /var/tmp/kdecache-fitzcarraldo/icon-cache.kcache

4. Log in to KDE again and re-install Konqueror

# emerge -1v konqueror

5. Launch Konqueror and bookmark all your favourite Web sites.

That will get favicons working again in Konqueror, but what a hassle. KDE developers, please fix this old bug (no. 153049)!

Using KWrite to find and replace a character with a CRLF (Carriage Return/Line Feed)

Occasionally I need to edit a long string and replace the space character with a CRLF and some text. Even though I was sure the KDE editor KWrite could do that, I had never bothered to find out how. Today I finally bit the bullet. It’s not difficult, of course. To show you how it is done, I’ll give an actual example…

I wanted to edit in KWrite the single line of text shown below. (Not that it’s relevant to the subject of this post, but the line was a command to the Gentoo package manager to install a long list of packages, and I wanted to split it into separate commands in order to install each package individually.)

emerge -vD1 --backtrack=30 media-video/dvdrip:0 dev-vcs/git:0 dev-vcs/subversion:0 net-print/foomatic-db-engine:0 app-antivirus/clamtk:0 dev-perl/XML-SAX:0 dev-perl/X11-Protocol:0 dev-perl/Goo-Canvas:0 dev-perl/Readonly:0 dev-perl/File-Find-Rule:0 dev-perl/Net-SSLeay:0 dev-perl/XML-LibXML:0 dev-perl/HTTP-Message:0 dev-perl/Digest-SHA1:0 dev-perl/XML-XPath:0 dev-perl/File-Which:0 dev-perl/Authen-SASL:0 dev-perl/glib-perl:0 dev-perl/prefork:0 dev-perl/IO-Socket-SSL:0 dev-perl/Exception-Class:0 dev-perl/Proc-Simple:0 dev-perl/WWW-Mechanize:0 dev-perl/gnome2-canvas:0 dev-perl/gnome2-vfs-perl:0 dev-perl/IO-String:0 dev-perl/HTML-Tagset:0 dev-perl/Carp-Clan:0 dev-perl/Pod-Spell:0 dev-perl/Sane:0 dev-perl/TermReadKey:0 dev-perl/HTTP-Date:0 dev-perl/Encode-Locale:0 dev-perl/Event-RPC:0 dev-perl/File-HomeDir:0 dev-perl/Bit-Vector:0 dev-perl/gnome2-wnck:0 dev-perl/File-Copy-Recursive:0 dev-perl/Text-Unidecode:0 dev-perl/Unicode-EastAsianWidth:0 dev-perl/extutils-pkgconfig:0 dev-perl/Clone:0 dev-perl/Event-ExecFlow:0 dev-perl/B-Keywords:0 dev-perl/PDF-API2:0 dev-perl/HTTP-Negotiate:0 dev-perl/HTML-Form:0 dev-perl/extutils-depends:0 dev-perl/PlRPC:0 dev-perl/libwww-perl:0 dev-perl/gtk2-perl:0 dev-perl/File-MimeInfo:0 dev-perl/Font-TTF:0 dev-perl/libintl-perl:0 dev-perl/List-MoreUtils:0 dev-perl/Log-Log4perl:0 dev-perl/XML-DOM:0 dev-perl/HTML-Parser:0 dev-perl/Try-Tiny:0 dev-perl/XML-Twig:0 dev-perl/Gtk2-Ex-Simple-List:0 dev-perl/LWP-MediaTypes:0 dev-perl/LWP-Protocol-https:0 dev-perl/XML-Simple:0 dev-perl/Pango:0 dev-perl/set-scalar:0 dev-perl/Gtk2-Unique:0 dev-perl/Params-Util:0 dev-perl/Net-Daemon:0 dev-perl/GSSAPI:0 dev-perl/XML-NamespaceSupport:0 dev-perl/PPI:0 dev-perl/Proc-ProcessTable:0 dev-perl/String-Format:0 dev-perl/Date-Calc:0 dev-perl/XML-Parser:0 dev-perl/Email-Address:0 dev-perl/Class-Data-Inheritable:0 dev-perl/Email-Simple:0 dev-perl/JSON:0 dev-perl/gnome2-perl:0 dev-perl/XML-SAX-Base:0 dev-perl/Net-SMTP-SSL:0 dev-perl/Gtk2-ImageView:0 dev-perl/IO-HTML:0 dev-perl/WWW-RobotRules:0 dev-perl/Digest-HMAC:0 dev-perl/HTTP-Cookies:0 dev-perl/DBI:0 dev-perl/URI:0 dev-perl/Text-Iconv:0 dev-perl/gtk2-ex-formfactory:0 dev-perl/Email-Date-Format:0 dev-perl/libxml-perl:0 dev-perl/XML-SAX-Writer:0 dev-perl/XML-Filter-BufferText:0 dev-perl/Number-Compare:0 dev-perl/XML-RegExp:0 dev-perl/Email-LocalDelivery:0 dev-perl/config-general:0 dev-perl/HTTP-Daemon:0 dev-perl/File-Listing:0 dev-perl/Devel-StackTrace:0 dev-perl/Set-IntSpan:0 dev-perl/Cairo:0 dev-perl/Email-FolderType:0 dev-perl/XML-Handler-YAWriter:0 dev-perl/Archive-Zip:0 dev-perl/Net-DBus:0 dev-perl/DBD-mysql:0 dev-perl/AnyEvent:0 dev-perl/perltidy:0 dev-perl/Locale-gettext:0 dev-perl/Sort-Naturally:0 dev-perl/Net-HTTP:0 dev-perl/Perl-Critic:0 media-gfx/gscan2pdf:0 media-libs/exiftool:0 perl-core/CPAN-Meta-Requirements:0 virtual/perl-CPAN-Meta-Requirements:0 perl-core/IPC-Cmd:0 virtual/perl-IPC-Cmd:0 perl-core/Storable:0 virtual/perl-Storable:0 perl-core/File-Spec:0 virtual/perl-File-Spec:0 perl-core/CPAN-Meta:0 virtual/perl-CPAN-Meta:0 perl-core/Getopt-Long:0 virtual/perl-Getopt-Long:0 perl-core/Locale-Maketext-Simple:0 virtual/perl-Locale-Maketext-Simple:0 perl-core/ExtUtils-Manifest:0 virtual/perl-ExtUtils-Manifest:0 perl-core/Pod-Simple:0 virtual/perl-Pod-Simple:0 perl-core/CPAN-Meta-YAML:0 virtual/perl-CPAN-Meta-YAML:0 perl-core/Encode:0 virtual/perl-Encode:0 perl-core/Compress-Raw-Bzip2:0 virtual/perl-Compress-Raw-Bzip2:0 perl-core/Module-Load:0 virtual/perl-Module-Load:0 perl-core/Archive-Tar:0 virtual/perl-Archive-Tar:0 perl-core/Scalar-List-Utils:0 virtual/perl-Scalar-List-Utils:0 perl-core/ExtUtils-CBuilder:0 virtual/perl-ExtUtils-CBuilder:0 perl-core/Parse-CPAN-Meta:0 virtual/perl-Parse-CPAN-Meta:0 perl-core/version:0 virtual/perl-version:0 perl-core/Digest-SHA:0 virtual/perl-Digest-SHA:0 perl-core/Module-Load-Conditional:0 virtual/perl-Module-Load-Conditional:0 perl-core/Compress-Raw-Zlib:0 virtual/perl-Compress-Raw-Zlib:0 perl-core/ExtUtils-Install:0 virtual/perl-ExtUtils-Install:0 perl-core/IO:0 virtual/perl-IO:0 perl-core/Time-Local:0 virtual/perl-Time-Local:0 perl-core/Module-CoreList:0 virtual/perl-Module-CoreList:0 perl-core/Digest-MD5:0 virtual/perl-Digest-MD5:0 perl-core/JSON-PP:0 virtual/perl-JSON-PP:0 perl-core/ExtUtils-ParseXS:0 virtual/perl-ExtUtils-ParseXS:0 perl-core/File-Temp:0 virtual/perl-File-Temp:0 perl-core/Params-Check:0 virtual/perl-Params-Check:0 perl-core/Module-Metadata:0 virtual/perl-Module-Metadata:0 perl-core/Sys-Syslog:0 virtual/perl-Sys-Syslog:0 perl-core/IO-Compress:0 virtual/perl-IO-Compress:0 perl-core/Test-Harness:0 virtual/perl-Test-Harness:0

With the above line of text in a KWrite window, I did the following:

1. I selected Edit > Replace… from the KWrite menu.

2. At the bottom of the KWrite window, I changed the Mode from ‘Plain text’ to ‘Regular expression’.

3. I clicked in the ‘Find’ box and pressed the Space bar to enter a space character.

4. I clicked in the ‘Replace’ box and entered the following text (note that there is ‘\n’ at the beginning and a space at the end):

\nemerge -vD1 --backtrack=30 

The ‘\n‘ represents a CRLF (Carriage Return plus Line Feed).

5. I ticked ‘Selection only’.

6. With the mouse I selected the text in which I wanted to make the replacement, i.e. I selected from (and including) the space following the first package (media-video/dvdrip:0) all the way to the end of the line.

7. I clicked on ‘Replace All’.

The result looked like this:

emerge -vD1 --backtrack=30 media-video/dvdrip:0
emerge -vD1 --backtrack=30 dev-vcs/git:0
emerge -vD1 --backtrack=30 dev-vcs/subversion:0
emerge -vD1 --backtrack=30 net-print/foomatic-db-engine:0
emerge -vD1 --backtrack=30 app-antivirus/clamtk:0
emerge -vD1 --backtrack=30 dev-perl/XML-SAX:0
emerge -vD1 --backtrack=30 dev-perl/X11-Protocol:0
emerge -vD1 --backtrack=30 dev-perl/Goo-Canvas:0
emerge -vD1 --backtrack=30 dev-perl/Readonly:0
emerge -vD1 --backtrack=30 dev-perl/File-Find-Rule:0
emerge -vD1 --backtrack=30 dev-perl/Net-SSLeay:0
emerge -vD1 --backtrack=30 dev-perl/XML-LibXML:0
emerge -vD1 --backtrack=30 dev-perl/HTTP-Message:0
emerge -vD1 --backtrack=30 dev-perl/Digest-SHA1:0
emerge -vD1 --backtrack=30 dev-perl/XML-XPath:0
emerge -vD1 --backtrack=30 dev-perl/File-Which:0
emerge -vD1 --backtrack=30 dev-perl/Authen-SASL:0
emerge -vD1 --backtrack=30 dev-perl/glib-perl:0
emerge -vD1 --backtrack=30 dev-perl/prefork:0
emerge -vD1 --backtrack=30 dev-perl/IO-Socket-SSL:0
emerge -vD1 --backtrack=30 dev-perl/Exception-Class:0
emerge -vD1 --backtrack=30 dev-perl/Proc-Simple:0
emerge -vD1 --backtrack=30 dev-perl/WWW-Mechanize:0
emerge -vD1 --backtrack=30 dev-perl/gnome2-canvas:0
emerge -vD1 --backtrack=30 dev-perl/gnome2-vfs-perl:0
emerge -vD1 --backtrack=30 dev-perl/IO-String:0
emerge -vD1 --backtrack=30 dev-perl/HTML-Tagset:0
emerge -vD1 --backtrack=30 dev-perl/Carp-Clan:0
emerge -vD1 --backtrack=30 dev-perl/Pod-Spell:0
emerge -vD1 --backtrack=30 dev-perl/Sane:0
emerge -vD1 --backtrack=30 dev-perl/TermReadKey:0
emerge -vD1 --backtrack=30 dev-perl/HTTP-Date:0
emerge -vD1 --backtrack=30 dev-perl/Encode-Locale:0
emerge -vD1 --backtrack=30 dev-perl/Event-RPC:0
emerge -vD1 --backtrack=30 dev-perl/File-HomeDir:0
emerge -vD1 --backtrack=30 dev-perl/Bit-Vector:0
emerge -vD1 --backtrack=30 dev-perl/gnome2-wnck:0
emerge -vD1 --backtrack=30 dev-perl/File-Copy-Recursive:0
emerge -vD1 --backtrack=30 dev-perl/Text-Unidecode:0
emerge -vD1 --backtrack=30 dev-perl/Unicode-EastAsianWidth:0
emerge -vD1 --backtrack=30 dev-perl/extutils-pkgconfig:0
emerge -vD1 --backtrack=30 dev-perl/Clone:0
emerge -vD1 --backtrack=30 dev-perl/Event-ExecFlow:0
emerge -vD1 --backtrack=30 dev-perl/B-Keywords:0
emerge -vD1 --backtrack=30 dev-perl/PDF-API2:0
emerge -vD1 --backtrack=30 dev-perl/HTTP-Negotiate:0
emerge -vD1 --backtrack=30 dev-perl/HTML-Form:0
emerge -vD1 --backtrack=30 dev-perl/extutils-depends:0
emerge -vD1 --backtrack=30 dev-perl/PlRPC:0
emerge -vD1 --backtrack=30 dev-perl/libwww-perl:0
emerge -vD1 --backtrack=30 dev-perl/gtk2-perl:0
emerge -vD1 --backtrack=30 dev-perl/File-MimeInfo:0
emerge -vD1 --backtrack=30 dev-perl/Font-TTF:0
emerge -vD1 --backtrack=30 dev-perl/libintl-perl:0
emerge -vD1 --backtrack=30 dev-perl/List-MoreUtils:0
emerge -vD1 --backtrack=30 dev-perl/Log-Log4perl:0
emerge -vD1 --backtrack=30 dev-perl/XML-DOM:0
emerge -vD1 --backtrack=30 dev-perl/HTML-Parser:0
emerge -vD1 --backtrack=30 dev-perl/Try-Tiny:0
emerge -vD1 --backtrack=30 dev-perl/XML-Twig:0
emerge -vD1 --backtrack=30 dev-perl/Gtk2-Ex-Simple-List:0
emerge -vD1 --backtrack=30 dev-perl/LWP-MediaTypes:0
emerge -vD1 --backtrack=30 dev-perl/LWP-Protocol-https:0
emerge -vD1 --backtrack=30 dev-perl/XML-Simple:0
emerge -vD1 --backtrack=30 dev-perl/Pango:0
emerge -vD1 --backtrack=30 dev-perl/set-scalar:0
emerge -vD1 --backtrack=30 dev-perl/Gtk2-Unique:0
emerge -vD1 --backtrack=30 dev-perl/Params-Util:0
emerge -vD1 --backtrack=30 dev-perl/Net-Daemon:0
emerge -vD1 --backtrack=30 dev-perl/GSSAPI:0
emerge -vD1 --backtrack=30 dev-perl/XML-NamespaceSupport:0
emerge -vD1 --backtrack=30 dev-perl/PPI:0
emerge -vD1 --backtrack=30 dev-perl/Proc-ProcessTable:0
emerge -vD1 --backtrack=30 dev-perl/String-Format:0
emerge -vD1 --backtrack=30 dev-perl/Date-Calc:0
emerge -vD1 --backtrack=30 dev-perl/XML-Parser:0
emerge -vD1 --backtrack=30 dev-perl/Email-Address:0
emerge -vD1 --backtrack=30 dev-perl/Class-Data-Inheritable:0
emerge -vD1 --backtrack=30 dev-perl/Email-Simple:0
emerge -vD1 --backtrack=30 dev-perl/JSON:0
emerge -vD1 --backtrack=30 dev-perl/gnome2-perl:0
emerge -vD1 --backtrack=30 dev-perl/XML-SAX-Base:0
emerge -vD1 --backtrack=30 dev-perl/Net-SMTP-SSL:0
emerge -vD1 --backtrack=30 dev-perl/Gtk2-ImageView:0
emerge -vD1 --backtrack=30 dev-perl/IO-HTML:0
emerge -vD1 --backtrack=30 dev-perl/WWW-RobotRules:0
emerge -vD1 --backtrack=30 dev-perl/Digest-HMAC:0
emerge -vD1 --backtrack=30 dev-perl/HTTP-Cookies:0
emerge -vD1 --backtrack=30 dev-perl/DBI:0
emerge -vD1 --backtrack=30 dev-perl/URI:0
emerge -vD1 --backtrack=30 dev-perl/Text-Iconv:0
emerge -vD1 --backtrack=30 dev-perl/gtk2-ex-formfactory:0
emerge -vD1 --backtrack=30 dev-perl/Email-Date-Format:0
emerge -vD1 --backtrack=30 dev-perl/libxml-perl:0
emerge -vD1 --backtrack=30 dev-perl/XML-SAX-Writer:0
emerge -vD1 --backtrack=30 dev-perl/XML-Filter-BufferText:0
emerge -vD1 --backtrack=30 dev-perl/Number-Compare:0
emerge -vD1 --backtrack=30 dev-perl/XML-RegExp:0
emerge -vD1 --backtrack=30 dev-perl/Email-LocalDelivery:0
emerge -vD1 --backtrack=30 dev-perl/config-general:0
emerge -vD1 --backtrack=30 dev-perl/HTTP-Daemon:0
emerge -vD1 --backtrack=30 dev-perl/File-Listing:0
emerge -vD1 --backtrack=30 dev-perl/Devel-StackTrace:0
emerge -vD1 --backtrack=30 dev-perl/Set-IntSpan:0
emerge -vD1 --backtrack=30 dev-perl/Cairo:0
emerge -vD1 --backtrack=30 dev-perl/Email-FolderType:0
emerge -vD1 --backtrack=30 dev-perl/XML-Handler-YAWriter:0
emerge -vD1 --backtrack=30 dev-perl/Archive-Zip:0
emerge -vD1 --backtrack=30 dev-perl/Net-DBus:0
emerge -vD1 --backtrack=30 dev-perl/DBD-mysql:0
emerge -vD1 --backtrack=30 dev-perl/AnyEvent:0
emerge -vD1 --backtrack=30 dev-perl/perltidy:0
emerge -vD1 --backtrack=30 dev-perl/Locale-gettext:0
emerge -vD1 --backtrack=30 dev-perl/Sort-Naturally:0
emerge -vD1 --backtrack=30 dev-perl/Net-HTTP:0
emerge -vD1 --backtrack=30 dev-perl/Perl-Critic:0
emerge -vD1 --backtrack=30 media-gfx/gscan2pdf:0
emerge -vD1 --backtrack=30 media-libs/exiftool:0
emerge -vD1 --backtrack=30 perl-core/CPAN-Meta-Requirements:0
emerge -vD1 --backtrack=30 virtual/perl-CPAN-Meta-Requirements:0
emerge -vD1 --backtrack=30 perl-core/IPC-Cmd:0
emerge -vD1 --backtrack=30 virtual/perl-IPC-Cmd:0
emerge -vD1 --backtrack=30 perl-core/Storable:0
emerge -vD1 --backtrack=30 virtual/perl-Storable:0
emerge -vD1 --backtrack=30 perl-core/File-Spec:0
emerge -vD1 --backtrack=30 virtual/perl-File-Spec:0
emerge -vD1 --backtrack=30 perl-core/CPAN-Meta:0
emerge -vD1 --backtrack=30 virtual/perl-CPAN-Meta:0
emerge -vD1 --backtrack=30 perl-core/Getopt-Long:0
emerge -vD1 --backtrack=30 virtual/perl-Getopt-Long:0
emerge -vD1 --backtrack=30 perl-core/Locale-Maketext-Simple:0
emerge -vD1 --backtrack=30 virtual/perl-Locale-Maketext-Simple:0
emerge -vD1 --backtrack=30 perl-core/ExtUtils-Manifest:0
emerge -vD1 --backtrack=30 virtual/perl-ExtUtils-Manifest:0
emerge -vD1 --backtrack=30 perl-core/Pod-Simple:0
emerge -vD1 --backtrack=30 virtual/perl-Pod-Simple:0
emerge -vD1 --backtrack=30 perl-core/CPAN-Meta-YAML:0
emerge -vD1 --backtrack=30 virtual/perl-CPAN-Meta-YAML:0
emerge -vD1 --backtrack=30 perl-core/Encode:0
emerge -vD1 --backtrack=30 virtual/perl-Encode:0
emerge -vD1 --backtrack=30 perl-core/Compress-Raw-Bzip2:0
emerge -vD1 --backtrack=30 virtual/perl-Compress-Raw-Bzip2:0
emerge -vD1 --backtrack=30 perl-core/Module-Load:0
emerge -vD1 --backtrack=30 virtual/perl-Module-Load:0
emerge -vD1 --backtrack=30 perl-core/Archive-Tar:0
emerge -vD1 --backtrack=30 virtual/perl-Archive-Tar:0
emerge -vD1 --backtrack=30 perl-core/Scalar-List-Utils:0
emerge -vD1 --backtrack=30 virtual/perl-Scalar-List-Utils:0
emerge -vD1 --backtrack=30 perl-core/ExtUtils-CBuilder:0
emerge -vD1 --backtrack=30 virtual/perl-ExtUtils-CBuilder:0
emerge -vD1 --backtrack=30 perl-core/Parse-CPAN-Meta:0
emerge -vD1 --backtrack=30 virtual/perl-Parse-CPAN-Meta:0
emerge -vD1 --backtrack=30 perl-core/version:0
emerge -vD1 --backtrack=30 virtual/perl-version:0
emerge -vD1 --backtrack=30 perl-core/Digest-SHA:0
emerge -vD1 --backtrack=30 virtual/perl-Digest-SHA:0
emerge -vD1 --backtrack=30 perl-core/Module-Load-Conditional:0
emerge -vD1 --backtrack=30 virtual/perl-Module-Load-Conditional:0
emerge -vD1 --backtrack=30 perl-core/Compress-Raw-Zlib:0
emerge -vD1 --backtrack=30 virtual/perl-Compress-Raw-Zlib:0
emerge -vD1 --backtrack=30 perl-core/ExtUtils-Install:0
emerge -vD1 --backtrack=30 virtual/perl-ExtUtils-Install:0
emerge -vD1 --backtrack=30 perl-core/IO:0
emerge -vD1 --backtrack=30 virtual/perl-IO:0
emerge -vD1 --backtrack=30 perl-core/Time-Local:0
emerge -vD1 --backtrack=30 virtual/perl-Time-Local:0
emerge -vD1 --backtrack=30 perl-core/Module-CoreList:0
emerge -vD1 --backtrack=30 virtual/perl-Module-CoreList:0
emerge -vD1 --backtrack=30 perl-core/Digest-MD5:0
emerge -vD1 --backtrack=30 virtual/perl-Digest-MD5:0
emerge -vD1 --backtrack=30 perl-core/JSON-PP:0
emerge -vD1 --backtrack=30 virtual/perl-JSON-PP:0
emerge -vD1 --backtrack=30 perl-core/ExtUtils-ParseXS:0
emerge -vD1 --backtrack=30 virtual/perl-ExtUtils-ParseXS:0
emerge -vD1 --backtrack=30 perl-core/File-Temp:0
emerge -vD1 --backtrack=30 virtual/perl-File-Temp:0
emerge -vD1 --backtrack=30 perl-core/Params-Check:0
emerge -vD1 --backtrack=30 virtual/perl-Params-Check:0
emerge -vD1 --backtrack=30 perl-core/Module-Metadata:0
emerge -vD1 --backtrack=30 virtual/perl-Module-Metadata:0
emerge -vD1 --backtrack=30 perl-core/Sys-Syslog:0
emerge -vD1 --backtrack=30 virtual/perl-Sys-Syslog:0
emerge -vD1 --backtrack=30 perl-core/IO-Compress:0
emerge -vD1 --backtrack=30 virtual/perl-IO-Compress:0
emerge -vD1 --backtrack=30 perl-core/Test-Harness:0
emerge -vD1 --backtrack=30 virtual/perl-Test-Harness:0

That’s all there is to it. :-)

Work-around if 64-bit Google Earth crashes in Gentoo Linux

Google Earth 5.2.1.1588 was the last version of Google Earth for Linux that worked on my main laptop running 64-bit Gentoo Linux. Even the Panoramio photos were displayed (a common complaint amongst users of Google Earth for Linux). But every subsequent version crashed when I launched it. The latest version, 7.1.2.2041, is no exception:

$ googleearth
[0403/012031:ERROR:net_util.cc(2195)] Not implemented reached in bool net::HaveOnlyLoopbackAddresses()
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:WARNING:backend_impl.cc(1875)] Destroying invalid entry.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[0403/012033:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
Google Earth has caught signal 11.



We apologize for the inconvenience, but Google Earth has crashed.
This is a bug in the program, and should never happen under normal
circumstances. A bug report and debugging data have been written
to this text file:

/home/fitzcarraldo/.googleearth/crashlogs/crashlog-533ca953.txt

Please include this file if you submit a bug report to Google.

Now, the Google Earth installation package bundles the libraries it needs, so they are used instead of the ‘native’ libraries installed on your machine. A Linux user going by the moniker amirpli worked out how to enable Google Earth for Linux to use the native Qt libraries rather than the Qt libraries bundled with Google Earth, and posted instructions for a number of distributions (see, for example, Comment 9 in Gentoo Bugzilla Bug Report No. 490066). However, even if I apply amirpli‘s fix, Google Earth on my main laptop crashed with almost the same error message as above. Looking through the crash log file that Google Earth generates, I see the following line, which makes me suspect that Google Earth cannot work with the closed-source AMD ATI Catalyst driver (a.k.a. FGLRX):

./libbase.so(_ZN5earth15GfxCardInfoUnix25GetGraphicsCardMemoryInMBERi+0xe)[0x7f011b3e654e]

I noticed a few posts by users of other distributions in various forums saying that they had installed the 32-bit version of Google Earth in their 64-bit (multilib) installations, so I decided to try that in Gentoo. I hacked the ebuild of version 7.1.2.2041 to force it to install the 32-bit version of Google Earth on my 64-bit multilib installation, and installed it via a local overlay.

The hacked ebuild has the following changes from the stock 7.1.2.2041 ebuild:

a) Replace:

SRC_URI="x86? ( http://dl.google.com/dl/earth/client/current/google-earth-stable_current_i386.deb
                       -> GoogleEarthLinux-${PV}_i386.deb )
       amd64? ( http://dl.google.com/dl/earth/client/current/google-earth-stable_current_amd64.deb
                       -> GoogleEarthLinux-${PV}_amd64.deb )"

with:

SRC_URI="http://dl.google.com/dl/earth/client/current/google-earth-stable_current_i386.deb
                       -> GoogleEarthLinux-${PV}_i386.deb"


b) Replace:

unpack_deb GoogleEarthLinux-${PV}_$(usex amd64 "amd64" "i386").deb

with:

unpack_deb GoogleEarthLinux-${PV}_i386.deb


c) Replace:

patchelf --set-interpreter /lib/ld-linux$(usex amd64 "-x86-64" "").so.2 ${PN}-bin || die "patchelf failed"

with:

patchelf --set-interpreter /lib/ld-linux.so.2 ${PN}-bin || die "patchelf failed"


If you have not used a local overlay before, it is not difficult — just follow the steps given below.

1. If you have not done it before, tell Portage the location of the local overlay:

# echo 'PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"' >> /etc/make.conf

2. If you have not done it before, give your local overlay a name:

# mkdir /usr/local/portage/profiles
# echo "local_overlay" > /usr/local/portage/profiles/repo_name

3. Create the directories for the local overlay’s Google Earth ebuild and its associated files:

# mkdir -p /usr/local/portage/sci-geosciences/googleearth/files

4. Uninstall the non-functioning 64-bit version of Google Earth that you installed from the Portage main tree:

# emerge -C googleearth

5. Copy the main tree’s ebuild and associated files to the local overlay and edit the ebuild as per the changes I listed above:

# cp /usr/portage/sci-geosciences/googleearth/googleearth-7.1.2.2041.ebuild /usr/local/portage/sci-geosciences/googleearth/
# cp /usr/portage/sci-geosciences/googleearth/files/* /usr/local/portage/sci-geosciences/googleearth/files/
# cd /usr/local/portage/sci-geosciences/googleearth/
# nano googleearth-7.1.2.2041.ebuild

6. Create the manifest for the ebuild and associated files:

# ebuild googleearth-7.1.2.2041.ebuild manifest

7. Finally, install the package:

# emerge googleearth::local_overlay

The 32-bit version of Google Earth works fine in my 64-bit multilib installation, although the Panoramio photos are not displayed, but then Linux users are used to that :-/. Come on Google, you can do better than this!

Installing the Windows version of Google Earth in WINE

Some Gentoo Linux users have reported that, although the native Linux release of Google Earth crashes, they can run the Windows version successfully under WINE. However, those users have also reported that the Windows installer for Google Earth did not work under WINE and so they copied the C:\Program Files\Google\Google Earth\ directory from a Windows PC to the virtual C:\ drive in their .wine directory (it would be ‘Program Files (x86)‘ in a 64-bit Windows installation, as Google Earth is a 32-bit application).

Now, if you download the Windows Google Earth installer from the Google Web site, what you get is a file GoogleEarthWin.exe that is 534.6 KiB in size (the size may vary depending on the release). However, you can instead download the Offline Installer using the following URL:

http://dl.google.com/earth/client/advanced/current/GoogleEarthWin.exe

and then you get a file GoogleEarthWin.exe that is 24.3 MiB in size (the size will vary depending on the release), which does run in WINE and does install the Windows version of Google Earth in WINE.

So, you might like to try that if you cannot run Google Earth in Linux but you have WINE installed. However, note that you will be wasting your time if the native Linux version of Google Earth crashes because of its incompatibility with the closed-source ATI or NVIDIA video driver. For example, Google Earth 7.1.2.2041 for Linux crashes on my main laptop using the 14.3_beta version of ati-drivers (AMD ATI Catalyst driver, a.k.a. FGLRX).

Anyway, if you want to install the Windows release of Google Earth under WINE here’s how to do it in a Konsole/Terminal window:

$ cd
$ export WINEPREFIX=$HOME/.wine-googleearth
$ export WINEARCH="win32"
$ winecfg
$ cd ./.wine-googleearth/drive_c/
$ wget http://dl.google.com/earth/client/advanced/current/GoogleEarthWin.exe
$ wine GoogleEarthWin.exe

And, to run it later:

$ env WINEPREFIX="/home/fitzcarraldo/.wine-googleearth" WINEARCH="win32" wine C:\\windows\\command\\start.exe /Unix /home/fitzcarraldo/.wine-googleearth/dosdevices/c:/users/fitzcarraldo/Start\ Menu/Programs/Google\ Earth/Google\ Earth.lnk

(Of course replace “fitzcarraldo” with your user name.)

But, as I wrote above, if the native Linux version of Google Earth crashes due to its incompatibility with the closed-source video driver (ATI or NVIDIA), it is highly unlikely the native Windows version will work under WINE.

Bypassing a corporate Web filter when using the command line

or ‘How to bypass a corporate Web filter and download YouTube videos via the command line’

One of the offices where I work uses a Web filter to block access to certain sites, such as YouTube. However, sometimes it is necessary to view blocked Web sites for work purposes. For example, these days a lot of companies or individuals post product reviews on YouTube that are useful for work purposes. In such cases I have used Tor to access the blocked sites in a Web browser such as Firefox, Chrome, Konqueror etc. See my post How to install and use Tor for anonymous browsing or to access country-restricted content from another country for details of how to set up and use Tor with a Web browser.

But sometimes I need to access blocked Web sites from the command line. For example, today I needed to download a YouTube video for work purposes, and I wanted to use youtube-dl to do it. The solution was simple…

First I launched vidalia and polipo as explained in the above-mentioned post on Tor, then I launched another Konsole/Terminal window and entered the commands shown below:

$ # First find out what resolutions are available for the video I want to download:
$ youtube-dl -F https://www.youtube.com/watch?v=T3Rr4CUoTSQ
Setting language
T3Rr4CUoTSQ: Downloading webpage
T3Rr4CUoTSQ: Downloading video info webpage
T3Rr4CUoTSQ: Extracting video information
[info] Available formats for T3Rr4CUoTSQ:
format code extension resolution note
140 m4a audio only DASH audio , audio@128k (worst)
160 mp4 192p DASH video
133 mp4 240p DASH video
134 mp4 360p DASH video
135 mp4 480p DASH video
136 mp4 720p DASH video
17 3gp 176x144
36 3gp 320x240
5 flv 400x240
43 webm 640x360
18 mp4 640x360
22 mp4 1280x720 (best)
$ # Now try to download the video at the resolution I want:
$ youtube-dl -f 22 -o Clevo_W230ST_overview.flv https://www.youtube.com/watch?v=T3Rr4CUoTSQ
Setting language
T3Rr4CUoTSQ: Downloading webpage
T3Rr4CUoTSQ: Downloading video info webpage
T3Rr4CUoTSQ: Extracting video information
ERROR: unable to download video data: HTTP Error 403: Forbidden

As you can see above, the corporate Web filter blocked youtube-dl from downloading the video.

So I informed the shell session about the local HTTP proxy (polipo) running on my laptop, by assigning and exporting the environment variable http_proxy using the following syntax:

export http_proxy=http://server-ip:port/

which in my case meant the following (refer to my article on Tor):

$ export http_proxy=http://127.0.0.1:8123/

and then I was able to download the video from YouTube despite the corporate Web filter:

$ youtube-dl -f 22 -o Clevo_W230ST_overview.flv https://www.youtube.com/watch?v=T3Rr4CUoTSQ
Setting language
T3Rr4CUoTSQ: Downloading webpage
T3Rr4CUoTSQ: Downloading video info webpage
T3Rr4CUoTSQ: Extracting video information
[download] Destination: Clevo_W230ST_overview.flv
[download] 100% of 100.23MiB in 05:50
$

Useful Reference: How To Use Proxy Server To Access Internet at Shell Prompt With http_proxy Variable

Can Linux cope with 24 Hours of Happy?

I enjoyed Pharrell Williams’ feel-good songs in ‘Despicable Me‘ and its sequel, ‘Despicable Me 2‘. ‘Happy‘, a very catchy ditty he wrote for the sequel, also features in the World’s first 24-hour-long music video, ‘24 Hours of Happy‘, shot in and around Los Angeles and released on 21 November last year. The song is played a total of 360 times over the duration of the video, each 4-minute take featuring a different person or persons dancing (improvised) along streets, in petrol stations, through Union Station, in a church, around a school, in a moving school bus, around a supermarket, in a bowling alley, and so on. Each 4-minute performance was filmed in one take using Steadicam, and the location at the end of each take segues into the next take. You see the sun rise; you see the bright sunlight of the morning and the warm sunlight of the afternoon; you see the sun set; you see the twinkling city lights at night. The concept is simple yet brilliant.

Clips from some of the takes were used to create the 4-minute official music video for ‘Happy’, so you can watch that on YouTube to get a flavour of the takes, although it does not do justice to the full video.

Williams appears in a different take every hour on the hour, and a few other takes have celebrity cameos, but the vast majority of the participants are unknown extras of all ages, races, shapes, sizes and looks. To quote Williams talking to the Los Angeles Times: “We wanted all humanity in there, not just the model-types you might expect.” Some are good dancers, others not so good. But they all have one thing in common: they’re having fun, so they look good. The joy is infectious, and I found myself watching far longer than I would have expected, having to return to the site again and again. Half the fun is watching the bystanders.

When you open the ’24 Hours of Happy’ site, the take that was in progress at the current time of day starts playing from the beginning. However, you can drag the pointer around the clock dial and watch any take from the 24-hour period. There are also buttons you can click on to jump between takes or to jump to each take featuring Williams. The yellow on-screen controls can be made to disappear by not moving the mouse pointer for 5 seconds.

Still from 24 Hours of Happy, showing on-screen controls

Still from 24 Hours of Happy, showing on-screen controls

The Web site is well-designed and fun to use, so I was not surprised it was voted ‘Site of the Month‘ and ‘Site of the Year Users’ Choice‘ by AWWWARDS, and voted ‘Site of the Month‘ and ‘Site of the Year‘ by TheFWA.

It’s impossible to list them all, but a few of my favourite takes are:

01:36  Very perky woman with ponytail.
05:28  Jogger who has to keep pulling his shorts up!
08:24  Woman on roller skates.
09:52  Very cute little girl.
09:56  Woman with some groovy moves.
10:40  Woman in Union Station. Some of the bystanders are particularly amusing.
11:16  Man with cast on foot.
11:20  Boy with an Afro.
11:36  Three groovy old ladies.
11:44  Chubby guy with style.
12:36  Woman with some groovy moves.
13:32  Dancing couple in pink.
14:20  Two cool guys in dinner jackets inside and outside Union Station.
15:00  Pharrell Williams in a church with a gospel choir.
19:04  Woman with a lizard puppet. The lizard does the lip-synching!
19:36  Guy on stilts.
23:40  Woman with LED hula hoop (love it!).

If you want to start viewing a take made at a specific time of day, you can append the time to the URL, like so:

http://24hoursofhappy.com/09h53am

Obviously I think ’24 Hours of Happy’ is fabulous, but why am I discussing it in a blog predominantly about Linux? Because Firefox 27.0.1 (32-bit) running in Windows 8.1 (64-bit) on my new Acer Aspire XC-600 micro-tower PC (dual-core Intel Pentium G2030 @ 3 GHz & 3 MB cache, 4 GB DDR3 RAM) handles ’24 Hours of Happy’ at 720p with ease, but the story is very different on my main laptop running 64-bit Gentoo Linux with KDE (quad-core Intel Core i7 720QM @ 933 MHz & 6 MB cache, 4 GB DDR3 RAM). Both machines are on my home network, connected to the Internet via high-bandwidth broadband (FTTC).

On my laptop, the latest available versions of Firefox (27.0) and Opera (12.16_p1860-r1) for Gentoo, both 64-bit, do not even complete loading the ’24 Hours of Happy’ site: the black progress bar at the bottom of the home page stops about 7/8th of the way across the page and the KDE Network Monitor widget shows there is no network activity. Clearing Firefox’s Web content cache or increasing the cache’s size to 1 GB make no difference. Konqueror 4.12.2 (configured to use the WebKit browser engine rather than the KHTML engine) loads the site and plays it quite well at 720p to start with, but eventually video becomes choppy and I notice a lot of spawned kio_http processes. The KDE Network Monitor widget shows a continuous 3600 Kib/s data stream, which does not stop when I exit Konqueror. Numerous kio_http processes are spawned and remain after I exit Konqueror, and the 3600 KiB/s activity on the network only ceases when I kill all the kio_http processes. The number of spawned kio_http processes increases if I drag the pointer around the clock to select different takes, and the page just displays ‘LOADING’ ad infinitum if I do this several times. To be fair, if I do this a lot in Firefox running in Windows 8.1, I can get Firefox to stall too. I thought I’d try a lightweight browser and installed NetSurf (3.0-r1), but that couldn’t even render the title on the home page, let alone begin to load the video.

So, does ’24 Hours of Happy’ play nicely in your Linux installation? If it does, what hardware, distribution, desktop environment, browser and quality (360p, 480p, 720p or 1080p) are you using?

KDE Connect – Link your Android device to your KDE desktop

KDE Connect app icon on my Samsung Galaxy Note II

KDE Connect app icon on my Samsung Galaxy Note II

KDE Connect is a nice tool that links your Android phone or tablet seamlessly via WiFi to KDE on your PC (the latter can be connected via WiFi or cable to the network). It allows your KDE desktop to receive notifications, files and media player commands from your Android device. The available KDE Connect plug-ins are:

Battery report
Periodically report battery status

Clipboard sync
Share the clipboard content

Multimedia remote controls
Control audio/video from your phone
(pause; first track; previous track; next track; last track; change volume)

Notification sync
Access your notification from other devices

Ping
Send and receive pings

Telephony notifier
Send notifications from SMS and calls

You will need to install the Android KDE Connect application on your Android device, and the Linux KDE Connect application on your PC.

Install the KDE Connect app on your Android device from the Google Play Store. You will then see the KDE Connect icon on the apps screen of your Android device.

For Gentoo users an ebuild for KDE Connect is available in the Gentoo KDE team’s testing overlay, so here are the instructions on how to install KDE Connect on your PC from there.

Firstly, mask the KDE overlay so that none of the packages in it interferes with the KDE software you installed from the main Portage tree:

# echo "*/*::kde" >> /etc/portage/package.mask

Then unmask the KDE Connect package in the KDE overlay:

# echo "kde-misc/kdeconnect" >> /etc/portage/package.unmask

N.B. If /etc/portage/package.mask is a directory rather than a file (either is possible) in your installation, and if /etc/portage/package.unmask is a directory rather than a file (either is possible) in your installation, use the following commands instead of the above two commands:

# echo "*/*::kde" > /etc/portage/package.mask/kde_overlay
# echo "kde-misc/kdeconnect" > /etc/portage/package.unmask/kdeconnect

Now add the KDE overlay and merge the package:

# layman -a kde
# emerge kdeconnect

If a firewall is running on your PC, you will need to configure it to allow tcp and udp traffic via a specific range of ports (1714 to 1764). I have UFW running on my main laptop, so in my case I used the following commands:

# ufw allow proto tcp to any port 1714:1764
# ufw allow proto udp to any port 1714:1764

The rules should look like this:

# ufw status verbose | grep 1714
1714:1764/tcp ALLOW IN Anywhere
1714:1764/udp ALLOW IN Anywhere
1714:1764/tcp ALLOW IN Anywhere (v6)
1714:1764/udp ALLOW IN Anywhere (v6)

If you have the KConfig Module kcm_ufw installed on your PC then you can instead use System Settings > Firewall to add the UFW rules via the KDE GUI.

By the way, to check which KConfig modules are installed on your PC you can use the following command under your user account:

$ kcmshell4 --list

Using KDE Connect is not difficult, so I will leave you to play with it. Obviously make sure WiFi is enabled on your Android device, and that it and your PC are connected to the same network. Tap on the KDE Connect icon on your Android device to launch the app, and you should see your PC’s name listed under CONNECTED DEVICES. Tap on the PC name and you should see the following screen:

KDE Connect screen

KDE Connect screen

If you tap on ‘Send ping’, the KDE Notification widget on the KDE System Tray should pop up a notification.

You can see what KDE Connect plug-ins are available, and select/deselect them:

KDE Connect plugins

KDE Connect plugins

KDE Connect also enables you to use your Android device as a remote control for media players running on your PC. When you launch a media player in KDE its name will appear in a list of selectable players in KDE Connect, and the name of the track currently playing will also be displayed:

KDE Connect - Remote control

KDE Connect - Remote control

When you select a file on your Android device and tap the Share icon, KDE Connect will be one of the options displayed on the ‘Share via’ menu. This is a handy way to send files from your Android device to your PC. The KDE Notification widget on your PC will notify you when the file has been transferred to ~/Desktop/ on your PC:

KDE on your PC notifies you when a file has been sent via KDE Connect

KDE on your PC notifies you a file has been sent via KDE Connect

You should also get notifications on your KDE desktop when someone phones or sends you an SMS.

Kudos and many thanks to the people responsible for KDE Connect. KDE is already a superb desktop environment, and with the addition of KDE Connect it is better still.

Gentoo Linux

I suspect Gentoo Linux is a complete mystery to most Linux users, let alone everyone else. It is a Linux distribution I would never recommend to a newcomer to Linux or to someone not used to the command line, as it requires a certain amount of experience and knowledge when something goes wrong. This is especially true for Gentoo’s Testing Branch. Take upgrading Gentoo Testing on my main laptop today as a good example of what I mean…

Unlike most Linux distributions, Gentoo is a ‘source distribution’, meaning that the software is compiled and installed on your machine from source code downloaded by Gentoo build scripts called ‘ebuilds’, not installed pre-compiled as in a ‘binary distribution’. Furthermore, Gentoo is a ‘rolling distribution’, meaning that you do not periodically install a new release of the operating system, you install it once via the Internet using a lengthy set of commands, and thereafter ‘roll’ it forward by upgrading the installed packages (one, or several at a time) ad infinitum as new versions are released. The upgrading of all installed packages on your machine to their latest versions is called a ‘world update’. For Gentoo Stable you would expect this to be straightforward and trouble-free, and usually it is. But problems are to be expected in the case of Gentoo Testing.

To illustrate the level of detail a user of Gentoo Testing may need to go into, I’ll talk you through what happened to me today when I upgraded the world on my main laptop. I will not explain precisely what each command does; I just want to illustrate the sort of troubleshooting a Gentoo user has to perform from time to time.

I kicked off the world upgrade:

# emerge --sync
# layman --sync-all
# emerge --update --verbose --deep --newuse --keep-going world

This upgraded several installed packages but the last package in the list to be upgraded, version 6.7.0 of a suite of tools named mkvtoolnix, failed to compile. The error message displayed in the terminal window left me none the wiser, so I surfed over to the Gentoo Bugzilla Web site and searched for bug reports on mkvtoolnix. I found Gentoo Bug No. 499332 (‘media-video/mkvtoolnix-6.7.0 should DEPEND on >=dev-lang/ruby-1.9′).

From the title of the bug report I knew I should have a look at the ebuild (an ‘ebuild’ is a script file that Gentoo uses to compile and install a package), so I searched for it on my laptop using the command:

# locate mkvtoolnix | grep 6.7.0.ebuild

which found the file /usr/portage/media-video/mkvtoolnix/mkvtoolnix-6.7.0.ebuild, so I used the text editor nano to look at the ebuild’s code and changed ‘dev-lang/ruby’ to ‘>=dev-lang/ruby-1.9′, then recreated the package manifest:

# cd /usr/portage/media-video/mkvtoolnix
# ebuild mkvtoolnix-6.7.0.ebuild manifest

Gentoo is ‘slotted’ (i.e. different versions of the same package can be installed), so I checked the currently selected version of Ruby:

# eselect ruby list
Available Ruby profiles:
[1] ruby18 (with Rubygems) *
[2] ruby19 (with Rubygems)
[3] ruby20 (with Rubygems)
[4] ruby21 (with Rubygems)

and changed it to be Ruby version 1.9 as follows:

# eselect ruby set 2
# eselect ruby list
Available Ruby profiles:
[1] ruby18 (with Rubygems)
[2] ruby19 (with Rubygems) *
[3] ruby20 (with Rubygems)
[4] ruby21 (with Rubygems)

Then I tried again to install the mkvtoolnix-6.7.0 package:

# emerge --oneshot --verbose mkvtoolnix

and this time it was built and installed without trouble.

Lastly, I used a Gentoo tool to check, and if necessary fix, dependencies:

# revdep-rebuild --ignore

The output from revdep-rebuild told me everything was fine, so revdep-rebuild did not need to rebuild any packages and I did not need to do anything further.

Actually, I probably could have skipped editing the mkvtoolnix ebuild and just selected Ruby 1.9 using the eselect tool before trying to re-install mkvtoolnix-6.7.0, but if mkvtoolnix depends on Ruby 1.9 or higher then the ebuild for Version 6.7.0 ought to be modified in any case.

If you have read down to here, perhaps now you can see why using Gentoo requires a fair amount of prior knowledge.

Follow

Get every new post delivered to your Inbox.

Join 50 other followers