VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup/Linux
diff options
context:
space:
mode:
Diffstat (limited to 'src/Setup/Linux')
-rwxr-xr-xsrc/Setup/Linux/mount.veracrypt23
-rw-r--r--src/Setup/Linux/veracrypt-uninstall.sh5
-rw-r--r--src/Setup/Linux/veracrypt.desktop13
-rw-r--r--src/Setup/Linux/veracrypt.xml11
-rw-r--r--src/Setup/Linux/veracrypt_install_template.sh13
5 files changed, 54 insertions, 11 deletions
diff --git a/src/Setup/Linux/mount.veracrypt b/src/Setup/Linux/mount.veracrypt
new file mode 100755
index 00000000..a891c253
--- /dev/null
+++ b/src/Setup/Linux/mount.veracrypt
@@ -0,0 +1,23 @@
+#!/bin/bash
+DEV="$1"
+MNTPT="$2"
+VCOPTIONS=""
+OPTIONS=""
+
+shift 3
+IFS=','
+for arg in $*; do
+ case "$arg" in
+ truecrypt) VCOPTIONS=(${VCOPTIONS[*]} --truecrypt);;
+ system) VCOPTIONS=(${VCOPTIONS[*]} --mount-options=system);;
+ fs=*) VCOPTIONS=(${VCOPTIONS[*]} --filesystem=${arg#*=});;
+ keyfiles=*) VCOPTIONS=(${VCOPTIONS[*]} --keyfiles=${arg#*=});;
+ password=*) VCOPTIONS=(${VCOPTIONS[*]} --password=${arg#*=});;
+ pim=*) VCOPTIONS=(${VCOPTIONS[*]} --pim=${arg#*=});;
+ protect-hidden=*) VCOPTIONS=(${VCOPTIONS[*]} --protect-hidden=${arg#*=});;
+ slot=*) VCOPTIONS=(${VCOPTIONS[*]} --slot=${arg#*=});;
+ *) OPTIONS="${OPTIONS}${arg},";;
+ esac
+done
+
+/usr/bin/veracrypt --text --non-interactive ${VCOPTIONS[*]} --fs-options="${OPTIONS%,*}" ${DEV} ${MNTPT}
diff --git a/src/Setup/Linux/veracrypt-uninstall.sh b/src/Setup/Linux/veracrypt-uninstall.sh
index f8f111e2..2abbfd6c 100644
--- a/src/Setup/Linux/veracrypt-uninstall.sh
+++ b/src/Setup/Linux/veracrypt-uninstall.sh
@@ -1,11 +1,14 @@
#!/bin/sh
V="$(mount | grep veracrypt_aux_mnt)"
-[ "$V" ] && echo Error: All volumes must be dismounted first. && exit 1
+[ "$V" ] && echo Error: All volumes must be dismounted first. >&2 && exit 1
rm -f /usr/bin/veracrypt
+rm -f /usr/sbin/mount.veracrypt
rm -f /usr/share/applications/veracrypt.desktop
rm -f /usr/share/pixmaps/veracrypt.xpm
+rm -f /usr/share/mime/packages/veracrypt.xml
rm -fr /usr/share/veracrypt
+rm -fr /usr/share/doc/veracrypt
echo VeraCrypt uninstalled.
rm -f /usr/bin/veracrypt-uninstall.sh
diff --git a/src/Setup/Linux/veracrypt.desktop b/src/Setup/Linux/veracrypt.desktop
index 01dfaf61..4504f20c 100644
--- a/src/Setup/Linux/veracrypt.desktop
+++ b/src/Setup/Linux/veracrypt.desktop
@@ -1,10 +1,11 @@
[Desktop Entry]
-Encoding=UTF-8
+Type=Application
Name=VeraCrypt
-GenericName=VeraCrypt
-Comment=VeraCrypt
-Exec=/usr/bin/veracrypt
+GenericName=VeraCrypt volume manager
+Comment=Create and mount VeraCrypt encrypted volumes
Icon=veracrypt
+Exec=/usr/bin/veracrypt %f
+Categories=Security;Utility;Filesystem
+Keywords=encryption,filesystem
Terminal=false
-Type=Application
-Categories=Encryption;Encryption Tools;Utility;
+MimeType=application/x-veracrypt-volume;application/x-truecrypt-volume; \ No newline at end of file
diff --git a/src/Setup/Linux/veracrypt.xml b/src/Setup/Linux/veracrypt.xml
new file mode 100644
index 00000000..4fc73b90
--- /dev/null
+++ b/src/Setup/Linux/veracrypt.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/x-veracrypt-volume">
+ <comment>VeraCrypt Volume</comment>
+ <glob pattern="*.hc"/>
+ </mime-type>
+ <mime-type type="application/x-truecrypt-volume">
+ <comment>TrueCrypt Volume</comment>
+ <glob pattern="*.tc"/>
+ </mime-type>
+</mime-info>
diff --git a/src/Setup/Linux/veracrypt_install_template.sh b/src/Setup/Linux/veracrypt_install_template.sh
index 5d572976..e4615966 100644
--- a/src/Setup/Linux/veracrypt_install_template.sh
+++ b/src/Setup/Linux/veracrypt_install_template.sh
@@ -32,7 +32,11 @@ KTERM=0
case $PACKAGE_TYPE in
tar)
PACKAGE_INSTALLER=tar
- PACKAGE_INSTALLER_OPTS='-C / --no-overwrite-dir -xpzvf'
+ if tar --help | grep -q -- '--keep-directory-symlink'; then
+ PACKAGE_INSTALLER_OPTS='-C / --keep-directory-symlink --no-overwrite-dir -xpzvf'
+ else
+ PACKAGE_INSTALLER_OPTS='-C / --no-overwrite-dir -xpzvf'
+ fi
;;
esac
@@ -93,7 +97,7 @@ show_message()
else
if [ $KTERM -eq 1 ]
then
- konsole --title 'VeraCrypt Setup' -e sh -c "echo $*; read A"
+ konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo $*; read A"
fi
fi
fi
@@ -1031,7 +1035,7 @@ fi
if [ "$PACKAGE_TYPE" = "tar" ]
then
- if ! which fusermount >/dev/null 2>/dev/null || ! which dmsetup >/dev/null 2>/dev/null
+ if ! which fusermount >/dev/null 2>/dev/null || ! which dmsetup >/dev/null 2>/dev/null || ! service pcscd status >/dev/null 2>/dev/null
then
show_message "$(cat <<_INFO
Requirements for Running VeraCrypt:
@@ -1039,6 +1043,7 @@ Requirements for Running VeraCrypt:
- FUSE library and tools
- device mapper tools
+ - PC/SC Lite (optional)
_INFO
)"
@@ -1073,7 +1078,7 @@ then
else
if [ $KTERM -eq 1 ]
then
- exec konsole --title 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A"
+ exec konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A"
fi
fi
fi