This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Manage encrypted Private folder with dolphin

Tags: None
(comma "," separated)
luisfe
Registered Member
Posts
4
Karma
0
Hi,

In this tip I will assume that we have already configured a Private encrypted folder using ecryptfs.

I want the Private folder to show different icons depending if the folder is unlocked (mounted) or locked. As well as actions to lock and unlock it using dolphin context menu.

First, unlock the Private folder.

In the Private folder we create a new file called .directory (with the dot) with the following content

[Desktop Entry]
Type=Service
Icon=folder-unlocked
ServiceTypes=inode/directory,KonqPopupMenu/Plugin
Actions=LockPrivateFolder;

[Desktop Action LockPrivateFolder]
Name=lock Private folder
Icon=object-locked
Exec=ecryptfs-umount-private

Note: If your icon theme does not provide a folder-unlocked icon, you may create one, or use another icon that you want to have when the folder is unlocked.

Now, we lock the Private folder, we may test our setting. On dolphin, right-click on the folder -> actions -> lock private folder

By default, if the Private folder is locked, it is not writable, we change the permissions so that the folder is writable to the user. We create inside the Private folder another .directory folder with the content:

[Desktop Entry]
Type=Service
Icon=folder-locked
ServiceTypes=inode/directory,KonqPopupMenu/Plugin
Actions=UnlockPrivateFolder;

[Desktop Action UnlockPrivateFolder]
Name=unlock Private folder
Icon=object-unlocked
Exec=konsole -e 'ecryptfs-mount-private'

Finally, we eliminate the write permission on the locked folder.

We can unlock the folder with right-click -> actions -> unlock Private folder. A konsole terminal will pop up asking for our key.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]