View on GitHub

1.6 Gentoo - Desktop Managers

Download this project as a .zip file Download this project as a tar.gz file

1.6 Gentoo - Desktop Managers

Overview

I've bundled together all the notes on setting up Desktop Environments here

LXDE

The default desktop is lxde for the rpi

emerge lxde-meta
rc-update add dbus default

Gnome

I've put some notes here on installing Gnome onto the Rpi2, again I'm not a big fan of gtk personally but it's used by mono and I just wanted to try it out

As a first step I'd recomend installing systemd this doesn't mean you have to boot using it, but it is a depend for Gnome

Next I had to make the following use changes to /etc/portage/package.use

dev-libs/openssl -bindist
net-misc/openssh -bindist

I didn't want to disable bindist globally (bindist means use binary packages where you can instead of compiling source). But one of the Gnome depends, requires openssl be installed with -bindist. Also openssh needs to have the same bindist setting as openssl

If you try to emerge gnome for the first time you'll probably get a list of use flags and package unmasks it's asking for as part of the install

Any other use flags it asked for I just enabled globally using ufed. For unmasking I just used --autounmask-write and etc-update to unmask the Gnome packages that were needed. Also I'd recomend installing from within a tmux session if doing this over ssh so you can leave it unattended. and to make sure your existing world packages are already up to date first, just to avoid complications

emerge gnome

Note it takes a little while to start up so it's best to be patient.

KDE

This one might be a bit heavy for the rpi, but I wanted to experiment with different desktops, and I wanted the Qt libs

Since I want to use the latest plasma 5.2 lets add in the kde overlay

layman -f -a kde

Next unmask the kde plasma ebuilds

mkdir -p /etc/portage/package.unmask
cd /etc/portage/package.unmask
ln -s /var/lib/layman/kde/Documentation/package.unmask/kde-plasma-5.2

Next time to change some keywords
Note I already had a file setup under /etc/portage/package.acceptkeywords so I had to relocate this to cd /etc/portage/package.acceptkeywords/autounmask.keywords

mkdir -p /etc/portage/package.accept_keywords
cd /etc/portage/package.accept_keywords
ln -s /var/lib/layman/kde/Documentation/package.keywords/kde-frameworks-5.7.keywords
ln -s /var/lib/layman/kde/Documentation/package.keywords/kde-plasma-5.2.keywords 

Lets disable the upower use flag for sddm if systemd is enabled

nano -w /etc/portage/package.use
x11-misc/sddm -upower

Note when unmasking package names try to make sure the version number is 5.2.9999 instead of 9999 for packages under the group kde-plasma. For kde 4 the kde-meta package name would be used, but for plasma we use instead

emerge --ask @kde-plasma

I've also found there seems to be some issues with finding the git repo for kde-plasma/libmm-qt I couldn't find the repo on the kde site so it's possible that it's no longer needed

Another thing to watch out for is that I had to unmask the egl use flag And enable egl for clutter to get it to build without conflicts

mkdir -p /etc/portage/profile
echo "-egl" >> /etc/portage/profile/use.mask

After installing everything, I noticed that a single file was missing for startx /etc/X11/Sessions/KDE-5

Let's create a new file

nano -w /etc/X11/Sessions/KDE-5

Add 2 lines of text to it

#!/bin/sh
exec "/usr/bin/startkde"

make it executable

chmod +x /etc/X11/Sessions/KDE-5

At this point we should now be able to select it via XSESSION=KDE-5 (see below)

MayNard

Looking at this Link
In order to get an accelerated desktop ideally we need to use wayland However the default desktop the rpi uses LXDE doesn't currently support wayland

One option is kde or gnome, but they're a bit heavyweight for the Pi
Raspian has been working on something called Maynard as an alternative for use with Wayland

It looks as if there's an overlay setup for it already under leio

Lets install

emerge wayland
emerge maynard

In some cases the gles or gles2 use flags are required when wayland is enabled. Since gles (opengl es) is a subset of opengl designed for embedded systems I'd recomend only enabling gles / gles2 only on the packages that need it enabled to compile Otherwise you may get conflicts later on with packages within kde plasma for example

TODO

Misc

Default Window Manager

In order to choose the default X window manager we need to edit a file. For example to set to lxde

nano -w /etc/env.d/90xsession

XSESSION=lxde

env-update && source /etc/profile

To get a list of the available values we can put there:

cd /etc/X11/Sessions/
ls -l

Then to start up X

startx

It's important to run env-update and source /etc/profile after changing the value in the file In order for the default value to be used to change

XRDP

XRdp is usefull for when we want to connect to the Desktop via rdp from the outside

make sure server use flag is enabled

emerge --autounmask-write xrdp
etc-update
emerge xrdp

TODO Check setup with Wayland etc

3D Acceleration

TODO

enable egl / gles / gles1 / gles2 / gles3 disable opengl global

TODO make sure to remerge these:

net-libs/webkit-gtk
kde-frameworks/plasma
kde-plasma/kwin

3D OpenGL ES

Look into these: