Integrate Deja-dup into KDE Dolphin

Deja-dup is an excellent backup program – however it does not have integration with KDEs filemanager dolphin. Integration meaning that you can right click in a folder and select “restore missing files” or right click a file and select ‘Revert to previous version’

Adding “Restore missing files” to directory

Create a file the following in “~/.kde/share/kde4/services/ServiceMenus/dejadup_restore_missing.desktop”

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory
Actions=DejaDupRestoreMissingFiles
[Desktop Action DejaDupRestoreMissingFiles]
Name=Restore missing files in folder
Name[da]=Genskab manglende filer i mappen
Icon=edit-find
Exec=deja-dup --restore-missing "%U"

Adding “Revert to previous version”

Create a file the following in “~/.kde/share/kde4/services/ServiceMenus/dejadup_revert.desktop”

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/octet-stream
Actions=DejaDupRestoreFile
[Desktop Action DejaDupRestoreFile]
Name=Revert to previous version...
Name[da]=Tilbagevend til tidligere version...
Exec=deja-dup --restore "%U"

The above integrates deja-dup just for your user. Adding it to the following path will make it available to all users of your computer.

/usr/share/kde4/services/ServiceMenus

More documentation of the KDE servicemenus can be found here: http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus

About these ads

9 thoughts on “Integrate Deja-dup into KDE Dolphin

  1. I agree this should be added to dolphin when deja-dup is installed. I appreciate the instructions above but this is almost a given for dolphin. Or either come up with the same functionality

  2. Well maybe you could set it up as something that can be downloaded through the Dolphin Configure Services. I think this is a great idea. I was looking for something like this as I just switch back from Unity to Kubuntu and really needed something like this. Thanks…

  3. Thanks for documenting this, Pascal. I had no idea it would be so simple. :)

    In terms of making sure the path is part of the backup, I think a simple Python script would be possible, now that Dolphin can be extended using Python.

  4. Pingback: Deja-Dup in KDE | cyb3rkn19ht

  5. posted by ausrpned on the about page( or perhaps I moved the comment… but here it is)
    Hi
    The restore missing file(s) integration seems to work OK however the revert integration doesn’t appear in the actions menu within Dolphin.

    Noticed when I copied and pasted restore into gedit it showed:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=inode/directory
    Actions=DejaDupRestoreMissingFiles
    [Desktop Action DejaDupRestoreMissingFiles]
    Name=Restore missing files in folder
    Name[da]=Genskab manglende filer i mappen
    Icon=edit-find
    Exec=deja-dup –restore-missing “%U”

    Whereas the revert showed:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/octet-stream
    Actions=DejaDupRestoreFile[Desktop Action DejaDupRestoreFile]
    Name=Revert to previous version…
    Name[da]=Tilbagevend til tidligere version…
    Exec=deja-dup –restore “%U”

    I changed it to show:
    [Desktop Entry]
    Type=Service
    ServiceTypes=KonqPopupMenu/Plugin
    MimeType=application/octet-stream
    Actions=DejaDupRestoreFile
    [Desktop Action DejaDupRestoreFile]
    Name=Revert to previous version…
    Name[da]=Tilbagevend til tidligere version…
    Exec=deja-dup –restore “%U”

    but it made no difference.

    Any thoughts? I’m running Ubuntu 12.04 for this.

    Cheers

    • You are right about an error in the revert file. I fixed it in the post.
      I’m running Kubuntu 13.04 with KDE 4.11 Beta2 (4.10.90) and it works fine.
      I’m quite sure that it works in 12.04. Try removing the file and creating it again. Remember to close all dolphin between test.

      • Hi
        Tried your suggestion but no joy. Do notice that your dejadup-action.png image above only shows the Restore missing files option.

        By the way. How did you get the screen shot?

        I tried to use PrtSc both by the keyboard button as well as the shortcut key strokes but the Screenshot did not accept the commands.

        Will keep an eye on your site to keep up with developments.

        Cheers

      • Hi ausrpned
        I took the screenshot with ksnapshot and used the snapshot delay.
        I’m not really developing on it. I just got it working and thought I should document it on the interwebz.
        You only get the “Revert” option if you right click on an existing file. not if you click in the folder.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s