Dear friends,
I am trying to use the following terminal command on my linuxmint cinnamon sylvia installation:
ecryptfs-mount-private && nemo Private && ecryptfs-umount-private
The first step 'ecryptfs-mount-private' gets executed correctly and after I enter the password the nemo window also correctly pops up showing Private folder (second step of the command). I can browse through my Private folder but now when I close the nemo window from its button, the third step, i.e., 'ecryptfs-umount-private does not get executed and my Private folder remains mounted.
What do I need to correct this situation?
Please also note that if I use the same command with caja file browser, i.e., 'ecryptfs-mount-private && caja Private && ecryptfs-umount-private' all the three steps are executed correctly.
Looking forward to your help!
nemo
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Re: nemo
This is most likely, because Nemo still gets used as a background process (e. g. for showing the desktop icons); following that the Nemo process never quits and consequently the last command never gets executed. I don't think, that you can do anything about it, at least not with Nemo as file manager.
Re: nemo
This is no longer the case. The desktop now runs in it's own process and you can kill the nemo process without affecting that. The nemo process does die when you've closed all the open windows but it seems to take it's time about it. I'm not sure why but it could be what's keeping that command from working properly.Cosmo. wrote: ⤴Sat Feb 10, 2018 7:35 am This is most likely, because Nemo still gets used as a background process (e. g. for showing the desktop icons); following that the Nemo process never quits and consequently the last command never gets executed. I don't think, that you can do anything about it, at least not with Nemo as file manager.
When I give opinions, they are my own. Not necessarily those of any other Linux Mint developer or the Linux Mint project as a whole.
Re: nemo
Yes, if the process never ends, then the exit status can never be checked, thus the command won't yet continue. This can be easily demonstrated with:
What you can do is use the
Using
sleep 10s && echo "Finished"
You won't see the text until sleep exits (finishes, which is a 0 exit status). The &&
operator (and) continues if the previous command has an exit status of 0. The ||
operator (or) continues if the exit status is non-0. Lastly, ;
just continues regardless of the previous command's exit status, as it just indicates that the shell should interpret it as a new line.What you can do is use the
&
, and possibly followed by disown
if run in a terminal, which will stick the previous command into the background, then continue with the next, with the other still running. Try this:Code: Select all
{ ecryptfs-mount-private && nemo Private; } && ecryptfs-umount-private & disown
{ ; }
to group the commands together, tieing their exit status together as one. So if the first two commands both succeed, then the last will run, and it'll run in the background, disowning itself from the current terminal. (meaning you can close the terminal and it'll still run in the background) It's almost midnight, so hopefully I'm not being super blonde and missing something; pretty tired. I'm also Terminalforlife on GitHub.
Re: nemo
Can you elaborate on what you mean by the results being "weird"?
I'm also Terminalforlife on GitHub.
Re: nemo
Hi Termy,
My apologies for incomplete info. It went like this:
munawar@dellc ~ $ { ecryptfs-mount-private && nemo Private; } && ecryptfs-umount-private & disown
[1] 2360
munawar@dellc ~ $ Enter your login passphrase:
Now if I enter the passphrase it is printed in plain text, for example if passphrase is 'password' I get:
munawar@dellc ~ $ Enter your login passphrase:password
WARNING:root:could not open file '/etc/apt/sources.list'
No command 'password' found, did you mean:
Command 'assword' from package 'assword' (universe)
password: command not found
munawar@dellc ~
As you can see the responses are quite strange.
Thanks for your help.
My apologies for incomplete info. It went like this:
munawar@dellc ~ $ { ecryptfs-mount-private && nemo Private; } && ecryptfs-umount-private & disown
[1] 2360
munawar@dellc ~ $ Enter your login passphrase:
Now if I enter the passphrase it is printed in plain text, for example if passphrase is 'password' I get:
munawar@dellc ~ $ Enter your login passphrase:password
WARNING:root:could not open file '/etc/apt/sources.list'
No command 'password' found, did you mean:
Command 'assword' from package 'assword' (universe)
password: command not found
munawar@dellc ~
As you can see the responses are quite strange.
Thanks for your help.
Re: nemo
Oh wow. Okay, I guess this is down to my lack of familiarity with that encryption program. I didn't realise there was a user input prompt. That would definitely make my suggestion moot. Worth a try.
I'm also Terminalforlife on GitHub.