0

The context is that I'm attempting to get unclutter-xfixes to start automatically. As part of its setup, unclutter installs a file /etc/X11/Xsession.d/90unclutter with the following contents:

# /etc/X11/Xsession.d/90unclutter
# This file is sourced by Xsession(5), not executed.

if [ -e /etc/default/unclutter ]
then
    . /etc/default/unclutter
fi

if [ -x /usr/bin/unclutter ] && [ "${START_UNCLUTTER}" = "true" ]
then
    /usr/bin/unclutter ${EXTRA_OPTS} &
fi

The file at /etc/default/unclutter sets the vars used in the second statement above, which in my case sets START_UNCLUTTER="true", so I would expect unclutter to be started with X, but it is not.

I've tried two things to confirm that this file is being sourced:

  1. Look at the Xsession logs. Per man 5 Xsession, "$HOME/.xsession-errors ... is where standard output and standard error for Xsession script and all X client processes are directed by default [and] $TMPDIR/filename ... is where the X session error file is placed if $HOME/.xsession-errors cannot be opened." However, sudo find -type f -name "*xsession*" yields nothing in either /tmp or the user's home directory.
  2. Do something silly like touch a new file in the user's home dir at the end of 90unclutter. This has no apparent effect.

I see in the description of man 5 Xsession that "Some display managers only invoke Xsession when specifically directed to so by the user." /etc/X11/default-display-manager indicates that I'm using gdm3, but I'm not having any luck determining whether gdm3 is in fact invoking Xsession.

In summary, should I expect files named within run-parts constraints under /etc/X11/Xsession.d/ to be sourced by gdm3 on a default 22.04 installation? If so, why am I not seeing the expected effect of said sourcing, and how can I dig in to confirm what is and isn't happening? If not, what other avenues are open to me to start a process in the GUI context on startup?


EDIT: Per @matigo's response, the trouble seems to be that Xsession does run under Wayland, so unclutter-startup is likewise broken under Wayland. I've filed a bug.

thisisrandy
  • 113
  • 1
  • 5

1 Answers1

2

Ubuntu 22.04 will run Wayland by default rather than X. You can confirm which display server your system is using with this Terminal command:

echo $XDG_SESSION_TYPE

If you are running Wayland, the response will be wayland. Otherwise, it will be x11.

matigo
  • 20,403
  • 7
  • 43
  • 70