You are not logged in.
Hello,
I have just migrated from TrueCrypt to VeraCrypt (without issues by the way), but I have a problem with a script that I wrote.
This script is basically a shortcut for mounting a VeraCrypt volume and opening it with Dolphin; it keeps a "question" open at the command line, which, when answered with 'y', will unmount the volume.
Here is the important part of the script:
/usr/bin/veracrypt "$VERACRYPT" "$MOUNTDIR"
/usr/bin/dolphin "$MOUNTDIR"
echo "Unmount VeraCrypt volume now [y/n]?"
read ANSWER
if [ "$ANSWER" = "y" ]
then
/usr/bin/veracrypt -d "$VERACRYPT"
fi
exit 0As you can see, it's utterly simple. My problem now is, that some system message shows up when running the command, and it somehow hides my "question":
"/org/freedesktop/UDisks2/block_devices/dm_2d0" has new interfaces: ("org.freedesktop.UDisks2.Block", "org.freedesktop.UDisks2.Filesystem")
"/org/freedesktop/UDisks2/block_devices/dm_2d0" has new interfaces: ("org.freedesktop.UDisks2.Block", "org.freedesktop.UDisks2.Filesystem") I thought it was veracrypt or Dolphin related, and I tried adding "2> /dev/null" at the end of those commands, but it appears that this message comes from somewhere else.
Is there a way to suppress these "foreign" messages? Why does my "question" not show up anymore at all?
Thanks,
DrTebi
Last edited by drtebi (2015-02-02 23:41:39)
Offline
I just realized that my "question" is not hidden... once I close Dolphin, it appears.
However, I still cannot get rid of those system messages.
Is there a way to get rid of those?
Offline
Have you tried redirecting stdout as well?
/usr/bin/veracrypt "$VERACRYPT" "$MOUNTDIR" >/dev/null 2>&1
/usr/bin/dolphin "$MOUNTDIR" >/dev/null 2>&1As for the question being 'hidden' you just need to background whichever process is blocking.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
That worked, thanks!
I have to assume that veracrypt caused the "new interfaces" message then?
I didn't try the redirecting to stdout at first because I thought if I do that, I would not get my "question" -- but that was of course wrong, since I am not redirecting the "read" command.
Thanks for the help.
Offline