[Bug 266532] x11/lightdm: Login sessions do not respect login.conf

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 22 Dec 2023 17:40:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266532

--- Comment #15 from Ivan Rozhuk <rozhuk.im@gmail.com> ---
(In reply to Guido Falsi from comment #13)

> Adding wrapper scripts like this make the default setup complex, make it diverge strongly from upstream code and practice.

Port already add its own Xsession script, it distributed in ports tree.
You can rename pre script to Xsession, merge post script with current Xsession
and this will be transparent migration for users.


> Also, who would be responsible for maintaining these wrapper scripts and fix them in case they need updating?

You can CC me on any one can do this, this is very simple small scripts that
have comments.


> ALso changing Xorg priority is not something the OS should enforce on users

Whatever, enjoy with freezes :)


> I really would not feel comfortable adding such opinionated custom scripts to the port.

Ok, leave it broken. :)


> I'm also not really able to give a reasonable security evaluation of these scripts.

install, env, su - is so hard to understand. )


Anyway, feel free to ignore this work, I just finish with this in my
environment and share results of few days research.


PS: Also these vars nice to have in init chain:
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
if [ -z "${XDG_DATA_HOME}" ]; then
        export XDG_DATA_HOME="${HOME}/.local/share"
        mkdir -p "${XDG_DATA_HOME}"
fi
if [ -z "${XDG_CONFIG_HOME}" ]; then
        export XDG_CONFIG_HOME="${HOME}/.config"
        mkdir -p "${XDG_CONFIG_HOME}"
fi
if [ -z "${XDG_STATE_HOME}" ]; then
        export XDG_STATE_HOME="${HOME}/.local/state"
        mkdir -p "${XDG_STATE_HOME}"
fi
if [ -z "${XDG_CACHE_HOME}" ]; then
        export XDG_CACHE_HOME="${HOME}/.cache"
        mkdir -p "${XDG_CACHE_HOME}"
fi
if [ -z "${XDG_RUNTIME_DIR}" ] && [ -d '/var/run/user' ]; then
        export XDG_RUNTIME_DIR="/var/run/user/`id -ur ${USER} | tr -d '\n'`"
        install -d -o "${USER}" -g "${USER}" -m 0700 "${XDG_RUNTIME_DIR}"
fi
# XAuth staff.
if [ -z "${XAUTHORITY}" ]; then
        if [ -n "${XDG_RUNTIME_DIR}" ]; then
                export XAUTHORITY="${XDG_RUNTIME_DIR}/.Xauthority"
        else
                export XAUTHORITY="${HOME}/.Xauthority"
        fi
fi

-- 
You are receiving this mail because:
You are the assignee for the bug.