COSMIC
COSMIC is a desktop environment built by System76 in Rust.
SELinux policies are not currently available through fsvm88's COSMIC overlay.
Installation
On musl profiles, build Rust (dev-lang/rust ) from source before attempting installation.
Overlay
fsvm88's cosmic-overlay provides all necessary packages.
root #eselect repository add cosmic-overlay git https://github.com/fsvm88/cosmic-overlay.git
root #emaint sync -r cosmic-overlay
Unmasking unstable ebuilds
For the latest tagged release, accept unstable ebuilds:
/etc/portage/package.accept_keywords/cosmic-deUnmasking unstable ebuildscosmic-base/* cosmic-de/*
Unmasking live ebuilds
To try out the latest commits from the master branch, accept live ebuilds:
/etc/portage/package.accept_keywords/cosmic-deUnmasking unstable ebuilds# Live ebuilds are masked via "missing" keywords cosmic-base/* ** cosmic-de/* **
Do not mix unstable/alpha releases with live ebuilds. It can cause ABI/API mismatches (for example, an alpha version of the
cosmic-session package being built alongside a live version of the xdg-desktop-portal-cosmic package), resulting in COSMIC failing to start.
Emerge
After unmasking the ebuilds, COSMIC can be installed by emerging the following packages:
root #emerge --ask cosmic-meta pop-theme-metacosmic-overlay ebuilds attempt to install dev-util/dart-sass-bin , which may conflict with the official dev-ruby/sass package. As per this commit, gui-libs/adw-gtk3 versions greater than or equal to 5.10 won't build with dev-ruby/sass . Therefore, consider using dev-util/dart-sass-bin from cosmic-overlay.
Configuration
The most convenient method of login management while using COSMIC is to use a display manager such as greetd. If a display manager is not already in use, install greetd:
root #emerge --ask gui-libs/greetdThe following assumes greetd is being used. Users of SDDM should refer to the "SDDM" section.
systemd
Enable the greetd, cosmic-greeter, upower, and acpid services.
root #systemctl enable greetd.service cosmic-greeter.service cosmic-greeter-daemon.service upower.service acpid.socketOpenRC
In addition to greetd, gui-libs/display-manager-init and elogind should also be installed:
root #emerge --ask gui-libs/display-manager-init gui-libs/greetd sys-auth/elogindConfigure greetd as a display manager:
/etc/conf.d/display-managergreetd with cosmic-greeterCHECKVT=7 DISPLAYMANAGER="greetd"
Add the relevant OpenRC services to the relevant runlevels:
root #rc-update add elogind bootroot #rc-update add display-manager defaultConfigure greetd to run cosmic-greeter as the frontend, which must be run as the cosmic-greeter user.
/etc/greetd/config.tomlgreetd with cosmic-greeter[terminal] vt=7 [default_session] command="/usr/bin/dbus-run-session /usr/bin/cosmic-comp /usr/bin/cosmic-greeter >>/var/log/cosmic.log 2>&1" user="cosmic-greeter"
Finally, reboot the machine.
Optionally, logging can be configured to use the system logger directly, rather than writing to a separate file:
/etc/greetd/config.tomlgreetd with cosmic-greeter[terminal] vt=7 [default_session] command="/usr/bin/dbus-run-session /usr/bin/cosmic-comp /usr/bin/cosmic-greeter 2>&1 | /usr/bin/logger -t cosmic-greeter" user="cosmic-greeter"
Additionally, if auto-login is desired:
/etc/greetd/config.tomlgreetd autologin to COSMIC[terminal] vt=7 [default_session] command="/usr/bin/dbus-run-session env XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=COSMIC /usr/bin/start-cosmic 2>&1 | /usr/bin/logger -t cosmic-greeter" user="your-username"
SDDM
To make COSMIC launch from SDDM's session list, create or edit /usr/share/wayland-sessions/cosmic.desktop:
/usr/share/wayland-sessions/cosmic.desktopCOSMIC session for SDDM[DesktopEntry] Name=COSMIC Comment=System76COSMICDesktop Exec=dbus-run-session env XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=COSMIC start-cosmic Type=Application DesktopNames=COSMIC
If auto-login is desired:
/etc/sddm.conf.d/10-autologin.confSDDM autologin to COSMIC[Autologin] User=your-username Session=cosmic.desktop
Locales
In the COSMIC ecosystem, locales are managed via the COSMIC "initial setup" and "settings" applications.
systemd
On systemd systems, the required localed daemon should be running already.
OpenRC
To manage locales on OpenRC systems, the openrc-settingsd service must be used; this service provides the org.freedesktop.locale1 D-Bus interface.
Add the openrc-settingsd service to the default runlevel, and start it:
root #rc-update add openrc-settingsd defaultroot #rc-service openrc-settingsd start
Troubleshooting
COSMIC session does not start
If the COSMIC session does not start, first check if it starts successfully via a TTY:
root #
dbus-run-session -- env XDG_SESSION_TYPE=wayland XDG_CURRENT_DESKTOP=COSMIC start-cosmic
Check D-Bus services
Inside a running COSMIC session, verify that System76 D-Bus services are available:
root #
dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames | sed -n 's/.*string "\(com\.system76[^"]*\)".*/1円/p'
The output should list multiple com.system76 names, e.g. com.system76.CosmicSettingsDaemon.
Check session environment
Ensure the session has the XDG_CURRENT_DESKTOP and XDG_SESSION_TYPE variables set correctly:
root #
env | grep -E 'XDG_CURRENT_DESKTOP|XDG_SESSION_TYPE|XDG_RUNTIME_DIR|DBUS_SESSION_BUS_ADDRESS'
The value of XDG_CURRENT_DESKTOP should be COSMIC, and the value of XDG_SESSION_TYPE should be wayland.
Verify services are running
The dbus service, which provides a D-Bus system bus (as distinct from a session bus started via e.g. dbus-run-session), and the login/session manager service, e.g. elogindon OpenRC and systemd-logind on systemd, must be running for COSMIC to start properly.
On OpenRC systems:
root #rc-service dbus statusroot #rc-service elogind statusOn systemd systems:
root #systemctl status dbusroot #systemctl status systemd-logind
Check greeter user runtime directory
If using greetd, confirm the cosmic-greeter user has a runtime directory:
root #ls -ld /run/user/$(id -u cosmic-greeter)If that directory is missing, verify that /etc/pam.d/greetd contains:
/etc/pam.d/greetdPAM config for greetd with elogindauth include system-login account include system-login password include system-login session include system-login session required pam_elogind.so
Examine logs
If COSMIC immediately returns to the greeter, check the logs:
root #
tail -n 200 /var/log/messages | grep -Ei 'cosmic-greeter|cosmic-comp|elogind|dbus|permission|denied'
See also
- List of software for Wayland — various desktop related packages for Wayland
- Hyprland — an open-source Wayland compositor written in C++.
- Plasma — a free software community, producing a wide range of applications including the popular Plasma desktop environment.
- Gnome — a feature-rich desktop environment provided by the GNOME project.