GNOME/GNOME without systemd/Gentoo
The fully-featured GNOME desktop environment is directly supported in Gentoo for both systemd and OpenRC, as of gnome-base/gnome-3.30 .
This article briefly covers a native OpenRC install; for an alternative (OpenRC-based) approach, please see Dantrell's overlays.
It is assumed that:
- following completion of the normal "Installing Gentoo" process from the official Handbook, a stock amd64, ~ppc, ~ppc64 or x86 Gentoo system is running, with working internet access etc.
- at least one 'regular' (non-root) user has already been set up;
- the kernel and /etc/portage/make.conf file has been prepared for X-server installation (VIDEO_CARDS and INPUT_DEVICES variables set), as described here. While the X-server itself does not have to actually be installed prior to emerging GNOME, this is recommended (since X-related problems are some of the most commonly encountered);Note
A minimal setup for test purposes, which should run on most systems, can be created by building the kernel using
genkernel all, and setting
INPUT_DEVICES="libinput"in /etc/portage/make.conf; for full functionality and higher screen resolution, 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, instead use the x11-drivers/xf86-video-virtualbox driver, as selected by
- if targeting Wayland, an appropriate Direct Rendering Manager ('DRM') kernel driver has been installed (see e.g. these notes for further details);
- a UTF-8 locale has been selected (as described here).
At the time of writing (May 2019), official support for GNOME on OpenRC has been stabilized for amd64 and x86 users. Other supported architectures (~ppc and ~ppc64) still require use of the testing branch.
Setting global USE flags
If the bindist USE flag is set in /etc/portage/make.conf, it is recommended to unset it now, to avoid issues with dev-libs/openssl, net-misc/openssh and dependencies later.
If it is desired to install GNOME on Wayland (rather than the default X11), then add
wayland egl to the global USE flags, in /etc/portage/make.conf (note that it will still be possible to log in to an old-school GNOME-on-X11 session when needed, even when Wayland is used).
If it is desired to run Xorg without root/suid (which is far more secure) then add
elogind to the global USE flags.
Performance notwithstanding, probably the strongest end-user reason to transition to a Wayland-based desktop is security: unlike X11, by default Wayland enforces application isolation at the GUI level. More detail about about X11's vulnerability in this regard (and how to mitigate it, for legacy apps), may be found in the additional mini-guide, here.
To disable GNOME's tracker software (this is optional), add
-tracker to the global USE flags in /etc/portage/make.conf.
Then, ensure everything is up-to-date, before proceeding further:
emerge --deep --with-bdeps=y --changed-use --update --ask --verbose @world
Setting the GNOME profile, and updating
The version number in the profile should match the current one listed in eselect profile show. Do not blindly set it to another without reading any news for migrations.
To ease installation under OpenRC, select the appropriate profile now (this will ensure appropriate package-specific USE flags, masks etc are set to ensure a painless GNOME emerge):
eselect profile set "default/linux/amd64/17.1/desktop/gnome"
eselect profile show
Current /etc/portage/make.profile symlink: default/linux/amd64/17.1/desktop/gnome
Do not set the .../gnome/systemd profile here: it will not work correctly with OpenRC.
With the desired profile set, re-emerge @world, to pick up the new USE flags, default packages etc.
emerge --ask --deep --changed-use --update --verbose @world
Please do not skip this step - the subsequent GNOME emerge will probably fail otherwise.
GNOME itself may now be emerged! Issue:
emerge --ask --verbose --keep-going gnome-base/gnome
If any MAKEOPTS and/or EMERGE_DEFAULT_OPTS build parallelism is in use, 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
emerge --ask --verbose --keep-going gnome-base/gnome
If desired, it is possible to emerge gnome-base/gnome-light instead, and then add applications later.
Assuming that completes successfully, it is still important to check that the necessary X11 drivers have been properly emerged: often, they will not have been, particularly if it proved necessary to run the emerge step more than once (due to build parallelism errors). To make sure, issue:
emerge --ask --verbose --oneshot x11-base/xorg-drivers
Once GNOME is emerged, change the DISPLAYMANAGER value in the display-manager configuration file (/etc/conf.d/display-manager), so that the gdm display manager is used:
Leave the rest of the file as-is.
Then, set dbus, display-manager, and openrc-settingsd to come up in the default runlevel:
rc-update add dbus default
rc-update add display-manager default
rc-update add openrc-settingsd default
Also, ensure that the sys-auth/elogind service starts up at boot:
rc-update add elogind boot
Next, check if the machine has a plugdev group, and, if it does, add any regular users to it:
getent group plugdev && gpasswd -a <regular_username> plugdev
To allow the use of direct rendering, issue:
getent group video && gpasswd -a <regular_username> video
Finally, start up GNOME!
A GNOME login screen should now be visible (and this will also come up automatically on boot). On some machines, it may be necessary to move the mouse or press a key, for the login screen to appear.
Even when using a Wayland-based system, it is still possible to use GNOME over X11 for a given session (this may be useful to run applications that do not yet work correctly under Wayland). To do so, simply click on the "cogwheel" icon when logging in, and select GNOME on Xorg from the drop-down menu. To log into a Wayland session instead, use the GNOME "cogwheel" menu item — the setting is persistent between logins. Incidentally, to double-check which graphical platform (X11 or Wayland) is in use when logged in, simply issue (in a graphical terminal):
- rebooting the system may be required before elogind works properly, though
rc-service display-manager startmay suffice
- check the docs on how to set up Non root Xorg instead of using suid for a more secure system (also has helpful troubleshooting suggestions)
When using a Wayland GNOME session, unported applications (such as www-client/firefox, at the time of writing) will be hosted in a shared, rootless X11 server (the so-called "XWayland" approach). This generally works well, but may not be sufficient for all legacy apps (such as some games and virtualization environments). For such cases, remember that it is always possible to login to a 'old-school' GNOME-on-X11 session, should workflow dictate.
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.
To remove GNOME, begin by unmerging it:
emerge --deselect gnome-base/gnome
Switch profile; for example:
eselect profile set "default/linux/amd64/17.1"
emerge --ask --update --deep --changed-use @world
emerge --ask --depclean
Prevent unnecessary services starting up automatically; e.g.:
rc-update del elogind boot
rc-update del dbus default
rc-update del display-manager default
rc-update del openrc-settingsd default
Finally, reboot the system to complete the uninstall (to a textual login, in this case).
- Project:GNOME — aims to bring the current and complete GNOME desktop environment to Gentoo.
- GNOME Display Manager — is the daemon responsible for launching graphical display sessions via the Xorg display server or the gnome-shell directly via Wayland display protocol.
- Sakaki's Unofficial EFI Install Guide
- The project's sticky support thread on the Gentoo Forums.
- ↑ Raudsepp, Mart. Gentoo Blogs: "Gentoo GNOME 3.30 for all init systems", March 26th, 2019. Retrieved April 26th 2019.