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

Bug #1922414 reported by Laurent Bonnaud on 2021-04-03
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
Undecided
Unassigned
xorg (Ubuntu)
Undecided
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

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

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

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.

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
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.

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

Other bug subscribers