Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables in /etc/issue do not get evaluated correctly #169

Open
fstraetz opened this issue Nov 30, 2024 · 5 comments · May be fixed by #175
Open

Environment variables in /etc/issue do not get evaluated correctly #169

fstraetz opened this issue Nov 30, 2024 · 5 comments · May be fixed by #175

Comments

@fstraetz
Copy link

Describe the bug
In case one uses tuigreet with the /etc/issue file, tuigreet will not evaluate the contents of the file in the correct way (anymore?). To be more specific, environment variables like PRETTY_NAME (as defined in /etc/os-release) used in /etc/issue are not resolved at all.

To Reproduce
Steps to reproduce the behavior:

  1. Modify /etc/issue in a way that it contains an environment variable, e. g., \S{PRETTY_NAME} \r (\l).
  2. Restart the system or otherwise bring up tuigreet with the reloaded changes.
  3. tuigreet should now show the {PRETTY_NAME} as-is, i. e., unresolved.

Expected behavior
The expectation would be that tuigreet tries to resolve all environment variables found in the /etc/issue file.

System information:

  • Distribution: Manjaro Linux (stable, updated 2024-11-30)
  • greetd version: 0.10.3-1
  • tuigreet version: 0.9.1-1
  • Installation method (from source, package, binary, etc.): package (from distribution)
  • tuigreet command line: tuigreet --user-menu --user-menu-min-uid 1000 --remember --remember-session --time --issue --asterisks

Additional context
In all honesty, I am not sure whether this ever worked or whether the /etc/issue file got changed by some distribution update to contain the environment variable. But there were some recent relevant commits / changes to the /etc/issue handling, so I could imagine that something regarding the environment variable handling got changed. In case this actually never worked, it might be a nice addition.

Debug log
The recommended command outputs GREETD_SOCK must be defined and exits, no matter whether run as user or as root.

@BluishHumility
Copy link

BluishHumility commented Dec 25, 2024

I noticed this as well. Last month Arch Linux changed /etc/issue in this commit: https://gitlab.archlinux.org/archlinux/packaging/packages/filesystem/-/commit/2b36e79ea95db61144f54d187f32e949edbd28a6

Before this change, "Arch Linux" appears normally above the login prompt when using the -i flag, along with the kernel version and the TTY in use:

tuigreet_arch

After the file was changed to a variable, "Linux{PRETTY_NAME}" is printed instead.

tuigreet_prettyname

@harogaston
Copy link

Same issue here

@dvzrv
Copy link

dvzrv commented Jan 26, 2025

Hi! I merged the relevant changes for Arch Linux.

The relevant documentation for this (agetty) can be found here: https://man.archlinux.org/man/agetty.8#ISSUE_FILES

I guess on the one hand one wants a os-release parser and a parser for the custom "environment variable" format in /etc/issue so that this can be displayed properly.

@harogaston
Copy link

Hi! I merged the relevant changes for Arch Linux.

The relevant documentation for this (agetty) can be found here: https://man.archlinux.org/man/agetty.8#ISSUE_FILES

I guess on the one hand one wants a os-release parser and a parser for the custom "environment variable" format in /etc/issue so that this can be displayed properly.

Hi @dvzrv , sorry, what did you merge? and where exactly?

@dvzrv
Copy link

dvzrv commented Jan 27, 2025

sorry, what did you merge? and where exactly?

see #169 (comment)

I noticed this as well. Last month Arch Linux changed /etc/issue in this commit: https://gitlab.archlinux.org/archlinux/packaging/packages/filesystem/-/commit/2b36e79ea95db61144f54d187f32e949edbd28a6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants