- This topic has 2 replies, 3 voices, and was last updated Mar 29-11:15 pm by christophe.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › General › Tips and Tricks › automount in terminal based file manager
Hi!
I figured out how to use automount in a terminal file manager.
I only use terminal file managers and whenever I insert a USB stick roxfiler will open up displaying its contents. This can be changed in the preferred applications by selecting another file manager, but only if its gui based. I thought it would be nice if instead the USB folder opened up in my favorite terminal file manager. So I did some research and experimentation. I want to use the terminal st and the file manager nnn
A basic problem is that you cant specify the working directory when launching st, so as a workaround create file automount.sh with the following lines:
#!/bin/bash
cd "$1"
st -e nnn
chmod 755 and put in $PATH
in ~/.desktop-session/startup
make sure the following line is commented out
#automount-antix &
and put in
devmon --exec-on-drive 'automount.sh "%d"' &
Thats it, now whenever a USB drive is plugged in, it will open up in nnn
Obviously, st and nnn can be changed for another terminal and file manager (ranger, mc, etc).
Interesting.
I’ve not used udevil, but it looks promising. After an update several months ago, my network drives stopped mounting from fstab on boot. I’ve been issuing ‘mount -a’ to mount after login.
@blur13, thank you for sharing.
Yes. I, too, like terminal file managers (mc). And I play with antiX core often.
This will come in handy. Thanks!
confirmed antiX frugaler, since 2019
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |