My thoughts on Slackware, life and everything

Month: November 2013 (Page 1 of 2)

Chromium for Slackware, with salt & pepper

chromium_icon I have been using Chrome alongside Firefox for some time now, because I was not very happy with the way Firefox is growing fat and sluggish.

Chrome is nice and fast, and it allows me to save my preferences and bookmarks so I can keep them synchronized across computers – just like Firefox for which I setup my own private Sync server, However, Chrome is a closed-source app and I prefer to run open source self-built stuff where possible. Enter Chromium.

Chromium is the Open Source variant of the Chrome Browser. Both are part of the Chromium project which also has the Chrome OS as a product. Chromium and Chrome share the same codebase, and the closed-source Chrome browser is enhanced with some proprietary features like Adobe’s Pepper Flash plugin.

The slackbuilds.org site has a chromium SlackBuild script – it’s been there since Slackware 13.1 and Chromium 9. Building the package takes several hours which in my opinion is too long to simply ask people to compile it themselves. Just like with other big packages like LibreOffice, I decided to build my own package for Chromium and add that to my repository. What better time than right after the release of Chrome/Chromium 31.0.1650.57, last week!

I did some research, to see what I needed to put into my SlackBuild. The one on slackbuilds.org for instance, does not build the Native Client. It also does not define a Google API key or OAuth tokens. Without these API keys, some features of Chromium that use Google APIs will not be available in the browser. Think of Chrome sync, push messaging, remote desktop sharing, safe browsing, search suggestions and more.

Therefore I decided to request my own set of API keys from Google for my Chromium package build. I got those (it is an automatic process, and it is cost-free). The license restricts you in the use of these API keys: you are not allowed to make them public, they are for your personal use only. However there is an exception for distribition packagers and so I also applied with Google to allow me to share these API keys with the Slackware community. I got that approval in writing today and I will share my keys in future builds of the package.

For now, I chose to not to add them to the SlackBuild, because I want to have feedback from you Slackware users first, about the stability and the functionality of my Chromium build. Google can block a browser based on the API key with which it was configured and I want to make sure that everything is OK before uploading them into public view. I have uploaded my API keys so that you can recompile the package yourself and get a fully functional browser. It is explicitly not allowed to re-distribute my API keys when you create a modified version of my package!!

If you run my SlackBuild script without having API keys of your own, it will build you a perfectly working package – you just will not be able to sign into Chromium. If you want to recompile Chromium using my SlackBuild script and with Google API key, you can always generate your own API/OAuth keys by following the procedure outline on http://www.chromium.org/developers/how-tos/api-keys of course. Add the key definitions to a file called “chromium_apikeys” in the same directory as the chromium.SlackBuild, it will look somewhat like this:

_google_api_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
_google_default_client_id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com
_google_default_client_secret=XXXXXXXXXXXXXXXXXXXXXXXX

Note that you are then not allowed to distribute these keys. Good luck! It compiles for 5 hours in my virtual machine and it needs many GB of swap file for the final link stage.

And then about Native Client. The Native Client is a sandbox technology that allows developers to write applications in native code (code targeting the machine hardware) and running that code inside the Chromium browser. The advantage is that these applications are able to run at near-native speed. Google has made several of these NaCL applications available in the Chrome Web Store. A nice gallery of NaCL applications is hosted at https://developers.google.com/native-client/community/application-gallery It features free-to-play games like Don’t Starve and Lara Croft, and even has a SSH secure shell ( I use that one on my own Chromebook).

I had no idea how to build the Native Client so I looked at how Suse, Arch, Debian and Ubuntu build their Chromium packages. Turns out, not everybody adds the Native Client. In the end I adopted the way Arch Linux builds it by downloading Google’s NaCl SDK and using  that to build my own binaries.

There are two caveats at the moment, when building all of this. Both these points apply only to compiling Chromium… they do not apply to running the browser.

  1. On 32-bit Slackware 14.1 you’ll have to rebuild the “libelf” package with this patch:
    --- libelf.SlackBuild.orig 2011-03-27 06:24:58.000000000 +0200
    +++ libelf.SlackBuild 2013-11-22 17:24:17.740039844 +0100
    @@ -38,7 +38,7 @@
     NUMJOBS=${NUMJOBS:-" -j7 "}
    
     if [ "$ARCH" = "i486" ]; then
    -  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
    +  SLKCFLAGS="-O2 -march=i486 -mtune=i686 -D_FILE_OFFSET_BITS=64"
       LIBDIRSUFFIX=""
     elif [ "$ARCH" = "s390" ]; then
       SLKCFLAGS="-O2"
  2. On 64-bit Slackware 14.1 you’ll have to go multilib if you want to compile the Native Client. If you do not want to add multilib you can set the internal SlackBuild variable “USE_NACL” to “0” and the Native Client will not be built. You get all the other features still, of course.

Get my Chromium packages in one of the usual locations:

You can subscribe to the repository’s RSS feed if you want to be the first to know when new packages are uploaded.

Lovers of word games, you’ll have noticed that Native Client is shortened to NaCl which is another notation for salt. Guess what, apart from the salt, Google also added pepper to their browser. The Pepper Plug-in API (PPAPI) is a cross-platform API for plugins for web browsers, meant to replace the Netscape Plugin API (NPAPI) which (according to Google at least) is flawed and belongs to the past. The best known Pepper based plugin is Adobe’s Flash Player. Adobe abandoned their NPAPI based plugin (but they still apply security fixes) and focus on their PPAPI plugin for Chrome. Good news: Chromium works withe PPAPI plugins and therefore it is possible to extract the Flash plugin from Chrome and use it with Chromium. Check out this package (first install chromium, then chromium-pepperflash-plugin because the second package updates the chromium configuration defaults). Because this is a proprietary plugin, by installing it you agree to the Chrome End User License Agreement.

Note: Chrome/Chromium are going to block most NPAPI plugins at the beginning of 2014 and support for The Netscape API will supposedly be dropped altogether at the end of that same year. Another note: Mozilla’s Firefox will start enforcing “Click to Play” even before the end of 2013, which means that plugins will no longer be loaded automatically, but only after the user (you) clicks on a “Play” button. All plugins, meaning for instance the popular Java and SilverLight, but excepting the most recent Flash.

Tell me your experiences with Chromium for Slackware!

Eric

Note (20131124):

  • I have uploaded my API keys so that you can recompile the package yourself and get a fully functional browser. It is explicitly not allowed to re-distribute my API keys when you create a modified version of my package!!
  • Also, I have added Google Chrome’s proprietary PDF viewer as a separate package for Chromium:  http://www.slackware.com/~alien/slackbuilds/chromium-pdf-plugin/ so that PDF files can be viewed inside the browser.

Pipelight: using Silverlight in Linux browsers

pipelight-logo That is the exact title of an article which appeared on fds-team.de last august.

You may have read my earlier rant about dutch schools migrating (or forced to migrate) to a Microsoft SilverLight based learning management software called Magister. A disastrous move induced by an arrogant company, which of course leaves Linux desktop users out in the cold. In my article, I mentioned that I was looking at ways to render SilverLight based websites in a Linux browser. The most promising (in fact as it turned out,  the only) solution appeared to be Pipelight.

It took a while to get it all sorted out and make sense of the way in which the various pieces of software interact, but despite a busy work schedule I managed to pull it off in the end. This article will show you how to install and configure Pipelight on Slackware Linux without effort. Not just dutch Slackware users with children in secondary school will profit. You may definitely want to install Pipelight in order to view Netflix content on your Linux computer! Having a Netflix subscription forced you to boot a Windows computer but that is now history.

What is Pipelight and how does it render these SilverLight pages, and Netflix videos, and more, in your browser?

Project Pipelight utilizes the efforts made by Erich E. Hoover who created a set of Wine patches to get Playready DRM protected content working inside Wine. This modified Wine (wine-pipelight) is combined with a new browser plugin (pipelight) that embeds Silverlight directly in any Linux browser supporting the Netscape Plugin API (yes… the API which Google is planning to drop from its Chrome browser in 2014… not playing nice here, Google!).

Let me quote verbatim from the project page, because I can not phrase it better:

Pipelight consists out of two parts: A Linux library which is loaded into the browser and a Windows program started in Wine. The Windows program, called “pluginloader.exe”, simply simulates a browser and loads the Silverlight DLLs. When you open a page with a Silverlight application the library will send all commands from the browser through a pipe to the Windows process and act like a bridge between your browser and Silverlight. The used pipes do not have any big impact on the speed of the rendered video since all the video and audio data is not send through the pipe. Only the initialization parameters and (sometimes) the network traffic is send through them. As a user you will not notice anything from that “magic” and you can simply use Silverlight the same way as on Windows.

That is good news. And now, how to get this all working in Slackware?

? First, you need a couple of my packages (you may have some of them already). I made them available for Slackware 14.0 and 14.1, both 32-bit and 64-bit editions. Download and install the following packages for your Slackware version and architecture:

? Note that Wine is a 32-bit product (and the pre-compiled pipelight pluginloader comes as 32-bit binary only), so if you are running 64-bit Slackware you will have to switch it to a multilib system first. I noticed some references to wine64 in the piplelight sourcecode (un-implemented functionality as of yet) so there’s hope that multilib will not be needed in future.

? If you are running 64-bit Slackware, then you should download the 32-bit version of the OpenAL package and use the “convertpkg-compat32” program in order to create a multilib “compat32” package. You need to install that, instead of using the 64-bit package, otherwise Wine will not work. For instance (version and build numbers may change over time) using these commands:

# convertpkg-compat32 -i OpenAL-1.15.1-i486-2alien.tgz
# upgradepkg –install-new /tmp/OpenAL-compat32-1.15.1-x86_64-2aliencompat32.tgz

? The webcore-fonts-installer is a nifty package. It does not contain any Microsoft font (therefore I am allowed to distribute the package), but the post-installation script will automatically download and install the Microsoft Core Fonts for the Web for you. These fonts are required by SilverLight.

? Then, open a terminal and check out the new functionality by running the “pipelight-plugin” program. Use it to list the available plugins and to enable/disable one or more of these plugins. Do this as your own user account, not as the root user! The result of enabling a plugin is that a symbolic link to the corresponding shared library will be created in your ~/.mozilla/plugins/ directory.

$ pipelight-plugin –help

Supported plugins:
silverlight5.1
silverlight5.0
silverlight4
flash
shockwave
unity3d
$ pipelight-plugin –enable silverlight
Plugin silverlight5.1 is now enabled
$ pipelight-plugin –list-enabled
silverlight5.1

? Install a browser User Agent switcher. Some SilverLight sites will tell your Linux browser that it is unsupported, and you will have to make the server believe that your browser is running on Windows. For Firefox, you should pick https://addons.mozilla.org/en-US/firefox/addon/user-agent-overrider .

? Start your Firefox or Chrome browser (Konqueror should work too but I did not test that) and open the URL http://fds-team.de/pipelight/ which is the team’s diagnostics page. You can select one of the available plugins to test, and this will trigger the browser to try and load that pipelight plugin. The first time the plugin loads, it will automatically download and install the required Windows programs using the customized wine-pipelight program. You will see a few Windows installation dialogs (for SilverLight etc). These do not require any interaction, and you can sit back and relax. It will only take a short while, and then the disgnostics page will show the plugin’s status. The wine-pipelight program will install all its files in its own wine prefix so that it will not interfere with a “normal” version of  Wine which you may have installed already. The directory which is used, is  ~/.wine-pipelight/ .

pipelight03

SilverLight DRM (protected content) on Linux

In order to play protected content in SilverLight, Microsoft has invented PlayReady. The customized version of Wine which comes with Pipelight (wine-pipelight) implements this DRM support through Linux Extended Attributes (xattr). Your kernel has to support it for the filesystem you use. Slackware’s kernels have enabled this for most filesystems (below output is for a Slackware 13.37 kernel):

# zcat /proc/config.gz | grep XATTR
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_REISERFS_FS_XATTR=y
# CONFIG_JFFS2_FS_XATTR is not set
CONFIG_UBIFS_FS_XATTR=y
CONFIG_SQUASHFS_XATTR=y
# CONFIG_CIFS_XATTR is not set

The Linux extended filesystems (ext2, ext3, ext4) enable extended attributes by default when you mount them. Other filesystem types may require a mount option in /etc/fstab.

Troubleshooting Pipelight issues

  • Running Firefox from the command line will show debugging output from the pipelight plugin when you go to http://fds-team.de/pipelight/
  • When using the UserAgent control to spoof your browser and OS, try not to pick MS Internet Explorer. Apparently, only disguising as Firefox/Windows will work with Netflix.
  • If you are using Firefox and the pipelight diagnostics page informs you that SilverLight was installed OK but that your browser’s plugin cache needs to be cleared, you should follow the advice. If you don’t do that, Firefox will not reload the plugin on the next start. To clear the plugin cache, type “about:support” in your address line and hit Enter. You should now see a button which opens your profile directory. Click on it and remove the “pluginreg.dat” file. Restart your browser and check if it works (don’t worry, the “pluginreg.dat” file will be automatically re-created).
  •  If Netflix informs you that you are logged in with another browser or tab and you are certain that you are not, you need to close your browser windows and then kill off all of the wine services, plugin-container and pluginloader.exe processes. Then start your browser again. The Wine processes are left-overs from a previous (failed) attempt to load the pipelight plugin.

Enjoy! Eric

Slackware 14.1 released

Finally!

Slackware 14.1 has been released today. The package tree had been finalized a couple of days earlier, to give Patrick time to write the release announcement, create ISO images, and send gold master disks to the factory. My gut feeling told me that we had been working long and hard on this release, but looking back at the previous 14.0, I realized that development cycle which has been concluded now, was actually three months shorter (14 versus the previous 17). And with less release candidates, too.

I am glad we have something solid to share with you. I am running the development version of Slackware all the time on my primary desktop and laptop, and use an older laptop to compare with the most recent stable release. I must say, Slackware 14.1 has been extremely stable all the way through its development.

Lots of activity is happening on the side which the active Slacker can use for fun and profit. We have a vibrant community on LinuxQuestions.org, we welcomed many contributions in the Slackware Documentation Project last year, there was a completely new GNOME2-fork project called Slackware MATE Desktop, and cutting-edge versions of KDE are as always provided through my ‘ktown‘ repository. If you are a gamer, you might want to join the Steam Slackware community – Steam works perfectly on Slack.

What’s new in Slackware 14.1?

We have X11R7.7 (X.Org server 1.14.3), KDE 4.10.5, XFCE 4.10.1, the Linux 3.10.17 kernel as default, but with sample kernel configs for newer 3.12 and older stable 3.4.66 kernels included as well. Slackware supports UEFI firmware now (in the installer too), so that you can install and boot it on the newest hardware. For this reason, elilo and grub2 have been added to the core distribution. There is lots more of course! All your familiar development tools and end-user utilities have been updated to the latest releases. Of the nearly 1250 packages in Slackware core (a 100 more than in 14.0), over 800 have been upgraded or recompiled since Slackware 14.0. “Why were not all of those packages recompiled or upgraded” I hear you say. Remember, the Slackware adagium is “if it ain’t broken, don’t fix it!“.

What’s not?

As you may have expected by reading the previous sentence, we do not include SystemD as a replacement of the venerable Slackware init system. We also do not ship a Wayland display server to replace X.Org.

How to get Slack?

If you are upgrading from Slackware 14.0 you will certainly want to read the CHANGES_AND_HINTS file to get a good picture of the many package additions and what to expect from them. You can also check out the information in the Slackware Documentation Project, there’s an article in there called “upgrading Slackware to a new release” using the included slackpkg tool.which will help you convert your Slackware 14.0 system to 14.1 painlessly.

If you have lots of custom packages built from source using scripts from slackbuilds.org aka SBo, then you should check out the news on that site to see if there were any mandatory package upgrades. And sbopkg is a useful companion to SBo (but not supported by them) to manage your source compilations.

If you have lots of custom packages which you installed from 3rd-party unofficial repositories (like Robby’s packages, the slacky.eu community, my own main, multilib or ktown repositories), then you should check out the slackpkg+ extension for slackpkg, which allows you to easily manage your 3rd-party packages.

Together with Slackware for x86 and x86_64 (Intel-compatible) platforms, you can also enjoy the new Slackware ARM 14.1 created by Stuart Winter if you are the proud owner of an ARM computer.

We have setup several sources where you can download the ISO images – all the Slackware main mirrors of course. Akamai have generously provided Slackware Inc. with extensive global content caching and Internet routing performance enhancements, allowing us to keep the site up, even at peak times.

Our torrent tracker is ready and seeding on big pipes: http://www.slackware.com/getslack/torrents.php.

I beg you to consider buying a subscription at the Slackware Store – it will help keeping the distribution alive. You must realized that Pat is the only one in the core team who is financially dependent on the sales of Slackware DVD’s and other merchandise. I do not think anyone who ever used Slackware wants to see this great distribution die through lack of funding. The rest of the team does this for fun, not for profit – we buy our own subscriptions from the Store, just like you do.

Have fun! Eric

 

KDE 4.11.3 ready for install

Here is KDE Software Compilation 4.11.3 – it was announced a little earlier today. The third incremental maintenance release for KDE 4.11 contains updates for Workspaces, Applications and Development Platform, and has eliminated over 120 bugs from the Window Manager KWin, the file manager Dolphin, the personal information management suite Kontact, the UML tool Umbrello, and others.

Packages are available for Slackware-current in the usual 32-bit and 64-bit flavours. I am running them on this very laptop and I find no flaws. I am also working on other interesting stuff, that is why it took a few hours to write the blog article. Be sure to be here when I publish the next one (hopefully tomorrow). One hint: SilverLight.

The new Plasma Network Management applet which I added to the previous KDE 4.11.2 set, has been seriously reworked by its developers, and the updated version I have as part of the new KDE 4.11.3 needs a bit of manual work if you are currently using that first version. After upgrade, you will notice that the old applet has transformed into a red cross and calls itself an “unknown applet”. Just remove it from the system tray and add the updated one (called again “Network Management v0.9.3.1”).

How to upgrade to KDE 4.11.3 ?

Note: you have to be running Slackware-current! These packages are not suited for Slackware 14.0.

You will find all the installation/upgrade instructions that you need in the accompanying README file. That README also contains basic information for KDE recompilation using the provided SlackBuild script You are strongly advised to read and follow these installation/upgrade instructions!

Where to find packages for KDE 4.11.3 ?

Download locations are listed below (you will find the sources in ./source/4.11.3/ and packages in /current/4.11.3/ subdirectories). Using a mirror is preferred because you get more bandwidth from a mirror and it’s friendlier to the owners of the master server!

Have fun! Eric

Recipe: foccaccia

I have enjoyed the BBC’s Great Brithsh Bake Off series a lot. My wife has been watching these episodes longer than I have – she is the real cook – but I got increasingly interested because of the sympathetic presentation by Mary Berry and Paul Hollywood. Always amazing what these amateur bakers can come up with…way out of my league.

In the second series, which aired in 2011, Paul Hollywood set a technical challenge to the contesters: to make an Italian Focaccia bread. Ever since I went to Italy with my girl friend (now wife) and ate a real freshly baked focaccia bread, I have been spoiled by that event. I never got an appetite for the factory-baked ones you can buy in the local supermarket. I remember that the original bread tasted great because it was almost soaking with olive oil and was full of mediterranean flavours.

So I promised myself to bake a focaccia one day. However, I was discouraged by the fact that making a good focaccia dough seems to be quite difficult to make. Also, I wanted to use my hands, not a kneading robot to make the dough.

That is why I carefully watched the Brithsh Bake Off Masterclass session where Paul Hollywood showed how he makes his focaccia, and I used the recipe as outlined in his book “How to Bake“. I split the amounts in half because I wanted to end up with a single bread for a 2-3 persons side-dish.

Time required:

2.5 hours for preparation, 30 minutes for baking.

Ingredients:

  • 250 grams of strong white flour
  • 1 sachet dried fast action yeast
  • 1 teaspoon of salt
  • 1 tablespoon of olive oil
  • 200ml cold water (straight from the tap)
  • olive oil, for drizzling
  • coarse sea salt
  • fresh (preferred) or dried rosemary for sprinkling on top

Preparation:

  • Prepare a bowl for proving the dough, by oiling its inside generously. Put aside for later.
  • Use a kitchen scale to measure the flour and tip it into into a large mixing bowl. Empty the sachet of dried yeast on one side of the bowl and add the salt on the opposite side of the bowl. They need to be separated because the salt will kill the yeast if the two come into direct contact too soon. Then, add the olive oil, and three quarters of the water. Cold water is better than warm water according to Paul Hollywood. Cold water will activate the yeast more slowly and that will have a positive effect on the flavours that will develop in the bread.
  • Stir the ingredients into a dough with a wooden spoon. Instead of using a spoon, you can also use the fingers of one hand to pull the flour into the mix gradually.
  • When the water is absorbed you can gradually add the remaining water bit by bit. Knead until all the water has been absorbed before adding more. Focaccia dough is very wet: the ratio flour to water is almost one to one. The more water, the lighter the bread’s inside will be!
  • Rub your hands with a bit of olive oil and start kneading the dough in the bowl for around 5 minutes. It will be annoyingly sticky. If needed, you can wash your hands, rub them in olive oil and continue kneading.
  • Spread some olive oil on your work surface and dump the dough from the bowl onto the work surface. Continue kneading for another 10 minutes.
  • At this point I was getting quite depressed and despairing… because the dough did not turn into a silky non-stick substance (which is what usually happens after kneading a bread dough for a period of time). Focaccia dough will keep sticking to your hands no matter how long you knead it. Just accept that and move on.
  • Scrape the dough off the work surface and off your hands, and place it into the oiled bowl you had set aside earlier. Cover the bowl with a tea towel or clingfilm and leave it in a warm place to prove for at least an hour, or until the dough has doubled in size.
  • Line a rectangular baking tray (roughly 20 cm by 30 cm in size ) with parchment paper and rub the inside with oil. Gently slide the dough into the tray. Use your fingers to gently stretch and push the dough into the corners of the tray. You do not want to push all the air out!
  • Cover the baking tray with clingfilm or a tea towel and leave it to prove for another hour.
  • Just before the hour is over, pre-heat your oven to 220 degrees centigrade.
  • Remove the towel or cling film. Dip one of your fingers into some flour so that it will not stick, and then firmly push it into the dough, all the way to the bottom of the tray. Repeat this until the focaccia dough has a nice outline of dimples all over its surface.

Baking:

  • Sprinkle the focaccia generously with sea salt and rosemary. Sprinkle a few tablespoons of olive oil on top (or hold your thumb to the aperture of the olive oil bottle and drizzle the oil through the narrow gap you leave open).
  • Bake the focaccia at 220 degrees centigrade, middle of the oven, for about 20 minutes. It should turn an even brown colour.
  • Lift the bread out of the tray using the parchment paper as a handle, and put it on a wire rack. Remove the paper from beneath the bread. Sprinkle with some more olive oil which will get soaked into the bread. Use a high-quality green olive oil if you have that – it will greatly enhance the flavour.
2013-11-03 17.05.20

I almost ate all of it before thinking of taking a picture.

The result is a flat bread with a lovely crispy brown crust, and yet light on the inside. The focaccia has lots of air pockets or various sizes- the sign of a good bake. It tasted great! A real mediterranean treat.

The focaccia should be eaten right out of the oven, or while it is still warm, for the best experience.

Eric.

« Older posts

© 2024 Alien Pastures

Theme by Anders NorenUp ↑