Skip to content

lightdm-settings fails to open due to pkexec rejecting the SHELL variable #69

@CirKanus

Description

@CirKanus

Description:

Issue Summary
When attempting to open lightdm-settings from the System Settings panel in Linux Mint, the application does not launch. Running it manually from the terminal with pkexec results in the following error message in the system logs:

pkexec[XXXXX]: The value for the SHELL variable was not found in the /etc/shells file [USER=root] [TTY=unknown] [CWD=/home/username] [COMMAND=/usr/bin/lightdm-settings]

Steps to Reproduce:

  1. Use a shell that is not listed in /etc/shells (e.g., fish, zsh installed in a non-standard location, or a custom shell).
  2. Open "Login Window" from the System Settings menu in Linux Mint.
  3. The application does not launch.
  4. Running pkexec /usr/bin/lightdm-settings in the terminal produces the error message.

Expected Behavior:

  • lightdm-settings should open normally, even if the user’s SHELL is not listed in /etc/shells.
  • If pkexec rejects the SHELL variable, the application should handle the error gracefully and provide guidance to the user.

Workarounds:

  • Manually add the user’s shell to /etc/shells using:

echo /path/to/shell | sudo tee -a /etc/shells

  • Launch lightdm-settings with a valid shell:

pkexec env SHELL=/bin/bash /usr/bin/lightdm-settings

Suggested Fixes:

  1. Modify lightdm-settings to explicitly set SHELL=/bin/bash before execution.
  2. Add a pre-check in lightdm-settings to verify if SHELL is valid, and display a warning with a suggested fix if it’s not.
  3. Improve Linux Mint documentation to mention this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions