Re: Disable Trash / KGPG Default Setting / Context Menu
Hmm - myencryptfolder.desktop is alpha ( )version. It is works only with small folders. If there is larger folder, gpg starts before ark (zip) is finished.
myencryptfolder.desktop (versio 0.00002) :
myfolderencrypter script:
Note
- Make script file
- Make it executable.
- Drop it in the /usr/bin/
- It is clumsy way (first in the mind) to do this
Example, decrypting and extracting
mydecrypt.desktop:
decrypter script:
Note #1
This service menu, script-file pair will ask where to decrypt/unpack. It is using KDE dialogs:
Shell Scripting with KDE dialogs
http://developer.kde.org/documentati...dialog/t1.html
Note #2
These seem to work . Testing needed !
Links:
Bash Reference Manual
http://www.gnu.org/software/bash/manual/bashref.html
The GNU Awk User's Guide
http://www.gnu.org/software/gawk/manual/gawk.html
DashAsBinSh
https://wiki.ubuntu.com/DashAsBinSh
man pages
Hmm - myencryptfolder.desktop is alpha ( )version. It is works only with small folders. If there is larger folder, gpg starts before ark (zip) is finished.
myencryptfolder.desktop (versio 0.00002) :
Code:
[Desktop Entry] ServiceTypes=inode/directory Actions=MYencrypt [Desktop Action MYencrypt] Name=Archive & Encrypt Folder (GPG) Icon=gpg Exec=myfolderencrypter %U
Code:
#!/bin/sh # killing ark prosesses kill `ps -e | awk '/ark/ { print $1 }'` # packing folder ark --add-to $1 $1.zip # waiting ark to shut down while [ `ps -e | grep ark | wc -l` -gt 0 ] do sleep 1 done # encrypting zip package gpg -c $1.zip # removing zip package rm -f $1.zip
- Make script file
- Make it executable.
- Drop it in the /usr/bin/
- It is clumsy way (first in the mind) to do this
Example, decrypting and extracting
mydecrypt.desktop:
Code:
[Desktop Entry] ServiceTypes=all/allfiles ExcludeServiceTypes=kdedevice/* Actions=MYdecrypt [Desktop Action MYdecrypt] Name=Decrypt & Unzip (GPG) Icon=gpg Exec=decrypter %U
Code:
#!/bin/sh # Where is the new subfolder WHERE=`kdialog --getexistingdirectory ~/` # removing .gpg extension PACKAGE=`echo $1 | sed s/".gpg"//g` # decrypting package gpg -d $1 > $PACKAGE # unpacking to the new subfolder unzip $PACKAGE -d $WHERE
Note #1
This service menu, script-file pair will ask where to decrypt/unpack. It is using KDE dialogs:
Shell Scripting with KDE dialogs
http://developer.kde.org/documentati...dialog/t1.html
Note #2
These seem to work . Testing needed !
Links:
Bash Reference Manual
http://www.gnu.org/software/bash/manual/bashref.html
The GNU Awk User's Guide
http://www.gnu.org/software/gawk/manual/gawk.html
DashAsBinSh
https://wiki.ubuntu.com/DashAsBinSh
man pages
Comment