#1008564 Assumes /usr/games/polygen is in $PATH; not true for root

#1008564#5
Date:
2022-03-28 15:58:59 UTC
From:
To:
Because there is no .desktop file, and my test desktop is built without a terminal emulator, I tried running cappuccino as root:

    bash$ ssh root@bootstrap2020 'DISPLAY=:0 XAUTHORITY=$(echo /var/lib/xdm/authdir/authfiles/*)' cappuccino
    Warning: Permanently added '[localhost]:2022' (ED25519) to the list of known hosts.
    __main__.py:148: PyGIDeprecationWarning: GObject.timeout_add is deprecated; use GLib.timeout_add instead
    /bin/sh: 1: polygen: not found
    __main__.py:72: DeprecationWarning: Gtk.Alignment.set is deprecated
    /bin/sh: 1: polygen: not found
    __main__.py:84: PyGIDeprecationWarning: GObject.timeout_add is deprecated; use GLib.timeout_add instead
    __main__.py:85: PyGIDeprecationWarning: GObject.timeout_add is deprecated; use GLib.timeout_add instead
    /bin/sh: 1: polygen: not found
    Traceback (most recent call last):
      File "__main__.py", line 107, in update_log
    IndexError: pop from empty list
    /bin/sh: 1: polygen: not found

This is happening because /usr/games/polygen is not in the default $PATH unless you 1) log in as a non-root user; and 2) pass through PAM session.
In the above case, neither (1) nor (2) happens.
For (2) it does not happen because "ssh host command" bypasses the login shell.

These situations are unlikely to occur, but given the failure
behaviour is pretty weird, I think simply hard-coding the default path
to "/usr/games/polygen" instead of "polygen" would suffice.

The manpage didn't suggest any CLI option to easily work around this.

PS: note that cappuccino itself is NOT installed in /usr/games/.
Moving it there would, I guess, be an equally easy fix.

#1008564#10
Date:
2023-09-18 17:07:54 UTC
From:
To:
I am completely new to maintenance and this is my first attempt to submit a patch.

Please find attached the proposed changes, I hope these will suffice.

#1008564#15
Date:
2023-10-02 10:19:12 UTC
From:
To:
Thanks for the fix. As we had discussed in person, please attach the
.debdiff and I will ship a new package with this fix.

Thanks for your contribution to Debian.

#1008564#20
Date:
2023-10-02 10:26:17 UTC
From:
To:
O Mon, Oct 02, 2023 at 03:19:12AM -0700, Breno Leitao wrote:

Sure, here is the debdiff for the new version.

Thanks,
William