<-[[.:start]] ====== DBUS & Automount ====== ** Running X from ''startx'' and making automount work ** ===== Background ===== I don't use a ''DESKTOP ENVIRONMENT'' on Linux - I boot to a console and start X11 via the ''startx'' command. This runs commands from ''~/.xinitrc'' xrdb -load ~/.Xdefaults setxkbmap -layout gb xset s noblank xset s noexpose xset -dpms ~/bin/background.sh & dwmblocks & xfce4-power-manager & pasystray & nm-applet & exec dwm My **window manager** is ''DWM'' and I don't want/need all the extra stuff of a ''desktop environment'' I //**would**// however like to be able to ''automount'' external USB drives rather than what I do currently sudo dmesg #find drive device sudo mount /dev/xxxx /mnt then copy files as necessary between ''/mnt/xxxxx'' and the machine's filesystem Afterwards.... cd sudo sync sudo umount /mnt ===== Graphical File Manager ===== I installed ''Thunar'' along with ''gvfs'' and all the additional stuff I //thought// I needed (''gvfs-backends*'' etc). But Thunar complained that ''it appears you don't have gvfs'' or similar... I briefly tried installing the ''MATE'' Desktop environment - and then spent a long time forcing it to use ''DWM'' as window manager, and turning off as much as I could * uninstalled ''caja'' * uninstalled ''mate-panel'' * edited via ''dconf-editor'' to make ''dwm'' start as window manager.... Then ''Thunar'' //**was**// happy with ''gvfs'' and would ''automount'' a USB drive (or more importantly my Swiss Micros calculator's USB drive). But I wasn't happy with this as a solution - too messy and too much crap going on - messing up the appearance of GTK-aware apps like ''claws-mail'' and ''GNUCASH'' I wanted to get back to simply running ''DWM'' etc. without all the rest ===== DBUS ===== It appears the issue is that with my method of starting ''X'' via ''~/.xinitrc'' I fail to correctly start ''DBUS''. This needs to be started correctly in the setting up of an ''X-session'' The answer isn't to add an invocation of ''DBUS'' into my ''~/.xinitrc'' as I first thought. The answer is to let ''X11'' start via the **SYSTEM** ''xinitrc'' which only happens **as long as I don't have my own ''~/.xinitrc''** Starting ''X'' this way which will then run various other things, including ''DBUS'', as the ''XSession'' is spun-up via ''startx'' Then the process is finished by running my file ''~/.xsession'' - which is actually just my ''~/.xinitrc'' file renamed to ''~/.xsession''. I found this at [[https://momi.ca/posts/2021-10-11-startxdebian/]] which describes my own situation perfectly, and the solution works perfectly. I can still boot into a console session, and use ''startx'' to switch to ''DWM'' - and automount works for ''Thunar'' ===== Further Information ===== {{tag>dbus startx thunar automount}} Updated : ~~LASTMOD~~