Devuan GNU+Linux is a free software operating system for your computer. Free software means you are free to use, copy and distribute, study, change the software, and share your modifications with the community.

Devuan without D-Bus

This document describes how to opt out of D-Bus in Devuan, incorporating changing to a lightweight window manager, choosing a browser and an alternative solution to D-Bus dependent auto-mounting.

Installing a window manager

Before we proceed with liberating the system of D-Bus we should install a window manager. There are many window managers available that do not depend on D-Bus, here are just a handful of them with suggestions from members of the community.

We will be using Fluxbox as it is simple and intuitive.

Installing and configuring Fluxbox

First open a terminal. We will use sudo to grant superuser access temporarily. When asked, you should enter your user password.

user@devuan:~@ sudo apt-get install fluxbox

Make Fluxbox the default window manager for your user when using the startx script. We will use the echo command to write the information to the relevant configuration file.

user@devuan:~@ echo "exec fluxbox" > .xinitrc

To start Fluxbox you can simply login to the console at boot with your user account and invoke the startx script.

user@devuan:~@ startx

Now if desired we will install the WDM display manager which is suitable for a multi-user workstation and has options to reboot or halt the system using root.

user@devuan:~@ sudo apt-get install wdm

Choosing a web browser

There are few web browsers depending on libdbus-1-3, however some browsers are better than others and require less support packages for D-Bus. Here are a handful of web browsers you might choose from.

Because it is the most featured and well known of the bunch we will use Iceweasel.

user@devuan:~@ sudo apt-get install iceweasel

Removing D-Bus from Devuan

We can now liberate the system of D-Bus. We will purge D-Bus and the relevant configuration files.

user@devuan:~@ sudo apt-get purge dbus

Check the output carefully before proceeding to be sure you want to do this.

We should now remove any orphaned packages.

user@devuan:~@ sudo apt-get autoremove --purge

A simple alternative to auto-mounting

Because we have removed D-Bus, the D-Bus dependent udisks2 or gvfs package will have been removed if you were using one of these. A simple alternative to auto-mounting USB and CD/DVD-ROM drives is to put your user in the disk group and setup the mount points in fstab. You will then be able to mount your USB drives with ease.

Working with groups

We will now be working exclusively with root for a while. Change to the root user to continue, entering your user password when asked.

user@devuan:~@ sudo -s

Since your user will most likely be in the cdrom group already, this step can usually be omitted.

root@devuan:~# adduser yourusername cdrom

Working with device nodes

In order to mount USB drives you must specify which disks you would like your user to mount and unmount. This is done by using the fstab to grant your user permission on a disk by disk basis.

Before proceeding it is important to know what device nodes will be used by your USB drives. To find this out we can look at the device nodes in /dev after plugging in a USB drive.

root@devuan:~# ls /dev/sd*

Here is a sample output.

/dev/sda /dev/sda11 /dev/sda2 /dev/sda5 /dev/sda8 /dev/sdb1 /dev/sda1 /dev/sda12 /dev/sda3 /dev/sda6 /dev/sda9 /dev/sda10 /dev/sda13 /dev/sda4 /dev/sda7 /dev/sdb

The labelling schemes for disks all start with sd and the hard disk drives are given priority lettering, in this case there is just one hard disk drive installed and it is assigned as ‘a’. The USB drive is therefore assigned to b and further drives will be assigned c, d, etc, and sdb1 indicates the first partition on the drive. With this in mind we will assign our mount points to /dev/sdb1 and /dev/sdc1 for mounting up to two USB drives in the fstab.

Working with fstab

Backup your fstab before proceeding.

root@devuan:~# cp /etc/fstab /etc/fstab.backup

Now we can edit the fstab.

root@devuan:~# nano /etc/fstab

As you might notice we don’t need to do anything for the CD/DVD-ROM drive as it’s already been done for us. We just need to add our mount points for USB drives at the end of the fstab.

/dev/sdb1 /media/usb0 auto user,noauto 0 0 /dev/sdc1 /media/usb1 auto user,noauto 0 0

It’s important here that we set the option ‘user’ as it will allow us to mount and unmount USB drives where usually only root is allowed to do that. The ‘noauto’ option specifies the filesystem will not be mounted at boot. See man 5 fstab and man mount for more details.

Creating the mount points

Now create the mount points you specified in the fstab.

root@devuan:~# mkdir /media/usb0 root@devuan:~# mkdir /media/usb1

You should now change back to your user account as we need to test our work.

root@devuan:~# su - username

Now plug in a USB drive (or two) and mount it.

user@devuan:~$ mount /media/usb0 user@devuan:~$ mount /media/usb1

To safely remove your drives simply unmount them.

user@devuan:~$ umount /media/usb0 user@devuan:~$ umount /media/usb1

A CD/DVD-ROM can be mounted and unmounted in the same way.

user@devuan:~$ mount /media/cdrom user@devuan:~$ umount /media/cdrom

Choosing a file manager

A file manager that fits well with this setup is the ncurses based Midnight Commander.

user@devuan:~$ sudo apt-get install mc

For a graphical file manager that can detect, mount and unmount removable volumes there is XFE.

user@devuan:~$ sudo apt-get install xfe

This work is released under the Creative Commons Attribution-ShareAlike 4.0 International [[CC BY-SA 4.0]] ( license.
All trademarks are the property of their respective owners.
Please note that this work is provided “AS IS” and comes with absolutely NO warranty.