User experience - Plug and Play

I’ve been fiddling with Linux for years, but I still consider myself a novice in many respects. Maybe the DietPi forum isn’t the best place to ask such general Linux questions… If so, kindly point me in the right direction.

Anyway, I’ve installed DietPi on several devices since discovering it over a year ago, and one thing I’ve consistently struggled with is getting plug-and-play devices (microphones, webcams, additional displays, etc.) to “just work” when they’re plugged in.

This is especially (maybe exclusively) true when I am not using a desktop environment. For example, I’ve deployed a few laptops with X and the Openbox window manager.

  • If a display is plugged in while DietPi is running, nothing happens. I assume this is because the Openbox autostart file only runs once at boot. I have an xrandr command in there to extend the primary display. Maybe there’s a better way to handle this.
  • When I plug in a webcam, I need to reboot in order to use the built in mic. Camera is fine.
  • For selecting the audio output device, I had to install PulseAudio along with pavucontrol (which is easier than manually figuring out the necessary configurations). The latter gives me a GUI to set the default audio device.

I suspect that many of these “issues” would go away if I used a full-blown desktop environment and that I’m responsible for wiring up all the udev, X, and audio plumbing that a full DE (like XFCE or GNOME) normally handles automatically. However, I’ve been opting for something like Openbox because it’s relatively easy to lock down due to its minimalism.

I guess my question is, are there some base rules/configs/scripts that I can create on each of these systems that handle detecting and configuring devices gracefully?

Your are on the right track, a lot of this background services etc are not installed or enabled by default, bc DietPi tries to be as diet as possible :slight_smile:

But there is not just one tool to make this work all together. E.g. for hot plug audio you need a udev module for pulseaudio, for the display stuff you would need udev and xrandr scripts.
For storage maybe udisks2 and udiskie and so on.

You can go that way. But if you don’t need such a “diet” system (for me it sounds like you jsut use it for a desktop computer?) I would just use Debian minimal. You can it also use just with openbox, if you like https://wiki.debian.org/Openbox

2 Likes

Thanks for the info and confirming that I’m on the right track. We primarily use DietPi on the Raspberry Pi, but enjoy it so much that we’ve used it to repurpose some older laptops/desktops.

I forgot that Debian had a smaller distro, so thanks for that reminder. I’ll toy with that.