Package: obsession
Version: 20140608-2
Case mismatch prevents xdg-autostart from handling autostart
applications correctly
xdg-autostart is a new utility, which is provided by the package
obsession. It launches autostart applications from the directories
/etc/xdg/autostart/ and ~/.config/autostart/. These autostart files can
then be managed with lxsession-edit or a similar application.
It even worked, when I tried it with Debian testing/Stretch alpha-6. But
when I reinstalled the system with Debian testing/Stretch alpha-7, it
stopped working. Neither OnlyShowIn=Openbox; nor NotShowIn=Openbox;
worked anymore.
I noticed, that there is a discrepancy in the descriptions: The man page
in Debian says:
"By default, xdg-autostart uses Openbox as desktop name."
The upstream description says:
"Make xdg-autostart use the OPENBOX environment by default, so you can
use OnlyShowIn=OPENBOX in an autostart .desktop and it will work as
expected."
-- http://openbox.org/wiki/Openbox:Changelog#3.4.11
To check, which name is used during login and later, I created two small
autostart files in ~/.config/autostart/ with the contents:
hb@debian:~/.config/autostart$ cat Openbox.desktop
[Desktop Entry]
Type=Application
Name=Openbox
NoDisplay=true
Exec=xmessage Openbox
OnlyShowIn=Openbox;
hb@debian:~/.config/autostart$ cat OPENBOX.desktop
[Desktop Entry]
Type=Application
Name=OPENBOX
NoDisplay=true
Exec=xmessage OPENBOX
OnlyShowIn=OPENBOX;
During startup, the file OPENBOX.desktop is run. Later, when I run the
script xdg-autostart manually without any command-line options, the file
Openbox.desktop will be run.
We can see, that Openbox was launched with the session name "OPENBOX" by
calling "ps aux":
hb@debian:~$ ps aux | grep -i openbox
hb 4457 0.1 3.6 76360 18396 ? Ssl 14:22 0:00
/usr/bin/openbox --startup /usr/lib/i386-linux-gnu/openbox-autostart OPENBOX
This command comes from the script /usr/bin/openbox-session:
# Run Openbox, and have it run the autostart stuff
exec /usr/bin/openbox --startup
"/usr/lib/i386-linux-gnu/openbox-autostart OPENBOX" "$@"
The environment variable DESKTOP_SESSION will be set to "Openbox" later
(but I don't know, where):
hb@debian:~$ env | grep -i openbox
DESKTOP_SESSION=Openbox
The command xdg-autostart uses the session name "Openbox" internally, as
described in the man page. This name can be found with "strings":
hb@debian:~$ strings /usr/bin/xdg-autostart | grep -i openbox
Openbox
So, to summarize:
During login, the command xdg-autostart uses the session name OPENBOX,
which is passed as a command-line option.
xdg-autostart itself uses Openbox internally, and this is also used in
the environment variable DESKTOP_SESSION.
This prevents xdg-autostart from cooperating with lxsession-edit, which
honors the environment variable.
Greetings,
Hartmut Buhrmester