+-----------------------------------------------------------------------
| Running xfce on OpenBSD
+-----------------------------------------------------------------------

The Xfce desktop is composed of 2 meta-packages:
    * xfce, for a base Xfce installation
    * xfce-extras, for a full Xfce installation.

Startup
=======
Xfce desktop environment is launched through the 'startxfce4' script.
Simply add '/usr/local/bin/startxfce4' to your .xinitrc .xsession
script if you use startx(1) or xenodm(1), respectively.

Logging out and shutting down the computer
==========================================
If your installation supports complete shutdown, clicking on the logout button
on panel will permit you to either logout, suspend, hibernate, reboot or halt
the computer.

If your user is part of the _shutdown group and thus can execute shutdown(8),
you should be able to shutdown/logout without further configuration.

Otherwise, halting and rebooting from xfce4-session require consolekit2 and
polkit: you'll need to run a systemwide D-BUS service (# rcctl enable
messagebus) and pass --with-ck-launch argument to startxfce4.

If you dont want to use messagebus/polkit, you can still configure doas to
allow your user to run shutdown/halt -p without having to enter a password, and
create a launcher executing 'doas shutdown -p' (or halt -p)

Screen compositor
=================
If you're using the modesetting X driver and experience window flickering when
the compositor is enabled, you should force the window manager to use the
XPresent method for vblank:

    $ xfwm4 --vblank=xpresent --replace &

This is documented upstream at https://git.xfce.org/xfce/xfwm4/tree/COMPOSITOR#n114

Power management
================
If you use Xfce on a laptop, you can install the xfce4-power-manager
package, which will provide battery levels/information, and will allow
to configure actions upon low battery level or AC plugging. For proper
function, it requires messagebus and upowerd running. If using consolekit2 and
polkit, it will also allow you to suspend the laptop from the logout dialog.

Screensaver management
======================
xflock4 can make use of xfce4-screensaver, xscreensaver or gnome-screensaver.
If installed, a 'Screensaver' icon will appear in settings manager/menu.
Otherwise, xflock4 defaults to call xlock(1).

Thunar file manager tips
========================
If you want to browse samba shares using GVfs, you'll need to install the
gvfs-smb package. You can also try the gigolo package, which is a GUI to
configure GVfs mounts.

Terminal, special characters and localized applications
=======================================================
If you use a particular non-ascii encoding and have problems seeing special
characters in terminal (like accentued characters in french), you should
properly configure the default encoding in terminal properties.

Similarly, if you want localized graphical applications, add this line
to your .xinitrc/.xsession before startxfce4:

    export LC_MESSAGES=fr_FR.UTF-8

where 'fr_FR' is your language tag.
See https://www.openbsd.org/faq/faq10.html#locales for more information
on that topic.

More generally, https://docs.xfce.org and https://docs.xfce.org/faq
are the best resources for user-level documentation.

Wayland
=======

Xfce 4.20 has initial wayland support, even if the xfwm4 window manager
doesn't support wayland yet. It is advised to use labwc or wayfire as
the compositor.

the 'startxfce4' script now has a --wayland option.

see https://wiki.xfce.org/releng/wayland_roadmap#testing for more details.
