news aggregator

Aurélien Gâteau: Yokadi 0.14.0

Planet Ubuntu - Sun, 2014-05-11 18:22

You may not have heard about Yokadi. It is a command-line based TODO list manager which I started some years ago and work on with a bunch of fellow contributors.

Yokadi is a side project for all of us, with occasional bursts of development activities when we find an itch to scratch or foolishly think we finally figured out the missing feature which is going to save us from procrastination :), therefore development is a bit slow. We usually run the latest version from the master branch, but not everybody is comfortable with such a way to work, so it is good to have releases. Version 0.13.0 was released 3 (three!) years ago, it was high time we got a new version out. Last week we finally released version 0.14.0.

If you are a command-line aficionado looking for a way to manage your tasks, Yokadi might be the tool you need. Head over to http://yokadi.github.io to learn more and get the latest version. We look forward to your feedback!

Adnane Belmadiaf: How to use Oxide in your Ubuntu QML application

Planet Ubuntu - Sun, 2014-05-11 10:30

Oxide is a Qt5/QML binding based on the Chromium Content API, it's intended to replace qtwebkit for the touch browser, webapps and the UbuntuWebView.

So what does Oxide provide for developers ? It does provide a good chunk a usefull functions :

  • Basic navigation
  • Incognito mode
  • Multiple browser contexts
  • User scripts
  • Message API
  • Dialog support
  • Accelerated compositing
WebView

To declare a Webview using Oxide you need to use to components, WebView from com.canonical.Oxide

import com.canonical.Oxide 1.0 [...] WebView { id: webview width: parent.width height: parent.height Component.onCompleted: { url = "http://daker.me" } }

The WebView comes with a preferences property which allows to set a list of attributes :

  • allowFileAccessFromFileUrls (bool)
  • allowScriptsToCloseWindows (bool)
  • allowUniversalAccessFromFileUrls (bool)
  • appCacheEnabled (bool)
  • canDisplayInsecureContent (bool)
  • canRunInsecureContent (bool)
  • caretBrowsingEnabled (bool)
  • databasesEnabled (bool)
  • defaultEncoding (QString)
  • defaultFixedFontSize (uint)
  • defaultFontSize (uint)
  • fixedFontFamily (QString)
  • hyperlinkAuditingEnabled (bool)
  • javascriptCanAccessClipboard (bool)
  • javascriptEnabled (bool)
  • loadsImagesAutomatically (bool)
  • localStorageEnabled (bool)
  • minimumFontSize (uint)
  • objectName (QString)
  • passwordEchoEnabled (bool)
  • remoteFontsEnabled(bool)
  • sanSerifFontFamily (QString)
  • serifFontFamily (QString)
  • shrinksStandaloneImagesToFit (bool)
  • standardFontFamily (QString)
  • tabsToLinks (bool)
  • textAreasAreResizable (bool)
  • touchEnabled (bool)
Exampleimport com.canonical.Oxide 1.0 [...] WebView { id: webview width: parent.width height: parent.height Component.onCompleted: { url = "http://daker.me" } preferences.localStorageEnabled: true preferences.loadsImagesAutomatically: false preferences.passwordEchoEnabled: true } WebContext

Oxide also provides a WebContext which allow to set other settings

  • acceptLangs (QString)
  • cachePath (QUrl)
  • cookiePolicy (CookiePolicy)
  • dataPath (QUrl)
  • objectName (QString)
  • popupBlockerEnabled (bool)
  • product (QString)
  • sessionCookieMode
  • storageAccessPermissionDelegate
  • userAgent (QString)
  • userAgentOverrideDelegate
  • userScripts

This example shows how you can use the WebContext to override the default UserAgent

UserAgentimport com.canonical.Oxide 1.0 [...] WebContext { id: webcontext userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3" } WebView { id: webview width: parent.width height: parent.height context: webcontext Component.onCompleted: { url = "http://www.whatsmyuseragent.com" } } networkRequestDelegate

You can also override the http request headers by using the networkRequestDelegate, in this example i am adding a Do Not Track (DNT) an HTTP header field on the fly.

import com.canonical.Oxide 1.0 [...] WebContext { id: webcontext networkRequestDelegate: WebContextDelegateWorker { source: Qt.resolvedUrl("dnt.js") } } WebView { id: webview width: parent.width height: parent.height context: webcontext Component.onCompleted: { url = "http://www.browserleaks.com/donottrack" } } /* dnt.js Made by Adnane Belmadiaf <daker AT ubuntu DOT com> */ exports.onBeforeSendHeaders = function(event) { event.setHeader("DNT", 1); }; UserScripts

Oxide supports Greasemonkey-style user scripts, here is an example to do some DOM manipulation.

import com.canonical.Oxide 1.0 [...] WebContext { id: webcontext userScripts: [ UserScript { context: "oxide://" url: Qt.resolvedUrl("oxide_dom.js") incognitoEnabled: true matchAllFrames: true } ] } WebView { id: webview width: parent.width height: parent.height context: webcontext Component.onCompleted: { url = "http://www.ubuntu.com/" } } // ==UserScript== // @name Dom Manipulation // @namespace http://daker.me // @description Oxide UserScript demo // ==/UserScript== function oxide_dom() { var div = document.createElement('div'); div.innerHTML = '<h1>Content inserted using Oxide UserScript!</h1>'; div.style.color = 'red'; document.getElementById("nav-global").insertBefore(div); } window.addEventListener('load', oxide_dom, true); Message API

Oxide does also provide a message API, in this example the script will send a message to Oxide and Oxide will reply back.

import com.canonical.Oxide 1.0 [...] WebContext { id: webcontext networkRequestDelegate: WebContextDelegateWorker { source: Qt.resolvedUrl("message-api.js") onMessage: console.log("Message from Oxide : ", message.msg) Component.onCompleted: { sendMessage({ msg: 'ping' }) } } } WebView { id: webview width: parent.width height: parent.height context: webcontext Component.onCompleted: { url = "http://www.ubuntu.com/" } } /* message-api.js This script will send a message to Oxide on every request */ var response_msg = ""; oxide.onMessage = function(msg) { if ("msg" in msg) { if (msg["msg"] == 'ping') { response_msg = "pong"; } } }; exports.onBeforeSendHeaders = function(event) { oxide.sendMessage({msg: response_msg}); };

Daniel Pocock: Is Uber on your side?

Planet Ubuntu - Sun, 2014-05-11 07:40

Crowdsourcing ventures with disruptive business models are a regular point of contention these days.

In London, taxi drivers are threatening to create gridlock as part of an anti-Uber protest. In Melbourne, Uber drivers have been issued with $1,700 fines for operating without a taxi license. San Francisco city officials, despite being the birthplace of many of these ventures, are debating whether AirBNB should be regulated.

An orderly society or an old-school protection racket?

Just what exactly is it that established players in these industries are trying to achieve through their protests and lobbying efforts?

In the case of apartment rentals, many people have sympathy for respecting the wishes of neighbourhoods over those of individual landlords. In the case of car pooling schemes, the arguments tend to come not from motorists at large but from those who are afraid of competition.

Without competition, could things be any worse?

Melbourne actually provides the perfect backdrop for this debate. Only a couple of years before Uber came on the scene, the government had made a detailed study into the taxi industry. One of Australia's most prominent economic experts, a former chairman of the Australian Competition and Consumer Commission spent 18 months studying the industry.

One of the highlights of the incumbent system (and the reason I suggest Melbourne is the perfect backdrop for this debate) is the way licenses are issued to taxi drivers. There are a fixed number of licenses issued by the government. The licenses are traded on the open market so prices can go up and down just like real-estate. Under the rules of Australia's pension scheme, people have even been able to use money from their pension fund to purchase a taxi license as an investment. It goes without saying that this has helped rampant speculation and the price of a license is now comparable to the price of a house.

The end result is that no real taxi driver can afford a license: most of them have to rent their license from one of the speculators who bought the license. These fixed rental fees have to be paid every month whether the driver uses their car or not. Consequently, taxi drivers have cut back on other expenses, they are often criticised for failing to keep their cars clean and the industry as a whole is criticised due to the poor quality of drivers who don't even know their way around the city. The reason, of course, is simple: by the time some newly arrived immigrant has learnt his way around Melbourne he has also figured out that the economics of driving a taxi are not in his favor. Realizing there is no way to break even, they take other jobs instead.

It was originally speculated that the government review would dramatically reduce or abolish these speculative practices but ultimately lower license charges have only been used for the issue of 60 new licenses, barely 1% of the taxi fleet in the city today. Furthermore, the new licenses were only available to existing players in the industry.

Uber to the rescue?

Uber drove into the perfect storm as they launched their service in Melbourne in 2013.

Uber drivers get a significant benefit over their competitors in traditional taxis. In particular, as they don't have the fixed monthly payment to rent a taxi license, they don't have to work every day and can even take holidays or take time to clean the cars. These things may simultaneously benefit road safety and passenger comfort.

Meanwhile, those people who speculated on the old taxi licenses have tried hunger strikes and all kinds of other desperate tactics to defer the inevitable loss of their "investment".

The reality is that crowdsourcing is here to stay. Even if Uber is stopped by bullying and intimidation, the inefficiency of Melbourne's taxi system is plain for all to see and both customers and drivers will continue looking for alternatives. Other car-pooling apps based on barter or cost sharing will continue to find ways to operate even if the Uber model is prohibited.

It is interesting to note that the last great reform of Melbourne taxis, under Premier Jeff Kennett in the 1990s, simply resulted in a change of paint with the aim of making them look like those in New York City. Disruptive services like Uber (with their numerous technology-powered innovations to save time and money) appear to be doing far more to improve the lives of passengers and drivers.

The hidden cost

That said, large scale schemes like Uber do also have a down side for customer privacy. Hailing cabs in the street leaves no records of your movements. This new model, however, is leaving a very detailed trail of breadcrumbs that can be used for both marketing purposes or extracted (lawfully or otherwise) by some third party who wishes to monitor a particular customer's past or future movements. This is the trade-off that arises when we benefit from the efficiencies of any cloud-based service.

Ronnie Tucker: Debian 7.5 “Wheezy” Live CD Now Available for Download

Planet Ubuntu - Sun, 2014-05-11 04:20

The Debian project has released the new Live CD images for the latest version of Debian 7.5 “Wheezy,” that was made available a week ago. When a new point release of Debian is made available, the Live CD version of that distro is not accessible to users right away. It usually takes about a week for the Debian Live CD team to put together the new releases. All the Debian flavors have gotten their own Live Cd, including LXDE, GNOME, KDE, and the Rescue CD. The default implementation is Xfce.

Source:

http://news.softpedia.com/news/Debian-7-5-Wheezy-Live-CD-Now-Available-for-Download-441273.shtml

Submitted by: Silviu Stahie

Paul Tagliamonte: First test deployment of Lenin

Planet Ubuntu - Sun, 2014-05-11 03:16

Hello, World!

I’ve deployed my first instance of lenin to my backup VCS (lucifer.pault.ag), and it’s going great.

(Screenshot of the first few instances for good measure)

I’m excited to see how it develops!

Pages

Subscribe to Free Software Magazine aggregator