nemo

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
munawar

nemo

Post by munawar »

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!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: nemo

Post by Cosmo. »

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.
munawar

Re: nemo

Post by munawar »

Thanks. I think I should use caja in this case.
JosephM
Level 6
Level 6
Posts: 1463
Joined: Sun May 26, 2013 6:25 pm

Re: nemo

Post by JosephM »

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.
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.
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.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: nemo

Post by Termy »

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: 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
Using { ; } 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.
munawar

Re: nemo

Post by munawar »

Tried Termy's suggestion and the result was weird. Then tried it without 'disown' but no success. Nemo seems to be pretty obstinate and does not want to say 'quits'.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: nemo

Post by Termy »

munawar wrote: Sun Feb 11, 2018 2:56 am Tried Termy's suggestion and the result was weird. Then tried it without 'disown' but no success. Nemo seems to be pretty obstinate and does not want to say 'quits'.
Can you elaborate on what you mean by the results being "weird"?
I'm also Terminalforlife on GitHub.
munawar

Re: nemo

Post by munawar »

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.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: nemo

Post by Termy »

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.
Locked

Return to “Other topics”