"has_option: command not found" error in .xsession_errors

Chris Green cl at isbd.net
Mon Nov 8 13:38:51 UTC 2021


I am seeing this error a few times in .xsession errors:-

    dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
    dbus-update-activation-environment: setting DISPLAY=:0
    dbus-update-activation-environment: setting XAUTHORITY=/home/chris/.Xauthority
    /etc/X11/Xsession.d/30x11-common_xresources: line 16: has_option: command not found
    /etc/X11/Xsession.d/75dbus_dbus-launch: line 9: has_option: command not found
    dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
    /etc/X11/Xsession.d/90x11-common_ssh-agent: line 9: has_option: command not found
    dbus-update-activation-environment: setting SHELL=/bin/bash
    dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
    dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-xubuntu:/etc/xdg
    dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session3
    dbus-update-activation-environment: setting GTK_IM_MODULE=xim
    ...
    ...
    ...


It's rather odd because if one greps for has_option in /etc/X11 one sees:-

    X11/Xsession.d/50x11-common_determine-startup:  if has_option allow-user-xsession; then
    X11/Xsession.d/50x11-common_determine-startup:  if has_option allow-user-xsession; then
    X11/Xsession.d/75dbus_dbus-launch:if has_option use-session-dbus; then
    X11/Xsession.d/30x11-common_xresources:if has_option allow-user-resources && [ -f "$USRRESOURCES" ]; then
    X11/Xsession.d/90x11-common_ssh-agent:if has_option use-ssh-agent; then
    X11/Xsession.d/20x11-common_process-args:        if has_option allow-failsafe; then
    X11/Xsession:has_option() {

I'm only getting the error from three out of the five scripts that call
has_option and it *is* defined in the calling script X11/Xsession. However
it may just be in the scripts where I'm not getting the error the call is
never being reached.

I've tried searching for the error but it's very difficult to search for a 
string with an underscore in it so I haven't got very far.

So, why am I seeing this error when the function appears to be defined?

-- 
Chris Green




More information about the ubuntu-users mailing list