Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
en:system:init_systems:openrc [2022/03/08 20:44]
i3_relativism [OpenRC]
en:system:init_systems:openrc [2022/10/24 15:34]
throgh [Migration]
Line 80: Line 80:
 ====== OpenRC ====== ====== OpenRC ======
  
-Since Hyperbola has announced the [[https://www.hyperbola.info/news/end-of-systemd-support/|end of systemd support]], migration to OpenRC is required.+Since Hyperbola has announced the [[https://www.hyperbola.info/news/end-of-systemd-support/|end of systemd support]], OpenRC is our main used init system and with release 0.4 we have also included further support for Runit.
  
 ===== What is OpenRC? ===== ===== What is OpenRC? =====
Line 101: Line 101:
 # gpasswd -a <your-user> audio # gpasswd -a <your-user> audio
 </code> </code>
- 
-In the case of some graphical environments, such as KDE, you´ll need to edit <color #0B71B9/#DDF1FF>/etc/pulse/client.conf</color> and remove the <color #0B71B9/#DDF1FF>autospawn = no</color> line, and it should look something like this: 
- 
-<code> 
-... 
-; default-sink = 
-; default-source = 
-; default-server = 
-; default-dbus-server = 
- 
-; autospawn = yes 
-; daemon-binary = /usr/bin/pulseaudio 
-; extra-arguments = --log-target=syslog 
- 
-; cookie-file = 
- 
-; enable-shm = yes 
-; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB  
- 
-; auto-connect-localhost = no 
-; auto-connect-display = no 
-</code> 
- 
-<note warning>This is just in the case you use <color #620BB9/#EEDDFF>PulseAudio</color>. For more information refer to [[https://forum.manjaro.org/t/pulseaudio-and-openrc/5881|this topic]] from the Manjaro forum.</note> 
- 
-<note important> For security reasons, we have plans to use [[https://www.hyperbola.info/todo/sndio-migration/|sndio as PulseAudio replacement]]. Since it requires a hard transition, it will be made for the next version, aka Milky Way v0.4. We will make an announcement when it is ready.</note> 
  
 Same for video, your games might be laggy otherwise: Same for video, your games might be laggy otherwise:
Line 166: Line 140:
 ===== Migration ===== ===== Migration =====
  
-Since OpenRC is included by default and systemd is blacklisted by [[https://www.hyperbola.info/packages/?q=your-freedom|your-freedom]], one may get messages on migrating like: +<note important> Be aware that since the release of version 0.we do not recommend any kind of migration from another system based onto Arch GNU/Linux. Since Hyperbola has included many changes and therefore differences it would be better to install the system from scratch with all changes you wish.</note>
- +
-<code bash> +
-run 'rc-update add cronie default' +
-run 'rc-update add haveged default' +
-</code> +
- +
-Running these command(s) adds the service(s) to the specified runlevels. For example on running: +
- +
-<code bash> +
-# rc-update add cronie default +
-</code> +
- +
-The cronie service would be added to the default runlevel and would automatically be started at boot. +
- +
-cronie (for cron) and haveged (for entropy harvesting) are some common services that can be enabled. +
- +
-Also you need to install [[https://www.hyperbola.info/packages/?q=polkit|polkit]] to gain enough desktop privileges for operations like shutdown, mounting usb device: +
- +
-<code bash> +
-# pacman -S polkit +
-</code> +
- +
-<note important> Currently, [[https://www.hyperbola.info/packages/?q=networkmanager|NetworkManager]] and any display manager such as [[https://www.hyperbola.info/packages/?q=gdm|GDM]] or [[https://www.hyperbola.info/packages/?q=lightdm|LightDM]] runs the elogind service in Hyperbola automatically, however if you will use the [[https://www.hyperbola.info/packages/?q=xorg-xinit|xinit program]] to start the [[https://www.hyperbola.info/packages/?q=xorg-server|X Window System server]] or [[https://www.hyperbola.info/packages/?q=weston|Weston]]/[[https://www.hyperbola.info/packages/?q=sway|Sway]] to start [[https://www.hyperbola.info/packages/?q=wayland|Wayland]] and use [[https://www.hyperbola.info/packages/?q=netifrc|netifrc]] instead of [[https://www.hyperbola.info/packages/?q=networkmanager|NetworkManager]], you need add the elogind service to a runlevel (eg. default) to be started at boot automatically.</note> +
- +
-<note important> For security reasons, we have plans to use [[https://www.hyperbola.info/todo/consolekit-migration/|ConsoleKit as elogind replacement]]. Since it requires a hard transition, it will be made for the next version, aka Milky Way v0.4. We will make an announcement when it is ready.</note>+
  
 ===== Configuration ===== ===== Configuration =====
Line 228: Line 177:
       ==> rc 'rc-update add ... default'       ==> rc 'rc-update add ... default'
 </code> </code>
- 
-<note tip>Make sure what services you was using in systemd to re-enable them in OpenRC: 
-<code bash> 
-$ ls -ls /etc/systemd/system/multi-user.target.wants/ 
-</code> 
-Sometimes, there are target files such as <color #0B71B9/#DDF1FF>remote-fs.target</color> which are useless in OpenRC. 
-</note> 
- 
 ==== Hostname ==== ==== Hostname ====
  
Line 251: Line 192:
 </code> </code>
  
-==== NetworkManager settings ====+==== Network settings ====
  
-You need to enable the software at boot:+You need to enable the daemon <color #620BB9/#EEDDFF>dhcpcd</color> at runlevel default:
  
 <code bash> <code bash>
-# rc-update add NetworkManager default+# rc-update add dhcpcd default
 </code> </code>
- 
-In order to not change the computer's hostname when you're connecting to Internet (provided by dhcp), uncomment the part <color #0B71B9/#DDF1FF>[keyfile]</color> in the file <color #0B71B9/#DDF1FF>/etc/NetworkManager/NetworkManager.conf</color> as follow : 
- 
-<code> 
-# Static hostname 
-[keyfile] 
-hostname=**Votre hostname** 
-</code> 
- 
-For NetworkManager to work correctly in OpenRC, make sure that <color #0B71B9/#DDF1FF>/etc/hostname</color> has the same localhost as in <color #0B71B9/#DDF1FF>/etc/conf.d/hostname</color>. Optionally, you can safely remove <color #0B71B9/#DDF1FF>/etc/hostname</color> 
- 
-<note important> For security reasons, we have plans to remove [[https://www.hyperbola.info/packages/?q=networkmanager|NetworkManager]]. Since it requires a hard transition, it will be made for the next version, aka Milky Way v0.4. We will make an announcement when it is ready, so we recommend you use [[https://www.hyperbola.info/packages/?q=netifrc|netifrc]] as alternative.</note> 
  
 ==== Kepmap ==== ==== Kepmap ====
Line 291: Line 220:
 Unlike another distros with OpenRC support, the DM is launched directly. Unlike another distros with OpenRC support, the DM is launched directly.
  
-For example, with <color #620BB9/#EEDDFF>lightdm</color>, you just need enable the service.+For example, with <color #620BB9/#EEDDFF>wdm</color>, you just need enable the service.
  
 <code bash> <code bash>
-# rc-update add lightdm default+# rc-update add wdm default
 </code> </code>
  
Line 336: Line 265:
  
 <code bash> <code bash>
-# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules+# ln -s /dev/null /lib/udev/rules.d/80-net-name-slot.rules
 </code> </code>
  
Line 380: Line 309:
 ==== The system can't shutdown correctly ==== ==== The system can't shutdown correctly ====
  
-Begin with OpenRC 0.28 SysVinit is replaced with openrc-init, shutdown is replaced with openrc-shutdown. If you use <color #620BB9/#EEDDFF>startx</color> to start your desktop, you also need to modify <color #0B71B9/#DDF1FF>~/.xinitrc</color> for xfce4, replace <color #620BB9/#EEDDFF>exec ck-launch-session startxfce4</color> to <color #620BB9/#EEDDFF>startxfce4</color>.+Begin with OpenRC 0.28 SysVinit is replaced with openrc-init, shutdown is replaced with openrc-shutdown. If you use <color #620BB9/#EEDDFF>startx</color> to start your desktop, you also need to modify <color #0B71B9/#DDF1FF>~/.xinitrc</color> when you have issues with your window-manager starting correctly.
  
 ===== Acknowledgement ===== ===== Acknowledgement =====
  
 This wiki article is based on **[[https://wiki.parabola.nu/|ParabolaWiki]]**. This wiki article is based on **[[https://wiki.parabola.nu/|ParabolaWiki]]**.