ssh-agent fails to start (has_option: command not found)

Bug #1922414 reported by Laurent Bonnaud
52
This bug affects 9 people
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Fix Released
Low
Unassigned
xorg (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Hi,

I have been using ssh-agent for years and since I upgraded my system to Ubuntu 21.04/groovy, ssh-agent fails to start.

Here is the error message:

# journalctl | grep ssh-agent
[...]
Apr 02 20:16:32 vougeot /usr/libexec/gdm-x-session[3752]: /etc/X11/Xsession.d/90x11-common_ssh-agent: line 9: has_option: command not found

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: x11-common 1:7.7+22ubuntu1
Uname: Linux 5.11.11-051111-lowlatency x86_64
ApportVersion: 2.20.11-0ubuntu61
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: unknown
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
CurrentDesktop: KDE
Date: Sat Apr 3 09:02:46 2021
Dependencies: lsb-base 11.1.0ubuntu2
DistUpgraded: Fresh install
DistroCodename: hirsute
DistroVariant: ubuntu
DkmsStatus:
 tuxedo-keyboard, 3.0.4, 5.11.0-13-generic, x86_64: installed
 tuxedo-keyboard, 3.0.4, 5.11.0-13-lowlatency, x86_64: installed
 tuxedo-keyboard, 3.0.4, 5.11.11-051111-lowlatency, x86_64: installed
ExtraDebuggingInterest: No
GraphicsCard:
 Intel Corporation TigerLake GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) (prog-if 00 [VGA controller])
   Subsystem: CLEVO/KAPOK Computer Iris Xe Graphics [1558:51a1]
MachineType: TUXEDO TUXEDO InfinityBook S 15 Gen6
PackageArchitecture: all
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.11.11-051111-lowlatency root=/dev/mapper/MonVolume2-UbuntuRacine ro vsyscall=none security=apparmor quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/07/2020
dmi.bios.release: 7.3
dmi.bios.vendor: INSYDE Corp.
dmi.bios.version: 1.07.03RTR
dmi.board.name: NS50MU
dmi.board.vendor: TUXEDO
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: Notebook
dmi.chassis.version: N/A
dmi.ec.firmware.release: 7.2
dmi.modalias: dmi:bvnINSYDECorp.:bvr1.07.03RTR:bd09/07/2020:br7.3:efr7.2:svnTUXEDO:pnTUXEDOInfinityBookS15Gen6:pvrNotApplicable:rvnTUXEDO:rnNS50MU:rvrNotApplicable:cvnNotebook:ct10:cvrN/A:
dmi.product.family: Not Applicable
dmi.product.name: TUXEDO InfinityBook S 15 Gen6
dmi.product.sku: Not Applicable
dmi.product.version: Not Applicable
dmi.sys.vendor: TUXEDO
version.compiz: compiz 1:0.9.14.1+20.10.20200813-0ubuntu4
version.libdrm2: libdrm2 2.4.104-1build1
version.libgl1-mesa-dri: libgl1-mesa-dri 21.0.1-1
version.libgl1-mesa-glx: libgl1-mesa-glx 21.0.1-1
version.xserver-xorg-core: xserver-xorg-core 2:1.20.10-3ubuntu5
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.10.6-2build1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-2
version.xserver-xorg-video-intel: xserver-xorg-video-intel N/A
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.17-1

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

The /etc/X11/Xsession.d/90x11-common_ssh-agent file is the same in Ubuntu groovy and hirsute. Therefore, the problem is elsewhere.

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

The has_option shell function is not defined in the same file:

 - in Ubuntu groovy it is defined in
/etc/X11/Xsession.d/20x11-common_process-args

 - in Ubuntu hirsute it is defined in
/etc/X11/Xsession

Revision history for this message
Achim Settelmeier (settel) wrote :

Looks like /etc/X11/Xsession is not executed, but the files in /etc/X11/Xsession.d/ are sourced somehow. My best guess is that there's some other mechanism emulating Xsession's behaviour but without defining has_option.

Maybe this is a pending bug introduced in an earlier version of Ubuntu that has come to light just now, after has_option has been moved as #3 points out.

BTW: I'm using lightdm with the Arctica Greeter.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdm3 (Ubuntu):
status: New → Confirmed
Changed in xorg (Ubuntu):
status: New → Confirmed
Revision history for this message
Achim Settelmeier (settel) wrote :

As a workaround, I created the file 01x11-has_option (find it attached) and placed it in /etc/X11/Xsession.d/. It defines has_option unless it is already defined somewhere else. ssh-agent now runs in the background on startup again.

Revision history for this message
Ricardo Garicano Arenas (rgaricano) wrote :

Same problem here,
after upgrade ubuntu studio 20.04 to 21.04 & change default plasma desktop to xfce:

/etc/X11/Xsession.d/30x11-common_xresources: línea 16: has_option: orden no encontrada
/etc/X11/Xsession.d/75dbus_dbus-launch: línea 9: has_option: orden no encontrada

Achim solution (https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1922414/comments/7 ) solve this errors.

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in xorg (Ubuntu):
importance: Undecided → Low
status: Confirmed → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in gdm3 (Ubuntu):
importance: Undecided → Low
status: Confirmed → Fix Released
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

Great, thank you for the fix!

Revision history for this message
Ryan Anderson (ryan-michonline) wrote :

This is still broken on impish when running i3 under X11.

Oct 22 15:23:39 operations /usr/libexec/gdm-x-session[5615]: /etc/X11/Xsession.d/30x11-common_xresources: line 16: has_option: command not found
Oct 22 15:23:39 operations /usr/libexec/gdm-x-session[5646]: /etc/X11/Xsession.d/75dbus_dbus-launch: line 9: has_option: command not found
Oct 22 15:23:39 operations /usr/libexec/gdm-x-session[5658]: /etc/X11/Xsession.d/90x11-common_ssh-agent: line 9: has_option: command not found

tags: added: impish jammy
Changed in xorg (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1922414

tags: added: iso-testing
tags: removed: hirsute
Revision history for this message
Tuxo (tuxoholic) wrote :

running fluxbox still can trigger this in 22.04

Affected scripts in my case:

/etc/X11/Xsession.d/30x11-common_xresources
/etc/X11/Xsession.d/90x11-common_ssh-agent

Revision history for this message
Mark Eichin (eichin-gmail) wrote :

still seeing
Apr 9 15:30:54 drafting-table /usr/libexec/gdm-x-session[355145]: /etc/X11/Xsession.d/30x11-common_xresources: line 16: has_option: command not found
in an install which is "jammy daily iso from a week or two back with daily dist upgrades", under i3;

$ dpkg -l gdm3 x11-common i3-wm
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-===============-============-======================================
ii gdm3 42.0-1ubuntu2 amd64 GNOME Display Manager
ii i3-wm 4.20.1-1 amd64 improved dynamic tiling window manager
ii x11-common 1:7.7+23ubuntu2 all X Window System (X.Org) infrastructure

Revision history for this message
Norbert (nrbrtx) wrote :

Still happens on UM Jammy.

Revision history for this message
Norbert (nrbrtx) wrote :

Still happens on UM Jammy.

How Long?????

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I also see it on Ubuntu MATE Jammy.
Will the fix come from Xorg,
or should we add LightDM to the affected projects list?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.