Skip to content

Printers are not uninstalled when a user logs out #93

Description

@garblixa

In a Debian installation, printers are not uninstalled when a user logs out.
The reason is that, apparently, the PAM environment only has the environment variable PATH=/bin:/usr/bin when logging out, and therefore lpadmin cannot be found.

/usr/lib/python3/dist-packages/linuxmusterLinuxclient7/printers.py:

def _uninstallPrinter(name):
logging.info(f"Uninstall Printer {name}")
uninstallCommand = ["timeout", "10", "lpadmin", "-x", name]

FIX:
def _uninstallPrinter(name):
logging.info(f"Uninstall Printer {name}")
uninstallCommand = ["timeout", "10", "/usr/sbin/lpadmin", "-x", name]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions