GNOME/GNOME Without systemd
Brief instructions for using GNOME (3.14, 3.16, 3.18, 3.20, 3.22 or 3.24) under OpenRC (rather than systemd) in Gentoo, via Dantrell B.'s patchset.
Contents
Introduction
Users of GNOME 3 on Gentoo have, until recently, been required either to use systemd as their init system, or else to use a 'shim' overlay to pull in Funtoo's patched version of GNOME (which supports OpenRC).
Now, however, Dantrell B., the primary author of the Funtoo GNOME patchset, has made his work available for Gentoo users directly.
To be clear, this means that you can now enjoy the full GNOME experience (including session tracking and power management), even on a PC running 'stable branch' (amd64) Gentoo, without systemd.
This brief guide leads you through the steps you need to take to get GNOME up and running under this patchset.
As with any third-party overlay, please be aware that:
- you may find it more difficult to get support via the normal Gentoo channels (the forums etc.). when using an 'unofficial' patchset such as this one;
- security fixes etc. may take longer to be released, and the overlays may themselves contain security holes;
- the patchset's author (Dantrell B.) may cease support for this patchset in the future.
Having said that:
- the vast majority of the GNOME code is unaffected by the patches;
- the patchset code itself is largely shared with Funtoo, who use it in their mainline distribution, so you will not be alone;
- Dantrell B. has stated his intention to support this patchset for Gentoo (at least until either a proper answer for the GNOME/systemd issue is arrived at, he ceases to use GNOME, or the complexity gets out of control).
The "GNOME without Systemd" thread on the Gentoo wiki has been stickied and now doubles as an "official" support forum; accordingly, if you experience problems with this patchset, please post your issue there.
Prerequisites
It is assumed that:
- having followed the normal "Installing Gentoo" process from the official Handbook, you are currently running a stock amd64 Gentoo system which has working internet access etc. (it is also fine to be on ~amd64)
- you have at least one 'regular' (non-root) user set up;
- you have prepared your kernel and /etc/portage/make.conf file for X-server installation (VIDEO_CARDS and INPUT_DEVICES variables set), as described here. You do not have to have actually installed the X-server, however (although since X-related problems are some of the most commonly encountered when installing GNOME, it is recommended that you do);Note
A minimal setup for test purposes, which should run on most systems, can be created by building the kernel using genkernel all, and settingVIDEO_CARDS="vesa"andINPUT_DEVICES="evdev synaptics"in /etc/portage/make.conf; for full functionality and higher screen resolution, you should of course specify the correct video driver and kernel options, per the guide just cited.
NB, the vesa driver will not work if running as a guest in VirtualBox with EFI emulation turned on; in this case, you should instead use the x11-drivers/xf86-video-virtualbox driver, as selected byVIDEO_CARDS="virtualbox"in /etc/portage/make.conf. - you have a UTF-8 locale selected (as described here).
Installation
Setting Global USE Flags
First, if you have the bindist USE flag set in your /etc/portage/make.conf file, it is recommended to unset it now, to avoid issues with dev-libs/openssl, net-misc/openssh and dependencies later.
Next, ensure everything is up-to-date on your current setup, before proceeding further:
root #emerge --sync
Installing the Overlays
You now have two options: either install Dantrell B.'s overlays under layman, or add them directly (assuming you are using version >= 2.2.16 of sys-apps/portage).
Option 1: Installation under layman
To install the overlays, first emerge and configure layman, as detailed here, with the git USE flag enabled (it is by default).
Then, edit the overlays stanza of /etc/layman/layman.cfg so it reads:
/etc/layman/layman.cfgMake dantrell overlays visible to laymanoverlays : https://api.gentoo.org/overlays/repositories.xml https://raw.githubusercontent.com/dantrell/gentoo-overlay-dantrell-gnome/master/repositories.xml
Sync the overlay metadata, and add the 'generic' GNOME overlay:
root #layman --sync-all
root #layman -a dantrell-gnome
Next, add the desired GNOME 'version' overlay(s); if using the 'stable' (amd64) branch, it is probably best to use the one which matches the current stable gnome-base/gnome in Gentoo (version 3.22, at the time of writing).
It's OK to add more than one (you can even safely add all six of dantrell-gnome-3-14, dantrell-gnome-3-16, dantrell-gnome-3-18, dantrell-gnome-3-20, dantrell-gnome-3-22 and dantrell-gnome-3-24) — your profile (which we will set below) will determine which takes precedence.
For GNOME 3.14, issue:
root #layman -a dantrell-gnome-3-14
For GNOME 3.16, issue:
root #layman -a dantrell-gnome-3-16
For GNOME 3.18, issue:
root #layman -a dantrell-gnome-3-18
For GNOME 3.20, issue:
root #layman -a dantrell-gnome-3-20
For GNOME 3.22, issue:
root #layman -a dantrell-gnome-3-22
For GNOME 3.24, issue:
root #layman -a dantrell-gnome-3-24
Option 2: Direct Installation
Under modern (>= 2.2.16) versions of portage, it isn't necessary to use layman - you can add the overlays directly if you like.
The following will assume you are using the 'subdirectory' approach for /etc/portage/<...> settings files, as this is more convenient, and furthermore is what is now used on the Gentoo "minimal install" images).
Begin by ensuring the that you have a /etc/portage/repos.conf directory in place:
root #mkdir -pv /etc/portage/repos.conf
Check you have a /etc/portage/repos.conf/gentoo.conf file; if not, create it following the pattern below (adapt the sync-uri appropriately for your location):
/etc/portage/repos.conf/gentoo.confConfiguration for the Gentoo repo[DEFAULT] main-repo = gentoo [gentoo] location = /usr/portage sync-type = rsync auto-sync = yes sync-uri = rsync://rsync.uk.gentoo.org/gentoo-portage
Next, we need to create configuration files for Dantrell B.'s external ebuild repositories (aka, overlays). At the time of writing there are seven such repos: a 'common' one, and one for each of GNOME 3.14, 3.16, 3.18, 3.20, 3.22 and 3.24. Create the following file for the 'common' overlay:
/etc/portage/repos.conf/dantrell-gnome.confConfiguration for dantrell-gnome repo[dantrell-gnome] # Dantrell B.'s Gentoo Overlay for GNOME (generic) # Maintainer: Dantrell B. (email: see CONTRIBUTING.md in main GitHub project) # Homepage: https://github.com/dantrell/gentoo-project-gnome-without-systemd location = /usr/local/portage/dantrell-gnome sync-type = git sync-uri = https://github.com/dantrell/gentoo-overlay-dantrell-gnome.git priority = 150 auto-sync = yes
Next, create the desired GNOME 'version' overlay configuration file(s), as shown below; if using the 'stable' (amd64) branch, you should create at least the one which matches the current stable gnome-base/gnome in Gentoo (version 3.22, at the time of writing).
For GNOME 3.14, create the following file:
/etc/portage/repos.conf/dantrell-gnome-3-14.confConfiguration for dantrell-gnome-3-14 repo[dantrell-gnome-3-14] # Dantrell B.'s Gentoo Overlay for GNOME (3.14) # Maintainer: Dantrell B. (email: see CONTRIBUTING.md in main GitHub project) # Homepage: https://github.com/dantrell/gentoo-project-gnome-without-systemd location = /usr/local/portage/dantrell-gnome-3-14 sync-type = git sync-uri = https://github.com/dantrell/gentoo-overlay-dantrell-gnome-3-14.git priority = 100 auto-sync = yes
We can use this file as a basis for the other (3.16 → 3.24) variants, rather than entering them manually. To do so, issue:
(chroot) livecd / #for ((R=16;R<=24;R+=2)); do cp -v /etc/portage/repos.conf/dantrell-gnome-3-{14,${R}}.conf; sed -e "s/14/${R}/g" -i /etc/portage/repos.conf/dantrell-gnome-3-${R}.conf; done
This assumes that your current shell is bash; if it is not, adapt the given command accordingly, or set up the files manually.
Note that it is fine to have multiple versions installed, as the profile — which we will select shortly — will decide which takes precedence.
Next, if you haven't already got it on your system, install git:
root #emerge --ask --verbose --noreplace dev-vcs/git
Then sync everything:
root #emaint sync --auto
Setting the Profile, and Updating
Dantrell's overlays provide a bundled set of profiles. By using one of these, you can conveniently set appropriate USE flags, masks etc., to ensure that installation proceeds smoothly. For any of the GNOME releases (3.14, 3.16, 3.18, 3.20, 3.22 and 3.24) you can choose a 'standard' or 'extended' profile. The latter have more USE flags enabled by default, to yield a similar experience to the familiar desktop/gnome profiles in Gentoo.
Not all of the default USE flags from the Gentoo GNOME profiles are mirrored, even in the 'extended' variants, and indeed some USE flags notable by their absence in Gentoo are enforced. For example:
- qt3support and qt4 are enabled by default in Gentoo, but not in any of Dantrell's profiles. Per Dantrell: "The former isn't something that should be enabled upstream, especially since things have moved to qt4 and qt5. Users should decide for themsleves if they want qt3 support. As for the latter, it shouldn't be enabled globally at all in a GNOME environment, especially if gtkstyle is not enforced (and gtkstyle should be enforced regardless)."
- Following neatly on from that, gtkstyle is enforced by the Dantrell profiles (but not in Gentoo's).
- gtk is also enabled by default in Gentoo, but not in Dantrell's profiles. Per Dantrell: "this is handled by default and on packages where it's not enabled it likely refers to optional GTK+-related support that does not enable a GUI".
Select an appropriate profile now (at the time of writing, users on the "stable" (amd64) branch are probably safest sticking to one of the 3.14 - 3.22 profiles (although, for reference, 3.24 will build under amd64); ~amd64 users may use whichever they choose):
root #eselect profile list
[1] default/linux/amd64/13.0 * [2] default/linux/amd64/13.0/selinux ... additional output suppressed .. [21] dantrell-gnome:default/amd64/3.14 [22] dantrell-gnome:default/amd64/3.14/extended [23] dantrell-gnome:default/amd64/3.16 [24] dantrell-gnome:default/amd64/3.16/extended [25] dantrell-gnome:default/amd64/3.18 [26] dantrell-gnome:default/amd64/3.18/extended [27] dantrell-gnome:default/amd64/3.20 [28] dantrell-gnome:default/amd64/3.20/extended [29] dantrell-gnome:default/amd64/3.22 [30] dantrell-gnome:default/amd64/3.22/extended [31] dantrell-gnome:default/amd64/3.24 [32] dantrell-gnome:default/amd64/3.24/extended
(The numbering etc. on the list you see may well differ from the above.)
root #eselect profile set "dantrell-gnome:default/amd64/3.22/extended"
root #eselect profile show
Current /etc/portage/make.profile symlink: dantrell-gnome:default/amd64/3.14/extended
You may wish to take note of the 'grading' status of the available GNOME versions on Dantrell's page here, when making your choice.
With your desired profile set, re-emerge @world, to pick up the new USE flags, default packages etc.
root #emerge --deep --with-bdeps=y --changed-use --update --ask --verbose @world
Please do not skip this step - the subsequent GNOME emerge will probably fail if you do.
The various dependencies for GNOME without systemd are now installed automatically, either as part of the above @world update under the custom profile (e.g., sys-apps/dbus and sys-auth/consolekit (for <= GNOME 3.22) / sys-auth/elogind (for >= GNOME 3.24)) or during the gnome-base/gnome emerge to follow shortly (e.g., sys-power/pm-utils and sys-power/acpid); nothing further needs to be emerged at this stage. However, we do need to make sure the various services will come up on boot, and start them:
root #rc-update add dbus default
Then, if targeting <= GNOME 3.22, issue:
root #rc-update add consolekit default
root #openrc
otherwise, if targeting >= GNOME 3.24, issue:
root #rc-update add elogind boot
root #openrc
Preparing USE Flags Prior to GNOME Emerge
If there are any additional applications you would like installed as part of the GNOME emerge, set their USE flags now, as follows:
bijiben |
Install the app-misc/bijiben note editor |
boxes |
Install the gnome-extra/gnome-boxes remote and virtual system manager |
builder |
Install the gnome-extra/gnome-builder IDE (only in GNOME 3.16 or greater) |
california |
Install the gnome-extra/california calendar |
epiphany |
Install the www-client/epiphany web browser |
evolution |
Install the mail-client/evolution mail client |
flashback |
Install the gnome-base/gnome-flashback (aka fallback mode) |
fonts |
Install media-fonts/{noto,symbola,unifont} |
games |
Install Gnome Games |
geary |
Install the mail-client/geary mail client |
gnote |
Install the app-misc/gnote note editor |
latexila |
Install the app-editors/latexila integrated LaTeX environment |
share |
Install the gnome-extra/gnome-user-share personal file sharing tool |
shotwell |
Install the media-gfx/shotwell photo manager |
todo |
Install the gnome-extra/gnome-builder task manager (only in GNOME 3.18 or greater) |
tracker |
Install the app-misc/tracker indexer and the GNOME packages that require it |
For example, to add the epiphany browser to the set of installed applications, do:
root #mkdir -pv /etc/portage/package.use
root #echo "gnome-base/gnome-extra-apps epiphany" >> /etc/portage/package.use/gnome-extra-apps
The above assumes that /etc/portage/package.use is a directory, which is now the default on the Gentoo minimal install image. If using a single file instead, simply append to /etc/portage/package.use instead of /etc/portage/package.use/gnome-extra-apps in the above.
There are some additional GNOME 'quality of life' improvements in Dantrell's patchset (background resolution etc.), which are controlled by USE flags on certain packages. The defaults will probably be suitable for most users, but for more details please see here.
Emerging GNOME
Right, we are now ready to emerge GNOME! To do so, issue:
root #emerge --ask --verbose --keep-going gnome-base/gnome
If you are using any MAKEOPTS and/or EMERGE_DEFAULT_OPTS build parallelism, it is quite possible that one or more elements of this large emerge will fail. If that occurs, in the first instance, simply issue the
root #emerge --ask --verbose --keep-going gnome-base/gnomeAssuming that completes successfully, you should still check that the necessary X11 drivers have been properly emerged: often, they will not have been, particularly if you had to run the emerge step more than once (due to build parallelism errors). To make sure, issue:
root #emerge --ask --verbose --oneshot x11-base/xorg-drivers
If you are using VirtualBox, please note that you may need to upgrade your version of sys-devel/gcc (to a 'non-stable' variant, possibly) in order to compile x11-drivers/xf86-video-virtualbox. If the above emerge of x11-base/xorg-drivers failed, give this a shot.
As suggested earlier, you can also try using
VIDEO_CARDS="vesa" just to get things going initially.Configuring and Running GNOME
Once GNOME is emerged, you need to change the DISPLAYMANGER value in the xdm configuration file (/etc/conf.d/xdm), so that the gdm display manager is used:
/etc/conf.d/xdmSpecify the GNOME display manager, as follows# What display manager do you use ? [ xdm | gdm | kdm | gpe | entrance ] # NOTE: If this is set in /etc/rc.conf, that setting will override this one. DISPLAYMANAGER="gdm"
Then set acpid, xdm, NetworkManager and openrc-settingsd to come up on boot, and disable dhcpcd if you are using it:
root #rc-update add acpid default
root #rc-update add xdm default
root #rc-update add openrc-settingsd default
root #rc-update add NetworkManager default
root #rc-update del dhcpcd default
Check if your machine has a plugdev group, and, if it does, add any regular users to it:
root #getent group plugdev && gpasswd -a <yourusername> plugdev
If you wish to allow your regular users to play the GNOME games (assuming you installed them):
root #getent group games && gpasswd -a <yourusername> games
Start up GNOME!
root #openrc
You should now have a GNOME login screen visible (and this will also come up automatically on boot). On some machines, you may need to move the mouse or press a key, for the login screen to appear.
Have fun!
Using GNOME
For more information about the GNOME interface (which is generally self-explanatory), see https://gnome.org. Some additional useful setup tips about GNOME may also be found here.