Automount usb sticks and cd/dvd discs in antiX

Version: 

Section: 

AntiX FAQs

There are a couple of ways to achieve automounting of usb sticks and cd/dvd discs in antiX.  The easiest was is to use the spacefm desktop and/or spacefm in daemon mode.

However, there is another low resource utility that can help with this problem, and its useable even in a console.

The utility is called devmon, and its available in default installs of antiX-15.

By default, issueing just

 

devmon

 

will start a daemon that will monitor events and then use udevil to mount a drive/disc at /media/mountpoint.  

If you would like a file browser window to open automatically upon a successful mount, this command, placed in your choice of startup locations, will mount your usb sticks and cd/dvd discs and then open the default file browser as defined in the antiX Control Center>Preffered Applications app.

 

devmon --exec-on-drive "desktop-defaults-run -fm %d" --exec-on-disc "desktop-defaults-run -fm %d" &

 

check out "man devmon" and "man udevil" for more info!

note:  if you want rox-filer's unmount command to work with devices mounted with udevil/devmon, go into the rox-filer preferences and the "Action Windows" tab and change the mount and unmount options to "udevil mount" and "udevil umount" respectively.  spacefm in antiX-15 already works this way by default.