Featured image of post Auto-mount USB sticks on Arch Linux + Hyprland

Auto-mount USB sticks on Arch Linux + Hyprland

While configuring my Kinesis Adv 360 on Arch, I really missed one feature that most desktop environments have. It is the auto-mounting of USB storage devices.

On Arch and Hyprland, this does not happen out-of-the-box.

My environment

  1. Arch Linux (updated this morning)
  2. Hyprland 0.48.1

Packages

1
sudo pacman -S thunar thunar-volman gvfs

Configuration

Configure thunar-volman to auto-mount USB devices.

1
thunar-volman-settings

Make sure to check the following boxes:
Thunar volman settings

Then we need to start thunar as daemon on startup. There are multiple ways to do it, but I chose to write it in my Hyprland config file.

1
2
3
4
5
# ~/.config/hypr/hyprland.conf

# ...
exec-once = thunar --daemon
# ...

Testing

Plug in a USB stick, and it should auto-mount. In my case I could see it right away in thunar’s sidebar.
auto-mounted

Note

If you don’t see it, try running thunar --daemon in a terminal, and then re-plug the USB stick.
Sometimes when Hyprland reloads config, it does not automatically run the exec-once command, causing the daemon to not start.
Restarting Hyprland should fix this.

References

  1. Arch Wiki - Thunar
  2. Hyprland Wiki - Configuring
Built with Hugo
Theme Stack designed by Jimmy