OpenBSD: Gnome3

Article published the ; modified the
4 minutes to read

This article has 738 words.
RAW source of the article: MD

Description

Gnome3 is one Desktop Environment, available on OpenBSD.

⇒ Environnement:

  • OpenBSD: 6.9

In this tutorial, I assume that OpenBSD has just been freshly installed, and that everything has to be done.

Installation

Usual: # pkg_add gnome gnome-extras

Some dependancies are installed, like avahi, consolekit2, dbus, samba, sane-backend, and many more.

Configuration

The Gnome3 environment works differently from other desktop environments.

Don’t try to set up personal files profile, .kshrc, or even .xsession; they will not be taken into your account when starting and using Gnome.

Daemons

If during the OpenBSD installation you have activated xenodmthe default X Display Manager ­— disable it!

# rcctl disable xenodm
# rcctl stop xenodm

After, active gdm, the session manager, and all needed daemons.

# rcctl enable multicast messagebus avahi_daemon gdm
# rcctl start multicast messagebus avahi_daemon gdm

Limits

As wrote on the pkg-readme file, limits are not enough to execute correctly Gnome.

Too, gdm will be missing file descriptors.

Let’s do it right:

  • create a “gnome” login class, and add your user to this class
  • and, a “gdm” login class, and expand it to the xenodm.

Modify the /etc/login.conf file to add:

gnome:\
	:datasize-cur=1024M:\
	:tc=default:

gdm:\
	:tc=xenodm:

And, modify your user:

# usermod -L gnome user

(where ‘user’ is your userid…)


Voila!

It’s enough to run correctly Gnome3. Think to restart your session or the machine.

Now, let’s go a little further in the configuration, like setting the French language, or yours, and others useful tips.

Language

To manage your language — mine is FR — you need to modify the /etc/gdm/locale.conf file, as:

# $OpenBSD: locale.conf,v 1.4 2014/01/08 14:07:48 ajacoutot Exp $
#
# Mimics Linux's /etc/locale.conf.
# See locale(1) for a list of supported locales (`locale -a`).

# OpenBSD setlocale(3) does not handle LANG
#LANG="en_US.UTF-8"
LC_CTYPE="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"

If you do not make this change, and if you have a password with accented characters in your language, according to the keyboard settings during the OpenBSD installation, you will not be able to log in, because gdm uses English by default.


Think to restart gdm.

Power Management

To use the suspend and hibernate features, you need to active the apmd daemon:

# rcctl enable apmd
# rcctl set apmd flags -A
# rcctl start apmd

Printing

To print, install Cups:

# pkg_add cups cups-filters cups-libs foomatic-db gutenprint 

Start both services cupsd, and cups_browsedthis second is useful to detect printers on network using Bonjour broadcast messages, as Avahi.

# rcctl enable cupsd cups_browsed
# rcctl start cups cups_browsed

L’administration peut se faire au-travers des paramètres Imprimantes, voire de l’interface web de Cups, disponible depuis l’URL http://localhost:631, ou des outils cupsctl, lpadmin.

You can administrate by the Printing Parameters, the webui of Cups, available on http://localhost:631, or by tools as cupsctl, lpadmin.

LibreOffice

The gnome-documents manager does not support Office types documents. Install the unoconv package!

Tips

Keyboard

Display Desktop

⇒ Don’t try to hide all windows to show just the desktop, the option is not activated by default!

Open Parameters > Keyboard. Into the Navigate windows section, search “Minimize all windows”. Click on and set the desired key combination, like the Super + D keys.

Random Wallpaper

This feature does not exist by default!

I provide two scripts to implement this feature, on my Gitlab: WallpaperManager

Read the instructions to install and use it.

PF

I’ve not discuted about firewall rules, but here is an example:

⇒ Cups :

pass in on egress proto tcp from egress:network to egress port 631 flags S/SA modulate state

⇒ Avahi :

pass proto udp from any to 224.0.0.251 port mdns allow-opts
pass inet6 proto udp from any to ff02::fb port mdns allow-opts 

pass proto udp from any to 239.255.255.250 port ssdp allow-opts
pass inet6 proto udp from any to { ff02::c, ff05::c, ff08::c } port ssdp allow-opts 

Of course, it’s up to you!

Troubleshooting

GDM refuse to start!

Directly, read the daemon log file, or even that of the messages log:

# grep gdm /var/log/daemon

Gdm: Couldn’t connect to system bus:

Into both files, daemons, messages, you have the equivalent of this message:

Jul 23 09:38:14 og3 gdm[56941]: Gdm: Couldn't connect to system bus: Could not connect: No such file or directory

Probably, this is because the messagebus service is not activated and started.

Have you activated all the services as written at the beginning of this article‽

Documentations

  • the differents pkg-readme files:
    • /usr/local/share/doc/pkg-readmes/gnome
    • /usr/local/share/doc/pkg-readmes/gnupg
    • /usr/local/share/doc/pkg-readmes/samba
    • /usr/local/share/doc/pkg-readmes/sane-backends
    • and others…

Voila!