Difference between revisions of "OpenRC, an alternative to systemd"

imported>Aaditya
imported>Aaditya
Line 174: Line 174:


See the [https://wiki.archlinux.org/index.php/Fstab#tmpfs Arch Wiki] for more details.
See the [https://wiki.archlinux.org/index.php/Fstab#tmpfs Arch Wiki] for more details.
== Replacing systemd with eudev (for advanced users) ==
With OpenRC being used as init system, the role of systemd is reduced to that of a [https://wiki.archlinux.org/index.php/Udev udev] provider, and for compatibility reasons.
[http://www.gentoo.org/proj/en/eudev/ eudev], developed by the Gentoo folks, can be used as replacement. Note that removing systemd could cause incompatibilities with existing software, hence its advertised as being for advanced / minimalistic users.
Step 1) Install ''eudev-openrc''
sudo pacman -S eudev-openrc
The output looks like the following:
$ sudo pacman -S eudev-openrc
resolving dependencies...
looking for inter-conflicts...
:: eudev and systemd are in conflict. Remove systemd? [y/N] y
:: eudev and libsystemd are in conflict. Remove libsystemd? [y/N] y
Packages (4): eudev-1.7-3  libsystemd-212-3 [removal]  systemd-212-3 [removal]
              eudev-openrc-20140614-1
Total Download Size:    0.83 MiB
Total Installed Size:  6.46 MiB
Net Upgrade Size:      -10.81 MiB
:: Proceed with installation? [Y/n]
Step 2) Install ''dbus-eudev / dbus-nosystemd''
sudo pacman -S dbus-eudev
The output looks like the following:
$ sudo pacman -S dbus-eudev
[sudo] password for aaditya:
resolving dependencies...
looking for inter-conflicts...
:: dbus-eudev and dbus are in conflict (dbus-core). Remove dbus? [y/N] y
Packages (3): dbus-1.8.2-1 [removal]  libdbus-1.8.4-1  dbus-eudev-1.8.4-1
Total Download Size:    0.52 MiB
Total Installed Size:  1.85 MiB
Net Upgrade Size:      0.10 MiB
:: Proceed with installation? [Y/n]
After the above steps systemd would be uninstalled and replaced by eudev and its counterparts.
Note the optional dependencies for ''eudev'':
Optional dependencies for eudev
    eudev-openrc: eudev postmount script [pending]
    dbus-eudev: dbus without systemd
    upower-pm-utils-eudev: upower without systemd
    udisks2-eudev: udisks2 without systemd
    libpulse-eudev: libpulse without systemd
    cups-eudev: cups without systemd
    procps-ng-eudev: procps-ng without systemd
These can be installed to get required functionalities. I installed the upower-pm-utils-eudev, udisks2-eudev, and procps-ng-eudev packages.
After uninstalling systemd, I could not login to my xfce4-session, as it was complied for systemd. Hence I had to install [https://aur.archlinux.org/packages/xfce4-session-nosystemd/ xfce4-session-nosystemd] from the AUR to get it working.
Additionally, if not already done, [https://wiki.gentoo.org/wiki/ConsoleKit consolekit] can be installed to perform root actions like shutting down or restarting system as non-root user from your Desktop Environment.
Consolekit can be installed in the following way:
sudo pacman -S consolekit-openrc
The output looks like the following:
$ sudo pacman -S consolekit-openrc
[sudo] password for aaditya:
resolving dependencies...
looking for inter-conflicts...
:: polkit-consolekit and polkit are in conflict. Remove polkit? [y/N] y
Packages (5): consolekit-0.4.6-4  js185-1.0.0-2  polkit-0.112-2 [removal]
              polkit-consolekit-0.112-2  consolekit-openrc-20140614-1
Total Download Size:    1.90 MiB
Total Installed Size:  10.67 MiB
Net Upgrade Size:      9.08 MiB
:: Proceed with installation? [Y/n]
To check that consolekit is running and a ck-session was started, the following command can be used:
ck-list-sessions
The output looks like the following:
Session1:
unix-user = '1000'
realname = 'Aaditya Bagga'
seat = 'Seat1'
session-type = ''
active = TRUE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = TRUE
on-since = '2014-06-15T13:29:58.652929Z'
login-session-id = ''


== Further Reading ==
== Further Reading ==
Anonymous user