startxfce4 and ck-launch

Silvio Knizek killermoehre at gmx.net
Thu Nov 30 13:34:21 CET 2017


Am Donnerstag, den 30.11.2017, 13:27 +0100 schrieb Paul Menzel:
> Dear Xfce folks,
> 
> 
> 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
> ```
> 
> 
> Kind regards,
> 
> Paul
> 
> 
> [1] http://www.linuxfromscratch.org/blfs/view/cvs/xfce/xfce4-session.
> html

Hi Paul,

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.

BR


More information about the Xfce mailing list