This project has moved and is read-only. For the latest updates, please go here.

Automount on linux

Topics: Users Discussion
Nov 22, 2016 at 9:22 PM
Hello,
is it possible to automount a VeryCrypt volume on login in Linux?

If yes, how can I do that?

thanks
Jochen
Nov 24, 2016 at 7:43 PM
Edited Nov 24, 2016 at 8:13 PM
This is harder than it looks and maybe even is distro/desktop specific. This is what I do on debian with lxde (not with vc though, because it does not make any sense). be sure to replace "username" with whatever your logon user name is. Replace leafpad with whatever editor your linux uses, that could be gedit, kwrite, mousepad, etc.

1 . run sudo leafpad /home/username/autorun.sh (note sudo command, because we want to have this file writable by root only to avoid hacking) and paste there:
veracrypt --mount /home/username/testcontainer.hc --password "testpass"
2 . run leafpad /home/username/.config/autostart/myautostart.desktop and paste there:
[Desktop Entry]
Type=Application
Name=custom autostart script
Comment=custom autostart script
Exec=sh -c 'sudo /home/username/autorun.sh'
OnlyShowIn=LXDE
3 . run sudo visudo
#place this to the end of file
username      ALL = NOPASSWD: /home/username/autorun.sh
After logon you should see vc progressbar and container should be mounted. BUT keep in mind, that since there's plaintext password, this is as useful as having the data unencrypted ;-)

If this won't work, you can try to install upstart and follow its manual. Steps 1 and 3 will be the same.