Does owncloud really requires a server-side backend?

Hi planetkde, hi readers from planet gnome (so called aliens1),

I’ve just stumbled upon a blog post dealing with a potential collaboration of KDE and gnome to initiate a replacement for dropbox, called ownCloud.

There are already thoughts about possible GSoC projects giving attention to the gnome/KDE frontend clients and to the server backend.

Nice idea, but in my humble opinion there is a problem, at least for me: I haven’t a hosted root server, but a lot of unix accounts with user webspace, where it is impossible to run any kind of background services/daemons.

Think of:

  • university accounts
  • (scientific) institute accounts
  • accounts from your IT related work

Think of people, who probably use linux.

In the case that ownCloud is meant to be the centre of all data synchronisations, it would be sad that those people who only have webspace cannot take advantage of it.

So I encourage the developer to design the ownCloud in a way that makes the server-side backend software only optional, but not a requirement.

This would be similar to git, which can use a server side backend (git://), but is also satisfied with a simple sftp connection (ssh://). (Please correct me if I am wrong.)

After all you might want to read an article about the disadvantages of SaaS published by Exaggerated message in one sentence: Don’t get dependant of other people server services. :wink:

  1. Just a joke. Don’t take it serious. ↩︎

The next Klipper action

In my last blog entry I explained how to send the clipboard content via KDE Klipper to a pastebin service.

Now I wrote a quick-and-dirty script to transform a URI in the clipboard to a shortenend version using (U R One; it is GPL).

I never figured out how to get automatic URL shortening with and Choqok. That’s a kind of universal work-around for me.

Copy the file ur1.rb to a folder which is in your $PATH and add a Klipper action as I explained in the last post. To setup your Klipper action you will need the following:

RegExp for matching URLs
Command for Klipper action
ur1.rb %s

You can trigger actions manually by <Ctrl>+<Alt>+<R> (KDE default).


Copy this file to your ~/bin and make it executable.

ur1.rb URL

The script will return the url in case of no errors and otherwise a short string indicating the error.

#!/usr/bin/env ruby
# kate: remove-trailing-space on; replace-trailing-space-save on; indent-width 2; indent-mode ruby; syntax ruby;
# ur1.rb

require 'net/http'
require 'cgi'
require 'uri'

URL = URI.parse ""
raise if ARGV.size == 0
longurl = ARGV[0]

http =, URL.port

query_string = "longurl=#{CGI.escape longurl}"

response, body = http.start do |http| URL.path, query_string

abort "error (wrong response code)" unless response.code == '200'

puts (body[/<p class="success">Your ur1 is: <a href="(.+)"/,1] or "error (no url returned)")


Copy your clipboard to the pastebin

Klipper Menu When you are a power IRC user, you might know the problem. You cannot copy the whole source code, error message or log file etc. directly in the IRC channel. You need a pastebin. I like really much. It has a clean interface and supports highlighting for many languages. But how to copy the text to the pastebin in a handy and short way?

Do the following to copy the clipboard content to the pastebin by a simple <Ctrl>+<Alt>+<R> (global shortcut to open Klipper actions) and a click:

  • Copy the file pastie.rb to a folder which is in your $PATH
  • Make the file executable for you
  • Edit the actions of Klipper and add for the .* Regexp (means: no special string) a new action (do not activate automatic).
  • Add the command echo '%s' | pastie.rb, feedback should go to clipboard and set the description to “post as plain text” for instance
  • You can add another command echo '%s' | pastie.rb -f ruby to paste the text with ruby syntax highlighting

Klipper Settings After that you should be able to send your clipboard to the pastebin with one selection (to copy text into clipboard), one hotkey (to trigger Klipper actions) and one click (to choose between different highlighters). You can paste the URL with a single click on the middle button of your mouse. You don’t even have to open the pastebin page yourself!

I like it. Just want to share this with you in the case you was locking for something similiar. :)


Copy this file to your ~/bin and make it executable.

A big thank to the unknown author of this file. I found it via google on and did only some minor modifications on it.

You can use the pastie.rb script via command line by pipe a file to it. To set the code highlighting use the switch -f LANG. To get all supported languages you want to try a pastie.rb -h.

#!/usr/bin/env ruby
# kate: remove-trailing-space on; replace-trailing-space-save on; indent-width 2; indent-mode ruby; syntax ruby;
# file: pastie.rb

require 'net/http'
require 'optparse'
require 'timeout'
require 'cgi'
require 'uri'

class Hash

  def to_query_string
    map { |k, v|
      if v.instance_of?(Hash) { |sk, sv|


module Pastie

  AVAILABLE_PARSERS = %w( objective-c++ actionscript ruby ruby_on_rails diff
    plain_text c++ css java javascript html html_rails shell shell-unix-generic
    sql php python pascal perl yaml csharp go apache lua io lisp d erlang fortran
    haskell literate_haskell makefile scala scheme smarty ini nu tex clojure

  class API

    PASTIE_URL = URI.parse ""

    def paste(body, format = 'plain_text', is_private = false)
      raise InvalidParser unless valid_parser? format

      http =, PASTIE_URL.port

      query_string = { :paste => {
        :body => CGI.escape(body),
        :parser => format,
        :restricted => is_private,
        :authorization => 'burger'

      response, body = http.start do |http| PASTIE_URL.path, query_string

      raise Pastie::Error unless response.code == '302'



    def valid_parser?(format)
      Pastie::AVAILABLE_PARSERS.include? format


  class Error < StandardError; end
  class InvalidParser < StandardError; end

  class ConsoleOptions

    attr_reader :parser, :options

    def initialize
      @options = {
        :format => 'plain_text',
        :private => false

      @parser = do |cmd|
        cmd.banner = "Ruby Pastie CLI - takes paste input from STDIN"

        cmd.separator ''

        cmd.on('-h', '--help', 'Displays this help message') do
          puts @parser

        cmd.on('-f', '--format FORMAT', "The format of the text being pasted. Available parsers: #{Pastie::AVAILABLE_PARSERS.join(', ')}") do |format|
          @options[:format] = format

        cmd.on('-p', '--private', 'Create a private paste') do
          @options[:private] = true

    def run arguments

      body = ''

      Timeout.timeout(1) do
        body +=

      if body.strip.empty?
        puts "Please pipe in some content to paste on STDIN."
        exit 1

      pastie =
      puts pastie.paste(body, @options[:format], @options[:private])

      exit 0
    rescue InvalidParser
      puts "Please specify a valid format parser."
      exit 1
    rescue Error
      puts "An unknown error occurred"
      exit 1
    rescue Timeout::Error
      puts "Could not read from STDIN."
      exit 1

if ($0 == __FILE__)
  app =


Call for Konqueror related GSoC 2010 projects

I really wonder why there are no Konqueror related idea for a GSoC 2010 project in the KDE Community Wiki.

The last opensuse version ships Firefox as default browser, there are some other attempts of a kde based browser (rekonq, etc.), but I think that nothing can replace Konqueror in the next time concerning consumption of resources. Konqueror is so fast using pdf viewer KPart Okular while Firefox almost hangs up with proprietary plugin adobe reader. Which other browser can split its view and show pdf viewer and webpages at the same time? KatePart is also very handy.

I mean it’s wrong to think that other Qt based browsers can replace Konqueror in the next time. Even the inexperienced user wants to use KPart Okular.

However, I use Firefox, because it doesn’t use kthml has awesome bookmark tagging and can be synced with Mozilla Weave. It would be nice to see these features prospectively integrated in Konqueror, too.

What do you think? Can we bring Konqueror to the next level?


GUI integrating KDE libkonsolepart To get a shell in your GUI, you don’t have to reinvent the wheel - just use the KonsolePart provided by KDE KParts. If you use the KDE environment you already know the libkonsolepart, because Dolphin, Konqueror, Kate, Yakuake, etc. take usage of it.

To get this small demo run, you need a KDE version already containing SVN commit 1085699 (ttanks no Arno, who made the Part accessable within ruby). The opensuse buildservice should provide a package ruby-kde4 in Factory Repo, but I build I didn’t test it.

Just copy both files in the same directory, make the main.rb executable and run it.

The example contains a little bit more than neccessary, because it implements a fully customizable menus/toolbars via KXmlWindow and shows how to use actions and slots.

To get only the KonsolePart widget, you only have to look at the KonsolePart class. The class itself bases on a short code example from Arno. Kudos to him!

For further explanation just take a look at the source code.


You can change the working directory for the built-in shell by a nice dialog and can execute some command by the lineedit. To send your command to the shell, you have to press enter.

I know there are a lot of bugs. :wink: But it is just a quick and dirty demo.


#!/usr/bin/env ruby

$KCODE = 'u'

require 'korundum4'

class KonsolePart

  def initialize parent

    factory ="libkonsolepart").factory
    @part = factory.create("KParts::ReadOnlyPart", parent, nil, [], "")

    @terminal = @part.qobject_cast(KDE::TerminalInterfaceV2)

    if @terminal.nil?
      @terminal = @part.qobject_cast(KDE::TerminalInterface)



  def widget

  def pwd path = '.'
    @terminal.show_shell_in_dir path

  def cmd input
    @terminal.send_input input


class CustomWidget < KDE::XmlGuiWindow

  slots :changedir, :docmd

  def initialize( parent = nil )


    resize( 800, 600 )

    ##### Prepare Central Widget
    @centralwidget = self
    setCentralWidget @centralwidget

    #### Build window layout
    @centralWidgetVLayout = @centralwidget

    @kPBtnChangePwd = @centralwidget
    @kPBtnChangePwd.connect( :clicked, self, :changedir)
    @centralWidgetVLayout.addWidget @kPBtnChangePwd
    @kLineEdt = @centralwidget
    @kLineEdt.connect( :returnPressed, self, :docmd )
    @centralWidgetVLayout.addWidget @kLineEdt

    ##### Build Konsole Panel
    @konsoleDockWidget = self
    @konsoleDockWidget.objectName = "konsoleDockWidget"
    @konsoleDockWidget.features = Qt::DockWidget::AllDockWidgetFeatures
    @mykonsole = @konsoleDockWidget
    @konsoleDockWidget.setWidget @mykonsole.widget
    addDockWidget Qt::BottomDockWidgetArea, @konsoleDockWidget

    ##### Prepare actions
    @closeAction = KDE::StandardAction::quit( self, SLOT( :close ), actionCollection )
    actionCollection.addAction "toggle_konsole", @konsoleDockWidget.toggleViewAction

    ##### Prepare GUI
    setupGUI( Default, File.dirname( File.expand_path( __FILE__ ) ) + "/ui.rc" )


  def changedir
    folder = %x{ kdialog --getexistingdirectory . }
    @mykonsole.cmd "cd #{folder}" unless folder.nil?

  def docmd
    @mykonsole.cmd "#{@kLineEdt.text}\n"
    @kLineEdt.text = ""

  def retranslate_ui
    setWindowTitle i18n "KPlaylistTool"
    @konsoleDockWidget.setWindowTitle i18n "Konsole"
    @kPBtnChangePwd.setText i18n "Change Directory"

about ="konsoleinruby", "konqueror", KDE.ki18n("Konsole in Ruby"), "0.1", KDE::ki18n("A short description"), KDE::AboutData::License_GPL_V3, KDE::ki18n("© 2010 Robert Riemann"), KDE::ki18n("See for Updates"), "", "" )
about.setProgramIconName  "plasma"
KDE::CmdLineArgs.init(ARGV, about)
a =
w =



<?xml version="1.0" encoding="UTF-8"?>
<gui name="konsole_in_ruby">
               " >
    <Menu name="file" >
    <Menu name="view" >
      <Action name="toggle_konsole" />
  <ToolBar name="mainToolBar" >
    <text>Main Toolbar</text>
    <Action name="toggle_konsole" />
    <Action name="file_quit" />