Главная | Actual Topics | Обратная связь | В избранное | Сделать домашней | Антиспам ;)
 System & Utilities
 Unix News
 OS Emulator
Каталог статей
Все статьи

Биллу Гейтсу тоже предлагают избавиться ...
Вымогательство в борьбе со спамом

February, 2019
Какой из этих ОС Вы отдаете большее предпочтение?

Mac OS
Windows XP
Windows 2003
Что такое ОС? :)

Другие опросы

Всего голосов: 327
Комментарии: 0

Архив Новостей
 February 2019 (5)
 January 2019 (9)
 December 2018 (13)
 November 2018 (7)
 October 2018 (13)
 September 2018 (8)
 August 2018 (8)
 July 2018 (11)
 June 2018 (13)
 May 2018 (10)
 April 2018 (14)
 March 2018 (11)
 February 2018 (13)
 January 2018 (13)
 December 2017 (14)
 November 2017 (15)
 October 2017 (19)
 September 2017 (18)
 August 2017 (13)
 February 2017 (14)
 January 2017 (19)
 December 2016 (16)
 November 2016 (16)
 October 2016 (21)
 September 2016 (18)
 August 2016 (16)
 July 2016 (16)
 June 2016 (20)
 May 2016 (18)
 April 2016 (15)
 March 2016 (22)
 February 2016 (17)
 January 2016 (15)
 December 2015 (15)
 November 2015 (22)
 October 2015 (20)
 September 2015 (17)
 August 2015 (25)
 July 2015 (20)
 June 2015 (23)
 May 2015 (21)
 April 2015 (17)
 March 2015 (19)
 February 2015 (9)
 January 2015 (23)
 December 2014 (9)
 November 2014 (13)
 October 2014 (12)
 September 2014 (18)
 August 2014 (20)
 July 2014 (10)
 June 2014 (12)
 May 2014 (12)
 April 2014 (10)
 March 2014 (22)
 February 2014 (10)
 January 2014 (8)
 December 2013 (26)
 November 2013 (53)
 October 2013 (40)
 September 2013 (48)
 August 2013 (63)
 July 2013 (56)
 June 2013 (52)
 May 2013 (49)
 April 2013 (67)
 March 2013 (74)
 February 2013 (63)
 January 2013 (62)
 December 2012 (62)
 November 2012 (66)
 October 2012 (68)
 September 2012 (48)
 August 2012 (75)
 July 2012 (60)
 June 2012 (71)
 May 2012 (69)
 April 2012 (85)
 March 2012 (86)
 February 2012 (90)
 January 2012 (81)
 December 2011 (103)
 November 2011 (118)
 October 2011 (74)
 September 2011 (2)
 June 2011 (110)
 May 2011 (118)
 April 2011 (111)
 March 2011 (112)
 February 2011 (101)
 January 2011 (119)
 December 2010 (117)
 November 2010 (118)
 October 2010 (131)
 September 2010 (117)
 August 2010 (226)
 July 2010 (351)
 June 2010 (305)
 May 2010 (319)
 April 2010 (343)
 March 2010 (329)
 February 2010 (311)
 January 2010 (312)
 December 2009 (266)
 November 2009 (156)
 July 2009 (101)
 June 2009 (279)
 May 2009 (365)
 April 2009 (348)
 March 2009 (347)
 February 2009 (323)
 January 2009 (318)
 December 2008 (237)
 November 2008 (155)
 October 2008 (334)
 September 2008 (310)
 August 2008 (343)
 July 2008 (362)
 June 2008 (322)
 May 2008 (433)
 April 2008 (1276)
 March 2008 (1658)
 February 2008 (250)
 January 2008 (6)
 November 2007 (1)
 September 2007 (1)
 June 2007 (1)
 May 2007 (1)
 March 2007 (1)
 January 2007 (2)
 December 2006 (1)
 October 2006 (2)
 September 2006 (1)
 August 2006 (2)

Harald Sitter (apachelogger): Ubuntu One – Technical Aspects

System & Utilities

Following my post on Ubuntu One in KDE I would now like to take a closer look at how Ubuntu One works using KDE technologies and what the current state of affairs is. So be prepared for a lot of technical blah :)

Something I need to make clear up front is that the KDE client does not connect to the Ubuntu One servers itself. This will probably sound odd to you, so let me explain just how both the KDE and GNOME clients generally work. There is a helper application for authentication (in up to 10.04 called ubuntuone-auth, in 10.10 and above ubuntu-sso-client) that handles authentication to Ubuntu One. Secondly there is a synchronization component called SyncDaemon, as one can assume it handles synchronization of data and is essentially the gateway to the the servers. Thirdly there are clients that talk to the SyncDaemon. Such a client could be a tray icon that informs you whether your SyncDaemon is actually connected or not. But it could just as well be an application to manage your shares. I implemented 2 of those using KDE or Qt technologies, namely the client structures and the authentication helper. I did not reimplement the SyncDaemon!

Let me quickly reason why redoing the SyncDaemon did not make much sense to me. The most obvious thing is that it does not depend on GNOME bits (for the better part) so there would be considerable less gain from rewriting it in Qt or KDE. Also since the SyncDaemon is essentially the central component with which everything stands or falls you do not want to have 2 implementations floating around as a fix applied to one will not be applied to the other and due to that increase potential issues the user has. Also the things SyncDaemon does are not trivial enough to assume everything will just work out after some initially high effort. That is why ubuntuone-kde is using the SyncDaemon from the regular ubuntuone-client which mostly works just fine since the daemon exposes all essential API via DBus which is very cross-platform and cross-desktop and cross-language (i.e. I like the approach).

What I created in my GSoC project can be divided into 3 parts:

  1. Authentication
  2. Libraries
  3. User interfaces

1. Authentication

What originally started off as ubuntuone-auth, when I began the project is now called ubuntu-sso-qt. The GNOME version (ubuntu-sso-client) just like the SyncDaemon exposes DBus interfaces through which authentication is handled. The basic work flow at this point is that a client requests authentication to an OAuth realm, SSO will look for an appropriate token entry in the supported keyrings and yield success if it found one, otherwise it will get an authentication process going and then yields success (or failure, depending on the outcome ;) ). Suffice to say creating this was not terribly difficult to do but nonetheless very interesting.

One of the key aspects of this application is that it starts an own web server to make the OAuth experience better than what we are used to. I am sure everyone hit a dialog asking you to press OK once you have authenticated and authorized the application, upon which a browser opens with some website to ask you to authenticate something (you can see that sort of thing with the Facebook KIPI plugin for example). Instead of dropping such a dialog Ubuntu SSO will just launch a minimal HTTP server and tell the SSO server (or rather the Ubuntu One one) to send the browser back to that local server with OAuth token in the URL. The local server then extracts the OAuth information and redirects the browser the the proper Ubuntu One web interface. At this point OAuthentication is basically done and applications/libraries can use the token to access Ubuntu One.

In case you are interested, the HTTPDaemon is here.

The second nice thing about the Qt implementation is that it provides a plugin interface for secret storage services. That way it is possible to use any keyring/wallet as long as a plugin for it is available. Clearly this is a very good thing because without a lot of programming effort it now supports KWallet and GNOME Keyring while being itself implemented in Qt only, so technically one could also use it on OS X and Windows and one would just need to write additional plugins. It also helps with the fact that (hopefully) soon a new implementation will become available as proposed at for which just another plugin is necessary.

And the best thing about my implementation is that, unlike the GNOME version, it is not written in Python and hence not eating away your memory right after startup for no good reason at all. In a KDE system it will use about 0.1 MiB when idle and about 1 MiB when doing an authentication. Finally, just to make my point of Python not necessarily being the better choice: the undynamic C++ version supports KWallet and GNOME Keyring while the Python version only does GNOME Keyring :P

More recently I became aware that the Ubuntu One team is working on enhancing the client to actually provide GUIs and what not, to totally eliminate the need for a browser window, which is probably a good idea. So, that is something one could look into for the future. Also it should be made central gateway to tokens, while right now each consumer will still lookup the received tokens directly via the keyring/wallet it would make a lot more sense to have Ubuntu SSO send the token in encrypted manner via DBus. I certainly think that using the proposed secrets storage API for inspiration on that would not be the worst of things.

2. Libraries

I created 2 libraries for use with Ubuntu One clients in a KDE system.

One is for read-only access to the REST server API with which one can get data about the authenticated user, his subscriptions, his authorized devices and his quota. This library is actually very simple to use but got some fine internals, in fact I spent hours just looking at the code and scrolling through its glory (because there was a bug ;-) ). I think two things are very much worth mentioning about this library. First of all it is working asynchronous through and through (how else considering it is talking to a REST API). The consumer basically opens an interface, waits until it reports readyness (which it reaches once authorized and received a token) and then just tells it what data to get, one received the library emits appropriate signals and the consumer can use the data. Communication between library and server happens using JSON which gets nicely deserialized using QJSON. For more information on deserialization challenges with QJSON please revisit my blog post ♥ QJSON ♥, which explains how I solved (or rather worked around) the problem of deserializing nested objects from JSON to QObjects.
Currently the only user of this library is the information KCM (KDE configuration module) as seen in the General section of System Setting’s Ubuntu One category and in KInfoCenter.

Obviously what is missing here is some caching system. After all, since it is asynchronous it will take a considerable amount of time until the interface comes back with data, especially on slow connection. Yet for data like user information and quota it would absolutely make sense to cache them and use the cached data right away and if necessary emit update signals once the server returned.

The second library is used for accessing the local SyncDaemon and hence the real heart of ubuntone-kde. Central master piece of this library is a Qt DBus interface to the SyncDaemon which then gets wrapped into own API interfaces. The DBus interfaces do not get exposed directly to the library users but instead each method/signal needs an appropriate counterpart in the actual library. This was done to be able to ensure ABI and API stability from inside the library, so that applications built against libubuntuone-kde would not need to be recompiled just because an interface in the actual SyncDaemon was renamed, also it has the advantage of allowing us to apply Qt/KDE API naming standards and finally it makes it less problematic to work around naming clashes (for example one method of the SyncDaemon is called delete, which conflicts with C++’ delete).

What is used quite a bit in the library is the Qt DBus type system. The “problem” with the SyncDaemon’s DBus interfaces is that they use a lot of more-or-less complex data types that are almost all represented via QVariantMaps. Now as those maps are not exactly guaranteeing binary compatibility they need to be deserialized into proper objects, which is not that difficult in Qt but a bit nifty to get working properly. I will probably blog about this in detail sometime soon since I think that some things ought to be pointed out for future uses.
Currently the library implements complete status control over the SyncDaemon as well as control over shares and folders (folders in this context means folders that are synchronized with Ubuntu One).

Through all those library stuff I learned a lot about d and q pointers (never mind me if you do not know what those are) and also about library design in general.

3. User interfaces

Last but not least the user interfaces… Currently builing is a Status Notifier (system tray icon), a set of KCMs, a helper application to setup shares as well as a somewhat usable Dolphin plugin. The only really interesting thing here are the KCMs (also probably only because they contain a lot of stuff that could really go into a GUI library for Ubuntu One).

The Status Notifier is very straight forward since most of the things are happening in libubuntuone-kde. Basically what is going on is that the Status Notifier initializes the library and asks it to connect, then it just hooks up with appropriate signals from the status part of the library and takes appropriate actions upon incoming signals. Actions are mostly as simple as setting a new icon and tooltip and state. And that is essentially all that is going on there. Other than that it delegates all jobs to other parts. Lazy thing…

Ubuntuone-share is the name of a helper application that guides the user through setting up a new Ubuntu One share. It is a simple dialog in 3 steps. First the user must select the folder she wants to share, then she has to select the contact(s) to share this folder with and finally give the share a name and mark it readable or writable. Contact selection is provided by using an Akonadi contacts view/model so the user has direct access to all her Akonadi stored address book data which should make creating a share super easy.

KCMs are nice widgets primarily meant for configuration. KCMs are used in all sorts of places but mostly in System Settings and I want to be honest with you, I am pretty much in love with KCMs, because, since they are essentially just fancy QWidgets you can use them just like that and for example nest one KCM in another KCM without anyone ever knowing that it is a KCM of its own. Additionally KInfoCenter uses KCMs.
Suffice to say, I have plent of KCMs and I also nested one in anther … The General KCM which displays some general information about the user’s Ubuntu One account and throttling and autostart settings is in fact embedding the info KCM which is used in KInfoCenter and just adds throttling and autostart below the Info KCM, very funky I must say. But that is not all the Ubuntu One KCM part has to offer. In fact right now the KCM folder seems more like a GUI extension to libubuntuone-kde since it contains plain widgets for various types of data as well as custom model/views for folder management and the like. In general if I recall correctly all KCMs are using at least one plain widget and just create surrounding to it, so I expect that some of the stuff in there could be moved to a library in the future when more GUI classes grow.
Only through GSoC I fell in love with KCMs :-*

I did not write about the Dolphin plugin in my previous post, because I do not feel that it is anywhere near production quality, not only did I not test it a lot but also is it a bit limited and hackish. This becomes very apparent if you look at the header file … yes, the Ubuntu One Dolphin plugin is a VCS plugin ;) That is however more because Dolphin does currently not support any other plugin type, but I also must say the difference between Ubuntu One and a VCS are not that big from a file manager point of view. I will try to get a more appropriate plugin interface going for KDE SC 4.6, so that one can create proper file sync plugins. For the time being however I cannot advertise the plugin for ethic reasons.

There is also a lot things left to be done in the user interface department. For example Share management is not yet implemented also general UI love is always needed.

If you feel like helping out, please mail to or ping me on IRC :)


Разместил: Planet KDE | Дата: 21.08.2010 | Прочитано: 1101 | Раздел: System & Utilities   
16 | System & Utilities | | Planet KDE |

Рейтинг статьи

Средняя оценка: 0.00/0Средняя оценка: 0Всего голосов:0

Хорошо Нормально Пойдёт Плохо

Смотрите также связанные темы

29.04.2008 В ядро будет включена поддержка USB-видеоустройств
Известный разработчик ядра Грег Кроа-Хартман [Greg Kroah-Hartman] дал интервью немецкому журналу Он упомянул, что драйвер для USB-видеоустройств (UVC) планируется официально включить в ядро. Именно с этим драйвером работает большинство веб-камер. На данный момент драйвер уже включен в ядро в некоторых дистрибутивах (Ubuntu, Fedora). Остальным необходимо было патчить ядро самостоятельно.
30.04.2008 Above the fold: April 29
Recent articles of interest in the trade press. (And check out Planet V12n as well -- I'm very impressed these days with the quality of blog conversation, both strategic and tactical/technical that's going on there. Check out Scott's take on...
22.12.2015 Best of Tutorials
One of the great aspects of open source is that there's always something new to learn. Many of us like to jump right in with new software or technology and learn by trial and error.
01.03.2016 [TORRENT] chakra-2016.02-ian-x86_64.iso
Chakra is a GNU/Linux distribution with an emphasis on KDE and Qt that focuses on simplicity from a technical standpoint and cutting-edge software, bringing the latest technologies to you, the user.
28.03.2016 Стартовал предзаказ на первый планшет с Ubuntu Touch
Компания bq объявила о старте предзаказа на Aquaris M10 Ubuntu Edition — первого устройства с Ubuntu Touch с поддержкой конвергенции.Для заказа доступны два варианта, отличающиеся разрешением экрана.Aquaris M10 HD: экран: IPS 10,1". Для НD модели 1280 x 800 — 160 ppi, для FHD модели 1920 x 1200 — 240 ppi; процессор: MediaTek Quad Core MT8163A; GPU: MediaTek Mali-T720 MP2; оперативная память: 2 GB; аккумулятор: LiPo 7280 mAh; память: 16 GB eMMC, возможность расширения с помощью microSD; размеры: 246 x 171 x 8,2 mm; камера: 8 MP (передня 5 MP); комм...
28.03.2016 Стартовал предзаказ на первый планшет с Ubuntu Touch
Компания bq объявила о старте предзаказа на Aquaris M10 Ubuntu Edition — первого устройства с Ubuntu Touch с поддержкой конвергенции.Для заказа доступны два варианта, отличающиеся разрешением экрана.Aquaris M10 HD: экран: IPS 10,1". Для НD модели 1280 x 800 — 160 ppi, для FHD модели 1920 x 1200 — 240 ppi; процессор: MediaTek Quad Core MT8163A; GPU: MediaTek Mali-T720 MP2; оперативная память: 2 GB; аккумулятор: LiPo 7280 mAh; память: 16 GB eMMC, возможность расширения с помощью microSD; размеры: 246 x 171 x 8,2 mm; камера: 8 MP (передня 5 MP); комм...
20.06.2016 [Linux и BSD]: новости, статьи, свежий софт от LinuxRSP.RU #447
+ Вышел RhodeCode 4.1 + Snap-пакеты из Ubuntu теперь работают и в других дистрибутивах + Выпущена Восьмая платформа BaseALT + Состоялся релиз открытой аппаратной платформы icoBoard 1.0 + Релиз компилятора SDCC 3.6.0 + Релиз Qt 5.7.0 и Qt Creator 4.0.2 + Первый релиз Nextcloud, форка ownCloud + Релиз LibreCAD 2.1.0. Команде разработчиков нужна помощь! + До конца года состоится выход российских смартфонов на ОС Sailfish + Программа PyCon Russia 2016 готова + Haskell: GHC 8.0.1 + Доступен i2pd 2.7.0, клиент анонимной сети I2P, написанный на языке C++ + Вышла версия 0.7 beta QMole - порт Linux на ...
05.12.2016 Canonical предложила пользователям Ubuntu Linux коммерческую поддержку Docker
На прошлой неделе компания Canonical, стоящая за Linux-дистрибутивом Ubuntu, объявила о сотрудничестве с Docker для возможности предоставления коммерческой технической поддержки по одноимённому продукту для Linux-контейнеров. В рамках достигнутого соглашения Docker Inc будет публиковать и обновлять новые версии Docker в виде snap-пакетов для Ubuntu, а Canonical — предлагать техническую поддержку двух уровней (Level 1 и Level 2) для коммерческой версии Docker Engine (Commercially…
27.11.2017 Вышел Linux Mint 18.3 «Sylvia» в редакциях с Cinnamon 3.6 и MATE 1.18
Сегодня был представлен выпуск новой версии популярного дистрибутива Linux Mint — 18.3 под кодовым названием «Sylvia». На данный момент анонсировано обновление двух редакций: с Cinnamon и MATE. Релиз Linux Mint 18.3 имеет статус LTS (long term support), который означает его поддержку до 2021 года. Он основан на ядре Linux 4.10 и пакетной базе Ubuntu 16.04. Главным изменением в дистрибутиве называется обновлённый менеджер…
19.04.2018 Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More
Help Canonical test the GNOME desktop memory leak fixes in Ubuntu 18.04 LTS by downloading and installing the current daily ISO for your hardware from here: . Then download the patched version of gjs, install, reboot, and then just use your desktop normally.
Нет комментариев. Почему бы Вам не оставить свой?
Вы не можете отправить комментарий анонимно, пожалуйста зарегистрируйтесь.
Google Search


Топ Новостей
1: Fedora and KDE/spin\'s treatment - Discussion
Просмотров - 3263

2: Offline Vaults for an extra layer of protection
Просмотров - 818

3: KDE\'s Kirigami 2.0 Framework for Convergent UIs Enters Beta with New Features
Просмотров - 793

4: Come dine with the KDE e.V. board in Berlin in October
Просмотров - 712

5: Akonadi/KMail issues on Tumbleweed?
Просмотров - 710

6: Debugging issues booting a PC in 2018
Просмотров - 704

7: Netrunner Desktop 16.09 "Avalon" Linux OS Is Out with Kernel 4.7, KDE Plasma 5.7
Просмотров - 688

8: plib3.gui 0.9.9
Просмотров - 674

9: KDevelop 5.0.2 released for Windows and Linux
Просмотров - 672

10: Konstruct
Просмотров - 659

11: KDE Connect Sprint
Просмотров - 640

12: KDE Connect – State of the union
Просмотров - 639

13: Best Desktop Environment
Просмотров - 638

14: Help Canonical Test GNOME Patches, Android Apps Illegally Tracking Kids, MySQL 8.0 Released and More
Просмотров - 631

15: Bluestar Gives Arch Linux a Celestial Glow
Просмотров - 615

Google 120X240

Главная | Actual Topics | Статьи | Обратная связь | Guest Book
Генерация: 1.342 сек. и 13 запросов к базе данных за 1.252 сек.
Powered by SLAED CMS © 2005-2007 SLAED. All rights reserved.