WINE tips: File associations for Windows applications in Linux (continued)

There is a downside to the approach described in my previous post regarding file associations for Windows applications run via WINE, at least in the case of KDE.

By using KDE’s ‘System Settings’ > ‘File Associations’ to change the application launch command from:

env WINEPREFIX="/home/fitzcarraldo/.wine-visio5" WINEARCH="win32" wine /home/fitzcarraldo/.wine-visio5/drive_c/Program\ Files/Visio/Visio32.EXE

to:

env WINEPREFIX="/home/fitzcarraldo/.wine-visio5" WINEARCH="win32" wine C:\\windows\\command\\start.exe /Unix %U

the launch command in KDE’s Kicker application launcher menu is also changed to the latter. Trying to launch the Windows application from the Kicker menu (Wine > Programs > a_Windows_application) then fails. Presumably this is because the wine command expects a filename (the %U in the command string) but that is not being provided.

Alternative 1

One solution is to use a shell script as described in my earlier post: WINE tips: How to associate IrfanView with an image file type in Linux. Kicker can still be used to launch the application (e.g. Wine > Programs > IrfanView) when the menu command is of the following form but no filename is provided (even though the %f is left in the command string):

/home/fitzcarraldo/launch_IrfanView.sh %f

Alternative 2

Another solution – well, really a work-around – is to accept that the Windows application cannot be launched from the Kicker menu and to create a separate Desktop Configuration File in /home/fitzcarraldo/Desktop/ which uses a different command to launch the application. For example, in my previous post the file association I configured via ‘System Settings’ > ‘File Associations’ for Visio was:

env WINEPREFIX="/home/fitzcarraldo/.wine-visio5" WINEARCH="win32" wine C:\\windows\\command\\start.exe /Unix %U

and therefore the command in the Kicker menu entry is the same, but I created a Desktop Configuration File which I named ‘/home/fitzcarraldo/Desktop/Visio 5 Professional‘ which contains the command:

env WINEPREFIX="/home/fitzcarraldo/.wine-visio5" WINEARCH="win32" wine /home/fitzcarraldo/.wine-visio5/drive_c/Program\ Files/Visio/Visio32.EXE

$ ls -la ~/Desktop/Visio*
-rwxrwxrwx 1 fitzcarraldo users 562 Aug 26 17:42 /home/fitzcarraldo/Desktop/Visio 5 Professional

Notice that the command to launch the Windows application does not contain a filename parameter (%U), so when I double-click on the icon on the Desktop it launches Visio.

Summary

Ideally, KDE should be changed to allow the application launching command in ‘System Settings’ > ‘File Associations’ to be edited to be different to the application launching command in the Kicker menu. In the absence of that, you have two alternatives in the case of WINE:

  1. Create a shell script to launch the application. This allows you to launch the Windows application via Kicker and by double-clicking on a file of the applicable type.

    or

  2. Create a separate Desktop Configuration File in e.g. the ~/Desktop/ directory. This allows you to launch the Windows application by double-clicking on a Desktop Configuration File for the application and by double-clicking on a file of the applicable type. However you cannot launch the application from its entry in the Kicker menu.

WINE tips: File associations of Windows applications in Linux

I have several applications for Windows installed under WINE in Linux. These applications launch correctly if I double-click on a file for that application, but, in the case of some of these applications, the file itself is not opened. Therefore I first have to launch the application and then load the file from within the application (File > Open, or whatever). Some time ago I explained how to fix this in the case of IrfanView by creating a shell script – see my post WINE tips: How to associate IrfanView with an image file type in Linux – but there is an easier way to do it in many cases, as illustrated by the example below for another Windows application I use regularly in Linux. I finally got fed up with not being able to open .vsd (Visio drawing) files by double-clicking on them in Linux, and decided to fix this. The same procedure applies, whatever the Windows application.

I use KDE, but the principle applies whatever Desktop Environment you are using. Just use the relevant File Association configuration tool for that Desktop Environment.

  1. I selected ‘System Settings’ > ‘File Associations’ from the KDE Kickoff menu launcher.

  2. I entered ‘vsd’ (without the quotes) in the search field in order to find the application associated with that file type.

    The ‘Known Types’ box then displayed the following:

    >- application

  3. When I expanded that by clicking on it, the ‘Known Types’ box displayed the following two application file types:

    v- application
            vnd.ms-viso.viewer
            vnd.visio

  4. Clicking on either displayed ‘Visio 5.0 Professional’ in the ‘Application Preference Order’ box. I selected it and clicked on ‘Edit…’, which opened a Properties window for the application’s desktop configuration file.

  5. I clicked on the ‘Application’ tab. The ‘Command’ box contained the following command:
    env WINEPREFIX="/home/fitzcarraldo/.wine-visio5" WINEARCH="win32" wine /home/fitzcarraldo/.wine-visio5/drive_c/Program\ Files/Visio/Visio32.EXE

    (The wine command itself has to be preceded by the definition of the WINEPREFIX and WINEARCH environment variables because I specified those environment variables originally when I installed the application via WINE.)

    I changed the command to be the following:

    env WINEPREFIX="/home/fitzcarraldo/.wine-visio5" WINEARCH="win32" wine C:\\windows\\command\\start.exe /Unix %U

    for both vnd.ms-viso.viewer and vnd.visio application file types, and clicked on ‘OK’ and ‘Apply’.

That’s all there was to it. Now when I double-click on any file ending with ‘.vsd’, Visio launches as before but the actual file is opened in the application. Very straightforward, and I really should have made the effort to fix it sooner. :-)

WebRTC – A viable alternative to Skype

webrtc_logoSkype for Linux 4.3 and upwards requires the use of PulseAudio, which has caused discontent amongst those Linux users who do not use PulseAudio. Although I do use PulseAudio, I recently found out about WebRTC, an API (application programming interface) for browser-based communication offering most of the functions provided by Skype, namely: voice calling, video chat, text chat, file sharing and screen sharing. The official WebRTC site states:

WebRTC is a free, open project that enables web browsers with Real-Time Communications (RTC) capabilities via simple JavaScript APIs. The WebRTC components have been optimized to best serve this purpose.

Our mission: To enable rich, high quality, RTC applications to be developed in the browser via simple JavaScript APIs and HTML5.

WebRTC was originally released by Google but is now a draft standard of the World Wide Web Consortium, and is supported by Chrome, Firefox and Opera browsers. Several commercial Web sites offer WebRTC-based communications to fee-paying customers, but I thought I would try WebRTC by using one of the so-called ‘demo’ WebRTC pages. AppRTC is a WebRTC demo page which can be reached from a link on the official WebRTC site, but I prefer Multi-Party WebRTC Demo by TokBox which offers a more polished experience with better features. Both are free to use and viable substitutes to Skype for video chatting (one-to-one or conference).

So, how do you actually use WebRTC-based sites? Below is a quick guide to get you going.

Text and video chatting

Open the following URL in Chrome or Firefox:

https://opentokrtc.com/

Enter a Room Name that is likely to be unique. I used ‘fitzchat’ (without the quotes), but you can use any name you want.

The other party or parties can do the same thing, i.e. they enter the same Room Name as you, and you will all become connected.

Alternatively, to send an e-mail invitation to someone, click on the URL at the top of the pane on the right-hand side (which is Invite: https://opentokrtc.com/fitzchat in this example, as I chose to name the Room ‘fitzchat’). The partially visible pane at the right-hand side of the browser window will slide into full view when you click on it.

That’s all there is to it. You should see a video window showing each party, and they should see the same. Each party should also be able to hear the other parties. In the top right-hand corner of each video window is an icon (microphone for you; speaker for each of the other parties) which you can click on to mute/un-mute that party.

Click on the partially visible pane at the right-hand side of the browser window. Notice the ‘chat bar’ at the bottom where you enter commands and chat text. Read the grey instructions listed near the top of the pane:

Welcome to OpenTokRTC by TokBox
Type /nick your_name to change your name
Type /list to see list of users in the room
Type /help to see a list of commands
Type /hide to hide chat bar
Type /focus to lead the group
Type /unfocus to put everybody on equal standing

For example, to give myself a meaningful name instead of the default username Guest-0120e48c which was given to me automatically, I entered the following:

/nick Fitz

Screen sharing

I found that screen sharing already works well in Chrome 36.0.1985.125 but is not yet supported in Firefox 31.0. It will be supported in Firefox 32 or 33, apparently, or you can already use Firefox Nightly providing you add the appropriate preferences via about:config.

To be able to share screens in Chrome, I had to perform two steps: enable a Chrome flag and install a Chrome extension. The two steps, which do not need to be repeated, are given below (see Ref. 1).

To enable screen sharing in Chrome, do the following:

  1. Open a new tab or window in Chrome.
  2. Copy the following link: chrome://flags/#enable-usermedia-screen-capture and paste it in the location bar.
  3. Click on the ‘Enable’ link below ‘Enable screen capture support in getUserMedia().’ at the very top of the screen.
  4. Click on the ‘Relaunch Now’ button at the bottom of the page to restart Chrome.

To install the screen sharing extension in Chrome, do the following:

  1. Launch Chrome and click on the Menu icon.
  2. Click on ‘Settings’.
  3. Click on ‘Extensions’.
  4. Click on ‘Get more extensions’ and search for ‘webrtc’.
  5. Download ‘WebRTC Desktop Sharing’.
  6. This places an icon to the right of the URL bar in Chrome.

To share your screen or just a window, do the following in Chrome:

  1. Click on the ‘Share Desktop’ icon to the right of the URL bar and select either ‘Screen’ or the window you wish to share.
  2. Click ‘Share’.
  3. When sharing has started in a new Chrome window, select the URL of the relevant tab in that window and send it to the other parties via the chat pane on the right-hand side of the first browser window.

To stop sharing, click on ‘Stop sharing’ and click on the ‘Share Desktop’ icon to the right of the URL bar to get it to return to displaying the ‘Share Desktop’ icon instead of the || (Pause) icon.

File sharing

I did not bother to try file sharing using WebRTC, but there are various Web sites you can use to do that. One such is ShareDrop, and googling will find others.

Caveats

Chrome 36.0.1985.125 and Firefox 31.0 were used in this trial (I did not try Opera). I found that video chat worked faultlessly when both parties were using Chrome, and when both parties were using Firefox. However, when one of the parties was using Firefox and the other was using Chrome, I could not see myself in one of the video boxes in the browser window (although I could see the other party in the other video box in the browser window). Furthermore, there was a grey bar across the middle of the video images in the AppRTC demo, whereas the Multi-Party WebRTC Demo video images were normal. Other than those two issues, the experience was smooth and straightforward. My recommendation would therefore be to use Multi-Party WebRTC Demo and for all the parties to use the same browser, be it Chrome or Firefox. If you want to share your screen or a window, the logical choice at the moment would be Chrome.

References

1 LiveMinutes Blog – Beta Testers: How To Activate Screen Sharing!

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.

Dragging windows between sides of the KWin Desktop Cube

The KDE Desktop Cube is one of the ‘eye-candy’ features provided by KWin’s Desktop Effects. Actually I use the desktop cube a lot at work (far more than at home), as I often have several windows open simultaneously on each virtual desktop (cube side) and, for some reason, I find it more natural (and fun) to rotate an on-screen cube rather than switch between 2D virtual desktops. Perhaps it’s because we live in a 3D world?

I also like to be able to drag windows from one cube face to another, a KWin feature I also find natural and fast to use. However, its configuration is not as intuitive as that of some of the other desktop effects. Also, this feature can be prevented from working if some of the other effects are enabled. Sometimes I find the feature has become disabled after I have upgraded KDE. For example, if I drag a window to the edge of the screen the cube stubbornly refuses to rotate and the window snaps to the side of the screen and expands vertically (something with which Windows 7 users will be familiar). I always forget how to reconfigure KWin to be able to drag windows between cube faces, and end up wasting several minutes fiddling with the KWin settings. This happened to me again today, so, in case others get fed up trying to get it working, here is a configuration that works for me:

  • Select ‘System Settings’ > ‘Desktop Effects’.
  • Click on the ‘All Effects’ tab.
  • ‘Desktop Cube’ and ‘Desktop Cube Animation’ should be ticked.
  • Click on the spanner icon of ‘Desktop Cube Animation’ and make sure ‘Start animation when moving windows towards screen edges’ is not ticked.

  • Select ‘System Settings’ > ‘Workspace Behaviour’.
  • Click on ‘Screen Edges’.
  • Make sure ‘Maximise windows by dragging them to the top of the screen’ and ‘Tile windows by dragging them to the side of the screen’ are not ticked.
  • Select ‘Only When Moving Windows’ for ‘Switch desktop on edge’.
  • Adjust the ‘Activation delay’ and ‘Reactivation delay’ to your taste. I find 150 ms and 1000 ms, respectively, work well on my main laptop.

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.

Follow

Get every new post delivered to your Inbox.

Join 50 other followers