$OpenBSD: README-main,v 1.45 2019/03/26 18:22:04 ajacoutot Exp $

+-----------------------------------------------------------------------
| Running gnome on OpenBSD
+-----------------------------------------------------------------------

(see "Cheat sheet" at the end of this file for a quick setup)

The GNOME desktop is composed of 2 meta-packages:
    * gnome, for a standard GNOME installation
    * gnome-extras, for a full GNOME installation

The "gnome" package is focused on generic usage to give the user the
choice to install his favorite applications for daily usage (i.e. PIM,
WWW browser, office and development applications have been left out on
purpose).

Starting GNOME
==============

DBus
----
Before running gnome-session(1), a system-wide D-Bus daemon needs to be
running ("messagebus" must be added to "pkg_scripts" in rc.conf.local(8)).

GDM
---
Session management requires the use of GDM as login manager, otherwise
some key features like screen locking, session tracking... will not work
properly. To do so, "gdm" must be added at the end of "pkg_scripts" in
rc.conf.local(8) (and "xenodm_flags" commented or removed).

GDM greeter language and character set is configured in:
    /etc/gdm/locale.conf
Note that the variables set in this file will be inherited by the user session.
They can be unset/overriden in the user's .profile file.

Alternative (non-GDM) GNOME startup
-----------------------------------
*** NOT RECOMMENDED ***
To start GNOME without GDM, the following line needs to be added:
    exec /usr/local/bin/ck-launch-session /usr/local/bin/gnome-session
to ~/.xinitrc when using startx(1) (console login)
to ~/.xsession when using xenodm(1) (or similar login)

mDNS/DNS-SD support
===================
The avahi-daemon(8) daemon provides Zeroconf support (aka. Bonjour /
Rendezvous) in GNOME. Several applications can optionally benefit from
it (e.g. the "Network" shortcut in nautilus(1)) while some others
will not work at all without it (e.g. seahorse-sharing(1)).

To make use of it, rc.conf.local(8) needs to contain the following line:
    multicast=YES
and "avahi_daemon" must be added to "pkg_scripts" _after_ "messagebus".

LibreOffice integration
=======================
The gnome-documents manager does not support Office type documents by default
(e.g. docx, .odt, .ods) but relies on unoconv to display them. If such support
is needed, `doas pkg_add unoconv` will take care of it.

Default limits
==============
The default limits set in login.conf(5) are not high enough to properly run
GNOME. The default "datasize" must be bumped. There are several ways to do this:

- bump the "default" class "datasize-cur" to 1024M (*not* recommended)
- add users to the "staff" class (*not* recommended)
- create a "gnome" login class and add users to it (recommended, see below)

Cheat sheet
===========
# cat <<'EOF' >>/etc/login.conf

gnome:\
	:datasize-cur=1024M:\
	:tc=default:
EOF
# usermod -L gnome ${username}
# rcctl disable xenodm
# rcctl enable multicast messagebus avahi_daemon gdm
# reboot
