Xfce4 Session is a session manager for Xfce. Its task is to save the state of your desktop (opened applications and their location) and restore it during a next startup. You can create several different sessions and choose one of them on startup.
Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.
Download (HTTP): https://archive.xfce.org/src/xfce/xfce4-session/4.20/xfce4-session-4.20.4.tar.bz2
Download MD5 sum: 048a3f838449dd75d358779b528b0a63
Download size: 1.2 MB
Estimated disk space required: 20 MB
Estimated build time: 0.1 SBU
libwnck-43.3, libxfce4windowing-4.20.7, and libxfce4ui-4.20.2
desktop-file-utils-0.28, xfce4-screensaver or XScreenSaver-6.17, shared-mime-info-2.5.1 and polkit-gnome-0.105
Install Xfce4 Session by running the following commands:
./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-legacy-sm &&
make
This package does not come with a test suite.
Now, as the root user:
make install
--disable-legacy-sm: This
switch disables legacy session management which isn't necessary on
modern system.
There are several optional run time dependencies for Xfce4: dbus-1.16.2, GnuPG-2.5.24, hicolor-icon-theme-0.18, OpenSSH-10.6p1, and xinit-1.4.4
When building an Xfce4 package,
some configuration files are installed in /usr/share/applications, /usr/share/icons, and /usr/share/mime. In order to use those files in
your Xfce4 session, you need to
update various databases. Do that by running, as the root user (you need to have the recommended
dependencies installed):
update-desktop-database && update-mime-database /usr/share/mime
You can start Xfce4 from a TTY using xinit-1.4.4, or from a graphical display manager, such as lightdm-1.33.1.
To start Xfce4 using xinit-1.4.4, run the following commands:
cat > ~/.xinitrc << "EOF"
dbus-launch --exit-with-x11 startxfce4
EOF
startx
If xdg-desktop-portal-1.22.1 is
installed, its systemd user service will only start when the
systemd unit graphical-session.target is
active. startx does
not activate that target, so any application that queries the
portal (for example LibreOffice
or other GTK applications) waits for a D-Bus timeout of 25
seconds, sometimes more than once, before it appears. To avoid
this, create a user target that binds to graphical-session.target as the
root user:
cat > /etc/systemd/user/xfce-session.target << "EOF"
[Unit]
Description=Xfce session
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target
EOF
Then start Xfce with this
~/.xinitrc instead of the one shown
above:
cat > ~/.xinitrc << "EOF"
export XDG_CURRENT_DESKTOP=XFCE
dbus-update-activation-environment --systemd DISPLAY XAUTHORITY XDG_CURRENT_DESKTOP
systemctl --user start xfce-session.target
startxfce4
systemctl --user stop xfce-session.target
EOF
The environment variables are passed to the systemd user instance so that the portal and its backends can connect to the X server. Do not prefix startxfce4 with exec; the last line has to run when the session ends so that graphical-session.target and the services bound to it are stopped.
The X session starts on the first unused virtual terminal, normally vt7. You can switch to another vtn simultaneously pressing the keys Ctrl-Alt-Fn (n=1, 2, ...). To switch back to the X session, normally started at vt7, use Ctrl-Alt-F7. The vt where the command startx was executed will display many messages, including X starting messages, applications automatically started with the session, and eventually, some warning and error messages. You may prefer to redirect those messages to a log file, which not only will keep the initial vt uncluttered, but can also be used for debugging purposes. This can be done starting X with:
startx &> ~/.x-session-errors
When shutting down or rebooting, the shutdown messages appear on the vt where X was running. If you wish to see those messages, simultaneously press keys Alt-F7 (assuming that X was running on vt7).