Inconsistency between xinitrc and startxfce4 scripts
Robby Workman
rw at rlworkman.net
Mon Jun 25 16:34:20 CEST 2012
On Mon, 25 Jun 2012 16:01:45 +0000
appzer0 <appzer0 at free.fr> wrote:
> Hello,
>
> I run into a problem while logging in xfce. I usually use xdm: this
> is the default DM on my homemade distro for French native speakers,
> 0linux.
>
> To log in xfce, I use the mechanism consisting in executing the
> xinitrc script, by creating the symlink /etc/X11/xinit/xinitrc,
> pointing to the xfce's xinitrc located at /etc/xfce/xdg/xfce4/xinitrc.
>
> The problem is that the login behaviour is different between this
> login method and the "startxfce4 --with-ck-launch" command invoked
> from the console. Although xdm is patched to support consolekit, only
> startxfce4 script is able to to automount devices and consolekit
> stuff, the xinitrc misses something somehow.
>
> The other problem is that the exported variables in both scripts seem
> not to be exactly the same, so when I startxfce4 I lose some useful
> variables, like the XDG* ones, leading to little annoyments like
> empty "Open with" in Xarchiver for example.
>
> Moreover, I noticed that startxfce4 supports xinitrc (of course) by
> executing it at the end of the script, but not the contrary : xinitrc
> will never check for consolekit if we did not launch startxfce4
> --with-ck-launch! As xdm directly executes xinitrc, we miss a step.
>
> Line 89 of Xfce's xinitrc: if test "x$XFCE4_SESSION_WITH_CK" = "x1";
> then
>
> So basically : the xdm -> xinitrc -> xfce step is missing consolekit
> support
Here's a suggestion:
[rworkman at liberty ~]$ cat /etc/X11/xinit/xinitrc.xfce
#!/bin/sh
# Xfce's startxfce4 script includes support for launching itself inside
# a new ConsoleKit session, so let's use it instead of hacking our own
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec /usr/bin/startxfce4 --with-ck-launch
else
exec /usr/bin/startxfce4
fi
-RW
More information about the Xfce
mailing list