Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 521  / 2 Years ago, sun, september 18, 2022, 6:40:44

I open Nautilus by command line in new window. I want to execute another command after nautilus is closed. Like this :



bash -c 'sshfs -o idmap=user [email protected]:/ /media/192.168.1.200 | nautilus /media/192.168.1.200;fusermount -u /media/192.168.1.200'


In this case, I want to execute fusermount -u /media/192.168.1.200 only after Nautilus is closed.



Is possible ?



Addendum: I often multiple Nautilus windows open. So I want to close this window ONLY.


More From » nautilus

 Answers
1

Not a concrete answer, but few pointers that may help.



If the window has a unique title, you can get its window id using



NAUTILUS_WINDOWID=`xwininfo -name <title> |grep 'Window id' |awk '{print $4}'`


Now periodically calling xwininfo -id $NAUTILUS_WINDOWID >/dev/null should do the trick.



It returns 0 if the window exists, and 1 otherwise.


[#32845] Monday, September 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ampust

Total Points: 133
Total Questions: 109
Total Answers: 111

Location: Reunion
Member since Fri, Jul 22, 2022
2 Years ago
ampust questions
Thu, Jul 15, 21, 16:30, 3 Years ago
Mon, Oct 24, 22, 05:38, 2 Years ago
Thu, Sep 15, 22, 14:37, 2 Years ago
Tue, Sep 7, 21, 17:46, 3 Years ago
;