Small howto on Kde Connect and Ubuntu

Kde Connect is a project aiming on integrating different devices with your KDE Desktop. It was a Google Summer of Code project and I have to say it is rather promising.

UPDATE

Albert Vaka has updated his blog with latest state of the software. Please read here

UPDATE2

http://blogs.kde.org/2013/09/10/kde-connect-kubuntu
In saucy kdeconnect is now in the repositories. No need to build yourself.

Update3
Latest version (03 okt 2013) lets you share files directly from your phone, to the kde connect app, and they show up on the desktop. This is good in so many ways.
 

Look at this short video on how it works

Update:

For everyone that has problems: I am not a KDE hacker. I reasoned out how to get this working reading comments and asking around. I am sorry I dont know how to solve the problems you have. Also as it is from a git – the source might have changed since i wrote the guide. 

 

To get it running on Ubuntu you need some dependencies sortet out first

sudo apt-get install cmake kdebase-workspace-dev libqjson-dev git libqca2-dev

When that is taken care of you can clone the repository

git clone git://anongit.kde.org/kdeconnect-kde

To compile do this:

cmake -DCMAKE_INSTALL_PREFIX=/usr ./
make
sudo make install

After that we just need to make kde aware of kde connect.
Important to run this as normal user

qdbus org.kde.kded /kded loadModule kdeconnect

This should return true. If not, it seems redoing the compilation can fix it. It did for me. So just try again.
After that we are almost there.

kbuildsycoca4 -noincremental

Now you can find devices in the kde system settings. Download the apk to your phone and make sure it is connected to the same network as your desktop.

Happy hacking!
Disclaimer: This is pre beta software. Dont expect it to work flawlessly.

 

61 thoughts on “Small howto on Kde Connect and Ubuntu”

    1. Dang! I hade another typo first, thought I changed it, and apparently changed it to another wrong. haha. Thanks for pointing it out! Happy hacking!

  1. Cannot get ‘true’ from qdbus org.kde.kded /kded loadModule kdeconnect. Have now tried redoing the compilation 4 times now :(

    1. Sorry cant help you then. The problem for me was that when i did cmake without the DCMAKE_INSTALL_PREFIX=/usr ./ I had the same problem.

      It might be that if you are on another version of Ubuntu it should be something else. But I honestly dont know where to look.

  2. Hi!. I just installed this on my desktop and i can’t get the battery monitor to work. other than that it works brilliantly.

    1. There is a patch for that. Have not tried it though. Look Albert vakas blog post that I linked

  3. Hey guys!
    I have some errors when I’m trying to install


    ~/kdeconnect-kded$ make
    [ 3%] Built target org.kde.kdeconnect.device.xml
    [ 3%] Built target org.kde.kdeconnect.daemon.xml
    [ 3%] Built target kded_kdeconnect_automoc
    Linking CXX shared module ../lib/kded_kdeconnect.so
    CMakeFiles/kded_kdeconnect.dir/networkpackage.o: In function `NetworkPackage::serialize() const':
    /home/myname/kdeconnect-kded/daemon/networkpackage.cpp:55: undefined reference to `QJson::Serializer::serialize(QVariant const&, bool*)'
    /home/myname/kdeconnect-kded/daemon/networkpackage.cpp:57: undefined reference to `QJson::Serializer::errorMessage() const'
    make[2]: *** [lib/kded_kdeconnect.so] Error 1
    make[1]: *** [daemon/CMakeFiles/kded_kdeconnect.dir/all] Error 2
    make: *** [all] Error 2

    Could you help me please, cause I’m not familiar with building from sources :)

    1. I’m getting the same error with Ubuntu 12.04 and Ubuntu 12.10 fresh installs. Any ideas? Geat idea. I’d love to try it out. Thanks.

  4. I follow the installion and went fine until this step:

    Important to run this as normal user
    qdbus org.kde.kded /kded loadModule kdeconnect

    which return the following message:

    Cannot find ‘.loadModule’ in object /kded at org.kde.kded

    Everything is all set on the phone. how can I fix this?

  5. When I ran the command

    qdbus org.kde.kded /kded loadModule kdeconnect

    it showed me another message:

    Cannot find ‘.loadModule’ in object /kded at org.kde.kded

    Do you know what’s the problem, or which I’ve done bad? I followed all the steps (copying and pasting commands) and did the compilation twice.

    Thanks in advance!

  6. This is awesome and works great, the only extra thing I had to do on my new install of Saucy Kubuntu was sudo apt-get install build-essential

  7. im getting
    Cannot find ‘.loadModule’ in object /kded at org.kde.kded
    also.
    have recomp more than once.
    and tried restart on computer then full process again and same problem

    1. I also got this error numerous times.

      I actually dont remember what i did to make it work. What version of ubuntu are you on? I only tried it on 12.04.

  8. A cleanner/safer way to compile and install:
    mkdir build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=`kde4-config –prefix` ../
    make
    sudo checkinstall

    This should work on any debian/ubuntu distro.

    1. I am not the app author. Please talk to Albert Vaka, first link in post will guide you to the right place.

  9. Same issue :/

    :~/kdeconnect-kded/build$ qdbus org.kde.kded /kded loadModule kdeconnect
    Cannot find ‘.loadModule’ in object /kded at org.kde.kded

  10. Guillermo that didnt work either. i removes the whole project and started from scratch. use you solution and no dice still getting the ”Cannot find ‘.loadModule’ in object /kded at org.kde.kded” issue.
    is there some kind of workaround for that step?
    anyways probly gonna just give up and hope that the dev keeps working on it and ill wait till a later date to spend anymore time on it.

  11. Ubuntu 12.04, followed your instructions, this is the result.

    root/kdeconnect-kded/daemon/networkpackage.cpp: In member function ‘QByteArray NetworkPackage::serialize() const’:
    /root/kdeconnect-kded/daemon/networkpackage.cpp:55:55: error: no matching function for call to ‘QJson::Serializer::serialize(QVariantMap&, bool*)’
    /root/kdeconnect-kded/daemon/networkpackage.cpp:55:55: note: candidates are:
    /usr/include/qjson/serializer.h:50:10: note: void QJson::Serializer::serialize(const QVariant&, QIODevice*, bool*)
    /usr/include/qjson/serializer.h:50:10: note: no known conversion for argument 2 from ‘bool*’ to ‘QIODevice*’
    /usr/include/qjson/serializer.h:62:16: note: QByteArray

    QJson::Serializer::serialize(const QVariant&)
    /usr/include/qjson/serializer.h:62:16: note: candidate expects 1 argument, 2 provided
    /root/kdeconnect-kded/daemon/networkpackage.cpp:57:58: error: ‘class QJson::Serializer’ has no member named ‘errorMessage’
    make[2]: *** [daemon/CMakeFiles/kded_kdeconnect.dir/networkpackage.o] Error 1
    make[1]: *** [daemon/CMakeFiles/kded_kdeconnect.dir/all] Error 2
    make: *** [all] Error 2

  12. Having a different issue trying to compile with Ubuntu 13.10….

    cmake -DCMAKE_INSTALL_PREFIX=`kde4-config –prefix` ../
    kde4-config: Unexpected argument ‘–prefix’.
    kde4-config: Use –help to get a list of available command line options.
    — Found Qt-Version 4.8.4 (using /usr/bin/qmake)
    — Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
    — Found KDE 4.11 include dir: /usr/include
    — Found KDE 4.11 library dir: /usr/lib
    — Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
    — Found automoc4: /usr/bin/automoc4
    CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
    Could NOT find QCA2 (missing: QCA2_LIBRARIES QCA2_INCLUDE_DIR)
    Call Stack (most recent call first):
    /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
    /usr/share/kde4/apps/cmake/modules/FindQCA2.cmake:44 (find_package_handle_standard_args)
    kded/plugins/ping/CMakeLists.txt:3 (find_package)

    — Configuring incomplete, errors occurred!

  13. Hi everybody!

    Kdeconnect seems to be a really great tool. I get to do all compilation steps, and I have a the device menu, but even when kdeconnect is installed on the android device, I send pairing requests but nothing is happening on the phone. Nobody mentionned this kind of problems.. (I’m so close to make it work.. :/).
    I am using a Galaxy Note with Cyanogenmod (but I don’t think this really matter).
    To get further in details I have sniffed the traffic, the handshake is good but the phone never seem to reply to pairing requests. Here is the stream:
    { ”body” : { ”deviceId” : ”XXXXXXXXXXXXXX”, ”deviceName” : ”XXXXXX”, ”protocolVersion” : 3 }, ”id” : ”XXXXXXXXXXXXX”, ”type” : ”kdeconnect.identity” }
    { ”body” : { ”pair” : false }, ”id” : ”XXXXXXXX72325″, ”type” : ”kdeconnect.pair” }
    { ”body” : { ”pair” : false }, ”id” : ”XXXXXXXX72326″, ”type” : ”kdeconnect.pair” }

    The phone acknowledge data but never reply…

    Any ideas ?

    Tahnks all.

  14. ”try
    apt get install libqca2-dev libqca2
    only hint i can give.”

    That got me past my initial error, I’ll give more feedback once compiled.

  15. I had this error while compiling:
    /home/zac/Playground/kdeconnect-kded/kded/networkpackage.cpp: In member function ‘QByteArray NetworkPackage::serialize() const’:
    /home/zac/Playground/kdeconnect-kded/kded/networkpackage.cpp:57:55: error: no matching function for call to ‘QJson::Serializer::serialize(QVariantMap&, bool*)’
    /home/zac/Playground/kdeconnect-kded/kded/networkpackage.cpp:57:55: note: candidates are:
    In file included from /home/zac/Playground/kdeconnect-kded/kded/networkpackage.cpp:32:0:
    /usr/include/qjson/serializer.h:50:10: note: void QJson::Serializer::serialize(const QVariant&, QIODevice*, bool*)
    /usr/include/qjson/serializer.h:50:10: note: no known conversion for argument 2 from ‘bool*’ to ‘QIODevice*’
    /usr/include/qjson/serializer.h:62:16: note: QByteArray QJson::Serializer::serialize(const QVariant&)
    /usr/include/qjson/serializer.h:62:16: note: candidate expects 1 argument, 2 provided
    /home/zac/Playground/kdeconnect-kded/kded/networkpackage.cpp:59:58: error: ‘class QJson::Serializer’ has no member named ‘errorMessage’
    make[2]: *** [kded/CMakeFiles/kded_kdeconnect.dir/networkpackage.o] Error 1
    make[1]: *** [kded/CMakeFiles/kded_kdeconnect.dir/all] Error 2
    make: *** [all] Error 2

  16. Make Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
    Could NOT find QCA2 (missing: QCA2_LIBRARIES QCA2_INCLUDE_DIR)
    Call Stack (most recent call first):
    /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
    /usr/share/kde4/apps/cmake/modules/FindQCA2.cmake:44 (find_package_handle_standard_args)
    kded/plugins/ping/CMakeLists.txt:3 (find_package)
    what your version ubuntu and cmake to use ?

  17. all is fine to install, but ”false” on : qdbus org.kde.kded /kded loadModule kdeconnect
    how to fixed ? thanks before.

    1. I dont know. For me it was the prefix that was wrong. When adding it, i had no problem. Read updates in top for easier install.

  18. I’ve followed these instructions and several variants through the steup:

    Important to run this as normal user

    qdbus org.kde.kded /kded loadModule kdeconnect
    This should return true. If not, it seems redoing the compilation can fix it. It did for me. So just try again.

    I’ve tried deleting this project and re-installing, along with many different variants, but haven’t found the solution for this one, yet, on Ubuntu 13.04. If anyone has a suggestion, I’m looking forward to making this work.

    Jim Pearce
    dcn.pearce@gmail.com

    1. Dont know. There is a new git repo and app so please read update blog post at top.

  19. cmake -DCMAKE_INSTALL_PREFIX=/usr ./
    CMake Error: The source directory ”/home/kdeconnect-kded” does not appear to contain CMakeLists.txt.
    Specify –help for usage, or press the help button on the CMake GUI.
    Help please

  20. same problem:

    cmake -DCMAKE_INSTALL_PREFIX=/usr ./

    CMake Error: The source directory ”/home/jj” does not appear to contain CMakeLists.txt.
    Specify –help for usage, or press the help button on the CMake GUI.

  21. Hi Chris,

    I’m running Debian 7 and I had the same compiling problem (”error: no matching function for call to ‘QJson::Serializer::serialize(QVariantMap&, bool*)’”).
    Installing QJson Version 0.8 from the links you provided made it work!!!
    Thanks a lot!!!

    another Chris

  22. what a fucking shitty guide.. the command
    cmake -DCMAKE_INSTALL_PREFIX=/usr ./
    make
    sudo make install

    does not work.. if your gonna post a guide make sure all your commands are accurate. wow.

    1. Hello mr!
      I guess you know better and thats why you post here. I have to remind you to post your answer though as I think you only posted your critisism.

      If you dont have an better alternative I cant help you without you giving me the error you recieve upon entering the commands.

      Good luck inte the future mr

  23. Hi,
    Could you please help:

    I got this to run –
    qdbus org.kde.kded /kded loadModule kdeconnect
    – and returned true.

    last bit –
    kbuildsycoca4 -noincremental
    also went ok without any error.

    Problem is – I cant pair my phone (galaxy 4) with my pc running 13.10

    Please help.

    1. Sorry. I dont know. I had the similar problem on my laptop where I did not get it to run. On my work desktop i got it to run without any problems and the only difference in the setup is that at work I have my desktop connected via wire and laptop with wireless. Hope you find a solution.

  24. Hi People,

    I’ve got the follwing problems compiling the source under Kubuntu 12.04 after follwing all hints (libqca2-dev, libqca2 and the ‘sudo apt-get install build-essential’) :
    cmake -DCMAKE_INSTALL_PREFIX=`kde4-config –prefix` ../
    kde4-config: Unerwartetes Argument „–prefix“.
    kde4-config: Benutzen Sie den Parameter „–help“, um die verfügbaren Optionen zu sehen.
    CMake Error at CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES):
    Unknown CMake command ”GETTEXT_PROCESS_PO_FILES”.

    I can’t find out what this means

    1. I dont know really. Have not compiled any of the later versions. Sorry cant help you.

  25. Buen trabajo! Lo acabo de probar en Mageia4 y funciona a la perfección. Un unico detalle es que hay q desactivar el firewall para hacer que la aplicacion en el celular detecte a KDE.

    Excelente que esta idea salga de un latino!

  26. This fixes the .loadmodule error

    qdbus org.kde.kded /kded loadModule kdeconnect
    kcmshell4 kdeconnect

  27. After install, I ran kbuildsycoca4 -noincremental and I saw this,

    kbuildsycoca4 running…
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Keywords in ”k3bsetup.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Keywords in ”/usr/share/applications/firefox.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Categories in ”/usr/share/applications/im-switch.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Categories in ”/usr/share/applications/spotify.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry MimeType in ”/usr/share/applications/spotify.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry MimeType in ”/usr/share/applications/wolfram-mathematica9.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Keywords in ”/usr/share/applications/thunderbird.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Actions in ”/usr/share/applications/thunderbird.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Categories in ”/usr/share/applications/kde4/bluedevil-network-panu.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry Categories in ”/usr/share/applications/kde4/bluedevil-network-dun.desktop” is not compliant with XDG standard (missing trailing semicolon).
    kbuildsycoca4(8022) KConfigGroup::readXdgListEntry: List entry text/html in ”/home/mauricio/.local/share/applications/mimeapps.list” is not compliant with XDG standard (missing trailing semicolon).

    Any ideas what might be happening?

  28. Is there a way to get kded to load modules from /usr/local? I hate to clutter up /usr with stuff that’s not packaged.

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *

Följande HTML-taggar och attribut är tillåtna: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>