startxfce4 and ck-launch

Silvio Knizek killermoehre at gmx.net
Fri Dec 1 12:54:02 CET 2017


Am Donnerstag, den 30.11.2017, 19:24 +0100 schrieb Paul Menzel:
> Dear Silvio,
> 
> 
> Am 30.11.2017 um 13:34 schrieb Silvio Knizek:
> > Am Donnerstag, den 30.11.2017, 13:27 +0100 schrieb Paul Menzel:
> > > In chapter 35 *Xfce Desktop* from the book *Linux from Scratch*
> > > [1],
> > > for
> > > xfce4-session-4.12.1 the following line is suggested for
> > > `~/.xinitrc`
> > > 
> > > ```
> > > ck-launch-session dbus-launch --exit-with-session startxfce4
> > > ```
> > > 
> > > Now looking at the help text of `startxfce4`, it has a similar
> > > switch.
> > > 
> > > ```
> > > $ startxfce4 --help
> > > […]
> > >     --with-ck-launch         Start xfce4-session inside a
> > >                              ConsoleKit session
> > > 
> > > ```
> > > 
> > > Adding that switch, sets the the environment variable
> > > `XFCE4_SESSION_WITH_CK` to 1.
> > > 
> > > ```
> > > $ more /usr/bin/startxfce4
> > > […]
> > >         XFCE4_SESSION_WITH_CK="1"
> > >         export XFCE4_SESSION_WITH_CK
> > > […]
> > > ```
> > > 
> > > Is there a difference between the two? Is one recommended?
> > > 
> > > Does the same apply for desktop files?
> > > 
> > > The upstream `/usr/share/xsessions.available/xfce.desktop` only
> > > contains
> > > the execution command below.
> > > 
> > > ```
> > > Exec=startxfce4
> > > ```
> > > [1] http://www.linuxfromscratch.org/blfs/view/cvs/xfce/xfce4-sess
> > > ion.html
> > if you want to run Xfce4 from .xinitrc, only use »startxfce4 --
> > with-ck-
> > launch« (only on non-systemd systems). »startxfce4« itself starts
> > dbus
> > and (if advised and not already running) consolkit in a proper way.
> > »ck-launch-session dbus-launch …« tend to break session stuff and
> > is
> > wrong.
> > 
> > For the xsession file in this case the display manager (GDM,
> > LightDM,
> > etc.) will start the proper consolekit environment (or session
> > environment in general), so no special treatment is required.
> > 
> > As a general suggestion: use a modern display manager (a.k.a. not
> > slim)
> > and everything works as expected.
> 
> Thank you very much for the quick reply. In the beginning you
> comment 
> about non-systemd systems. So from a certain systemd version onwards 
> ConsoleKit is not needed anymore, right, and only `startxfce4` should
> be 
> used on systems with recent systemd version?

As soon as you have logind with its session and seat concept you don't
need consolekit anymore, because either your tty is already in a proper
session or it's done by the login manager.


More information about the Xfce mailing list