Planet Ubuntu
Subscribe to Planet Ubuntu feed
Planet Ubuntu - http://planet.ubuntu.com/
Updated: 12 min 53 sec ago

Aurélien Gâteau: Yokadi 0.14.0

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

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?

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

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

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!

Valorie Zimmerman: Good Advice from Bad People: Selected Wisdom from Murderers, Stock Swindlers, and Lance Armstrong

Sat, 2014-05-10 08:39
Wow, what a book title: Good Advice from Bad People: Selected Wisdom from Murderers, Stock Swindlers, and Lance Armstrong, by Zac Bissonnette. I heard the author talk about his book on the Tavis Smiley radio show earlier, and it made me think about Jonathan Haidt's point about how people have wonderful advice for others, even when they themselves seem unable to follow it.

That got me thinking about some recent discussions, arguments and even fights in the KDE community in the past few months. Some arguments are exciting. You hear the deep thinking, the examination and presentation of fresh points of view, and hear people thinking together. This is what we want for every conversation! But sometimes instead, you hear criticism, to which the reaction is defensiveness. This is painful to watch, as both (or all) sides are injured, and their hurt is being ignored.

What makes the difference? It seems to me what is lacking in the second scenario is trust. Haidt advises asking people for their advice and judgement about you, and listening with an open mind and heart.  That is rather hard to do when it is your project that is being measured and criticized. Yet it is critical to success, because we often literally cannot see flaws in our processes and products that others can see quite clearly.

One thing that has bothered me for years in the whole FLOSS movement is the attitude towards users, as "lusers." I know that started out as a pun, but it seems to me that it correctly labels the orientation that developers often have. Good projects have people who use bug reports, critical blog posts and complaints on the lists, forums and IRC as feedback, in order to not just fix crashes, but to make their product better. Projects in trouble make it difficult to file bugs, or simply ignore them, and rather than viewing criticism as feedback, interpret it as a personal attack.

Unfortunately, I am seeing this defensive attitude far too often lately in KDE. This can happen within teams, when someone proposes a new idea, and then others shoot it down. I don't mean they dispute the idea, or propose a different alternative, but rather state the criticism in a take-no-prisoners way. I've also seen this after a release, when an aspect of the new application or feature is criticized by users. Rather than collaborating with the reporters, to make the application or feature better, the discussion is framed as a war by both sides. In other words, "KDE developers are dictators" vs. "KDE users/distributions/packagers hate progress".

Guess what? Wars aren't productive of good software, and are destructive to every combatant and even those within earshot. Fortunately, later I heard Ed Catmull, the co-founder of Pixar Animation Studios and president of Pixar and Disney animation, about managing creative people and his new book Creativity Inc: Overcoming The Unseen Forces That Stand In The Way Of True Inspiration. Catmull gives the credit for the success of Pixar to an open, nurturing work environment. I think we need to focus on this more in our community. It should be safe for anyone to talk to anybody. According to Catmull, at Pixar they assume that any movie is crap when they start out. But somewhere in the idea is some spark that can become great. He says,
I've spent nearly forty years thinking about how to help smart, ambitious people work effectively with one another. The way I see it, my job as a manager is to create a fertile environment, keep it healthy, and watch for the things that undermine it....The thesis of this book is that there are many blocks to creativity, but there are active steps we can take to protect the creative process....identifying these destructive forces isn't merely a philosophical exercise. It is a crucial, central mission.He used a term I love, candor. He says that creating a safe space where people can fully express their thoughts and feelings is key to keeping creativity flowing. Of course I'm going to read this book! Here is the interview (11 minutes): kuow.org/post/president-pixar-and-disney-animation-fostering-creativity.

We already have the Team Health Check which can be found here: permalink.gmane.org/gmane.comp.kde.devel.plasma/19755. I'll use Catmull's book to look again at that team tool, and see if it can be improved.

For now, I hope that before any of us speaks or writes, we'll think about our choice of words. Candor is crucial. Remember though, that feedback can be framed as helpful information, or as an attack. You might mean your feedback as helpful, but can it be read as harsh criticism? If so, please edit before publishing. Developers, think about how to invite candor, by asking others for their honest feedback. Welcome reports of problems, bug reports, and respond in a collaborative way. If you need someone to triage bugs to keep sane, ask for that help! Everything you can do to lower the barriers to honest criticism, the better your work products will be.

Pages