Coder Social home page Coder Social logo

tuigreet's Introduction

tuigreet

Graphical console greeter for greetd.

Screenshot of tuigreet

Usage: tuigreet [OPTIONS]

Options:
    -h, --help          show this usage information
    -v, --version       print version information
    -d, --debug [FILE]  enable debug logging to the provided file, or to
                        /tmp/tuigreet.log
    -c, --cmd COMMAND   command to run
    -s, --sessions DIRS colon-separated list of Wayland session paths
        --session-wrapper 'CMD [ARGS]...'
                        wrapper command to initialize the non-X11 session
    -x, --xsessions DIRS
                        colon-separated list of X11 session paths
        --xsession-wrapper 'CMD [ARGS]...'
                        wrapper command to initialize X server and launch X11
                        sessions (default: startx /usr/bin/env)
        --no-xsession-wrapper
                        do not wrap commands for X11 sessions
    -w, --width WIDTH   width of the main prompt (default: 80)
    -i, --issue         show the host's issue file
    -g, --greeting GREETING
                        show custom text above login prompt
    -t, --time          display the current date and time
        --time-format FORMAT
                        custom strftime format for displaying date and time
    -r, --remember      remember last logged-in username
        --remember-session
                        remember last selected session
        --remember-user-session
                        remember last selected session for each user
        --user-menu     allow graphical selection of users from a menu
        --user-menu-min-uid UID
                        minimum UID to display in the user selection menu
        --user-menu-max-uid UID
                        maximum UID to display in the user selection menu
        --theme SPEC
                        Add visual feedback when typing secrets, as one asterisk character for every
                        keystroke. By default, no feedback is given at all.
        --asterisks     display asterisks when a secret is typed
        --asterisks-char CHARS
                        characters to be used to redact secrets (default: *)
        --window-padding PADDING
                        padding inside the terminal area (default: 0)
        --container-padding PADDING
                        padding inside the main prompt container (default: 1)
        --prompt-padding PADDING
                        padding between prompt rows (default: 1)
        --power-shutdown 'CMD [ARGS]...'
                        command to run to shut down the system
        --power-reboot 'CMD [ARGS]...'
                        command to run to reboot the system
        --power-no-setsid
                        do not prefix power commands with setsid
        --kb-[command|sessions|power] [1-12]
                        change the default F-key keybindings to access the
                        command, sessions and power menus.

Usage

The default configuration tends to be as minimal as possible, visually speaking, only showing the authentication prompts and some minor information in the status bar. You may print your system's /etc/issue at the top of the prompt with --issue and the current date and time with --time (and possibly customize it with --time-format). You may include a custom one-line greeting message instead of /etc/issue with --greeting.

The initial prompt container will be 80 column wide. You may change this with --width in case you need more space (for example, to account for large PAM challenge messages). Please refer to usage information (--help) for more customization options. Various padding settings are available through the *-padding options.

You can instruct tuigreet to remember the last username that successfully opened a session with the --remember option (that way, the username field will be pre-filled). Similarly, the command and session configuration can be retained between runs with the --remember-session option (when using this, the --cmd value is overridden by manual selections). You can also remember the selected session per user with the --remember-user-session flag. In this case, the selected session will only be saved on successful authentication. Check the cache instructions if /var/cache/tuigreet doesn't exist after installing tuigreet.

You may change the command that will be executed after opening a session by hitting F2 and amending the command. Alternatively, you can list the system-declared sessions (or custom ones) by hitting F3. Power options are available through F12.

Install

From source

Building from source requires an installation of Rust's stable toolchain, including cargo.

$ git clone https://github.com/apognu/tuigreet && cd tuigreet
$ cargo build --release
# mv target/release/tuigreet /usr/local/bin/tuigreet

Cache directory must be created for --remember* features to work. The directory must be owned by the user running the greeter.

# mkdir /var/cache/tuigreet
# chown greeter:greeter /var/cache/tuigreet
# chmod 0755 /var/cache/tuigreet

From Arch Linux

On ArchLinux, tuigreet is available from the extra repo and is installable through pacman:

$ pacman -S greetd-tuigreet

Two more distributions are available from the AUR: greetd-tuigreet-bin is the precompiled release for the latest tagged release of tuigreet and greetd-tuigreet-git is a rolling release always following the master branch of this repository. Those can be installed via your preferred AUR helper.

From Gentoo

On Gentoo, tuigreet is available as a package gui-apps/tuigreet:

$ emerge --ask --verbose gui-apps/tuigreet

From NixOS

On NixOS greetd and tuigreet both available via <nixpkgs> main repository. Please refer to the snippet below for the minimal tuigreet configuration:

{ pkgs, ... }:
{
  services.greetd = {
    enable = true;
    settings = {
      default_session = {
        command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
        user = "greeter";
      };
    };
  };
}

More details

Pre-built binaries

Pre-built binaries of tuigreet for several architectures can be found in the releases section of this repository. The tip prerelease is continuously built and kept in sync with the master branch.

Running the tests

Tests from the default features should run without any special consideration by running cargo test.

If you intend to run the whole test suite, you will need to perform some setup. One of our features uses NSS to list and filter existing users on the system, and in order not to rely on actual users being created on the host, we use libnss_wrapper to mock responses from NSS. Without this, the tests would use the real user list from your system and probably fail because it cannot find the one it looks for.

After installing libnss_wrapper on your system (or compiling it to get the .so), you can run those specific tests as such:

$ export NSS_WRAPPER_PASSWD=contrib/fixtures/passwd
$ export NSS_WRAPPER_GROUP=contrib/fixtures/group
$ LD_PRELOAD=/path/to/libnss_wrapper.so cargo test --features nsswrapper nsswrapper_ # To run those tests specifically
$ LD_PRELOAD=/path/to/libnss_wrapper.so cargo test --all-features # To run the whole test suite

Configuration

Edit /etc/greetd/config.toml and set the command setting to use tuigreet:

[terminal]
vt = 1

[default_session]
command = "tuigreet --cmd sway"
user = "greeter"

Please refer to greetd's wiki for more information on setting up greetd.

Sessions

The available sessions are fetched from desktop files in /usr/share/xsessions and /usr/share/wayland-sessions. If you want to provide custom directories, you can set the --sessions arguments with a colon-separated list of directories for tuigreet to fetch session definitions some other place.

Desktop environments

greetd only accepts environment-less commands to be used to start a session. Therefore, if your desktop environment requires either arguments or environment variables, you will need to create a wrapper script and refer to it in an appropriate desktop file.

For example, to run X11 Gnome, you may need to start it through startx and configure your ~/.xinitrc (or an external xinitrc with a wrapper script):

exec gnome-session

To run Wayland Gnome, you would need to create a wrapper script akin to the following:

XDG_SESSION_TYPE=wayland dbus-run-session gnome-session

Then refer to your wrapper script in a custom desktop file (in a directory declared with the -s/--sessions option):

Name=Wayland Gnome
Exec=/path/to/my/wrapper.sh

Common wrappers

Two options allows you to automatically wrap run commands around sessions started from desktop files, depending on whether they come /usr/share/wayland-sessions or /usr/share/xsessions: --sessions-wrapper and --xsessions-wrapper. With this, you can prepend another command on front of the sessions you run to set up the required environment to run these kinds of sessions.

By default, unless you change it, all X11 sessions (those picked up from /usr/share/xsessions) are prepended with startx /usr/bin/env, so the X11 server is started properly.

Power management

Two power actions are possible from tuigreet, shutting down (through shutdown -h now) and rebooting (with shutdown -r now) the machine. This requires that those commands be executable by regular users, which is not the case on some distros.

To alleviate this, there are two options that can be used to customize the commands that are run: --power-shutdown and --power-reboot. The provided commands must be non-interactive, meaning they will not be able to print anything or prompt for anything. If you need to use sudo or doas, they will need to be configured to run passwordless for those specific commands.

An example for /etc/greetd/config.toml:

[default_session]
command = "tuigreet --power-shutdown 'sudo systemctl poweroff'"

Note that, by default, all commands are prefixed with setsid to completely detach the command from our TTY. If you would prefer to run the commands as is, or if setsid does not exist on your system, you can use --power-no-setsid.

User menu

Optionally, a user can be selected from a menu instead of typing out their name, with the --user-menu option, this will present all users returned by NSS at the time tuigreet was run, with a UID within the acceptable range. The values for the minimum and maximum UIDs are selected as follows, for each value:

  • A user-provided value, through --user-menu-min-uid or --user-menu-max-uid;
  • Or, the available values for UID_MIN or UID_MAX from /etc/login.defs;
  • Or, hardcoded 1000 for minimum UID and 60000 for maximum UID.

Theming

A theme specification can be given through the --theme argument to control some of the colors used to draw the UI. This specification string must have the following format: component1=color;component2=color[;...] where the component is one of the value listed in the table below, and the color is a valid ANSI color name as listed here.

Please note that we can only render colors as supported by the running terminal. In the case of the Linux virtual console, those colors might not look as good as one may think. Your mileage may vary.

Component name Description
text Base text color other than those specified below
time Color of the date and time. If unspecified, falls back to text
container Background color for the centered containers used throughout the app
border Color of the borders of those containers
title Color of the containers' titles. If unspecified, falls back to border
greet Color of the issue of greeting message. If unspecified, falls back to text
prompt Color of the prompt ("Username:", etc.)
input Color of user input feedback
action Color of the actions displayed at the bottom of the screen
button Color of the keybindings for those actions. If unspecified, falls back to action

Below is a screenshot of the greeter with the following theme applied: border=magenta;text=cyan;prompt=green;time=red;action=blue;button=yellow;container=black;input=red:

Screenshot of tuigreet

tuigreet's People

Contributors

alebastr avatar apognu avatar braun-steven avatar brodi1 avatar djlogozzo avatar dthelegend avatar epsilon-0 avatar geekylthyosaur avatar kianmeng avatar marcriera avatar michasze avatar narrat avatar palladinium avatar robertmueller2 avatar sunderland93 avatar tony-aln avatar xukai92 avatar ymatsiuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tuigreet's Issues

Lint PKGBUILDs

Some people raised issues with my current PKGBUILDs on the AUR page.

Those issues are reported by namcap, which I'll use in the future.

Menu for selecting from systems xsessions / wayland-sessions.

Available sessions are usually listed in /usr/share/xsessions and /usr/share/wayland-sessions with labels and commands used to start them.

While still keeping the manual command override, we could offer a select menu to pick from one of the available window manager / desktop environment.

Selected command in status line should be replace with a session's label when matching exactly.

Possible typo in greter

Graphical console greter for greetd

I believe greter be spelled as greeter. This text is from the about section on right sidebar.

binaries vary across builds

While working on reproducible builds for openSUSE, I found that our tuigreet-0.7.1 package varied across builds.

The variations stop when readdir order is not random.

--- old /usr/bin/tuigreet (objdump)
+++ new /usr/bin/tuigreet (objdump)
@@ -255,14 +255,14 @@
  21efa0 40000000 00000000 60000000 00000000  @.......`.......
  21efb0 01000000 00000000 02000000 00000000  ................
  21efc0 05000000 00000000 04000000 00000000  ................
- 21efd0 706c2d50 4c2f7475 69677265 65742e66  pl-PL/tuigreet.f
+ 21efd0 70742d42 522f7475 69677265 65742e66  pt-BR/tuigreet.f
  21efe0 746c0000 00000000 00000000 00000000  tl..............
  21eff0 63612d45 532f7475 69677265 65742e66  ca-ES/tuigreet.f
- 21f000 656e2d55 532f7475 69677265 65742e66  en-US/tuigreet.f
- 21f010 69742d49 542f7475 69677265 65742e66  it-IT/tuigreet.f
- 21f020 64652d44 452f7475 69677265 65742e66  de-DE/tuigreet.f
- 21f030 70742d42 522f7475 69677265 65742e66  pt-BR/tuigreet.f
- 21f040 66722d46 522f7475 69677265 65742e66  fr-FR/tuigreet.f
+ 21f000 66722d46 522f7475 69677265 65742e66  fr-FR/tuigreet.f
+ 21f010 706c2d50 4c2f7475 69677265 65742e66  pl-PL/tuigreet.f
+ 21f020 69742d49 542f7475 69677265 65742e66  it-IT/tuigreet.f
+ 21f030 64652d44 452f7475 69677265 65742e66  de-DE/tuigreet.f
+ 21f040 656e2d55 532f7475 69677265 65742e66  en-US/tuigreet.f

suggests, this comes from how contrib/locales/ is used without sorting the entries.
Can you help me find the right place to fix this?

Do not terminate on authentication failure

tuigreet behaves differently than greetd expects:

To reproduce enter unknown credentials in:

  • agreety (greetd restarts and I see prompt again):
jun 20 11:00:36 nixps greetd[29738]: pam_unix(greetd:auth): check pass; user unknown
jun 20 11:00:36 nixps greetd[29738]: pam_unix(greetd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
jun 20 11:00:36 nixps greetd[29738]: gkr-pam: error looking up user information
jun 20 11:00:36 nixps greetd[29738]: pam_unix(greetd:auth): check pass; user unknown
jun 20 11:00:38 nixps greetd[29738]: error: authentication error: pam_authenticate: USER_UNKNOWN
jun 20 11:00:38 nixps greetd[29315]: client loop failed: i/o error: Broken pipe (os error 32)
  • tuigreet (login prompt never renders - requires manual greetd restart):
jun 20 11:02:25 nixps greetd[30992]: pam_unix(greetd:auth): check pass; user unknown
jun 20 11:02:25 nixps greetd[30992]: pam_unix(greetd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
jun 20 11:02:25 nixps greetd[30992]: gkr-pam: error looking up user information
jun 20 11:02:25 nixps greetd[30992]: pam_unix(greetd:auth): check pass; user unknown
jun 20 11:02:27 nixps greetd[30992]: error: authentication error: pam_authenticate: USER_UNKNOWN
jun 20 11:02:27 nixps greetd[30371]: client loop failed: i/o error: Connection reset by peer (os error 104)
jun 20 11:02:27 nixps greetd[30371]: error: check_children: greeter exited without creating a session

Unable to start greetd in Debian

I finished cargo installation and there's a big folder ~/tuigreet (around 500Mb)
Btw when I run tuigreet execution file, I got this error
GREETD_SOCK must be defined

There's no guide for any typical distro like Debian/Fedora. Please give me struction. Tysm!

High CPU consumption since 0.7.0

In 0.7.0, 0.7.1 and master (64a41c3), the CPU consumption is unreasonably high -- htop shows that tuigreet uses around 160% CPU.
When I tried 0.6.1 it came down to around 0% and this is reasonable. When I inspected with strace what was happening at 0.7.1, a lot of futex() calls appeared, so it looks like a lot of busy waiting (I saw that in between 0.6.1 and 0.7.0 some code was moved to async).

greetd command = tuigreet -c zsh
System: Arch Linux

--time Date time format specification

Thank you for making this useful tool.

I'm using a Japanese locale, and the kanji characters in the date/time part are garbled and cannot be displayed in the font on agetty.
image
For example, it would be helpful if the --time argument could be used to specify the display format in the format of the date command.

Thank you for your consideration.

Menu gets stuck if two submenus opened

If a user presses F2 to change command, and then immediately F3 to choose session, or vice versa, then exits the top-level menu, the underlying menu is stuck open. The user cannot log in, and the program becomes unresponsive.

I'm experiencing this issue in tuigreet 0.2.0, on Fedora 32.

tuigreet as a screen locker

Is it possible to use tuigreet as a screen locker?
I know this depends on greetd, but I couldn't figure out if it supports such functionality.

/var/cache/tuigreet did not exist

Hello,

On Gentoo, I had to create /var/cache/tuigreet (ownership greetd:greetd) to have the "--remember" and "--remember-session" parameter work normally.

It may be the way my system is setup and not a tuigreet bug in itself, but that information may come in handy for others.

Thanks for the great application - Much useful to start Wayland without xorg! :-)

Translate power commands outputs

Currently, the messages that are displayed when a power command fails are hardcoded in English, they need to be translated:

  • Command exited with {}
  • Command failed: {}

long wait time after entering password in 0.7.1

my screen shows a blinking "-" symbol on a black screen for about 10 seconds after entering password and pressing enter. downgrading to 0.6.1 solves the problem. here's my /etc/greetd/config.toml for reference. I'm using the package from AUR

[terminal]
# The VT to run the greeter on. Can be "next", "current" or a number
# designating the VT.
vt = 1

# The default session, also known as the greeter.
[default_session]

# `agreety` is the bundled agetty/login-lookalike. You can replace `$SHELL`
# with whatever you want started, such as `sway`.
command = "tuigreet --issue --time --remember --remember-session"

# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "greeter"

[Feature request] Multihead support

No idea how it could be done, maybe impossible since tuigreet use a tty.

On a laptop, when an external monitor is connected, nothing is show on it.
It would be great to have an option to display mirrored tuigreet on all available screens.

Show users custom launch command under "Choose session" (or equivalent)

So I have my own launch command configured:

command = "tuigreet --cmd wayfire-launch.sh"

And tuigreet shows it nicely as default at the bottom, displaying "CMD wayfire-launch.sh".

However the launch command does not appear in the list when pressing F3. So that means once I choose a different session from that menu, I will "lose" my default command in that situation.

Ok good, personally I can remember it, so I can type it in again as a custom command with F2.

But I think it should not just disappear and be inaccessable afterwards.

Why not put it under the "Choose session" (F3) commands :)

^A does not work as expected in answer field

Using ^A to move to the beginning of the answer field does not work as expected.

The calculation used to compute the offset of the current value always uses the username instead of the current answer, thus not moving the right number of characters.

Add support for localization

Right now, strings are hardcoded in English, we may want to add support for translating those to be used in the display.

Bottom Left Bar Given too little space

On low-ish resolutions the end of CMD is cut off as the bottom left bar seem to be given exactly half the screen.

This seems to be completely unnecessary as the only thing occupying the right side is "CAPS LOCK".

Expected behaviours:
Bottom of the screen to read:
"... F12 Power CMD /bin/bash"

What actually happens:
"... F12 CMD /bin"

unusable on gentoo here...

CHECKVT=1
DISPLAYMANAGER="greetd"
--------------------------------------
running openrc+elogind here.
----------------------
[I] gui-libs/greetd
     Installed versions:  0.8.0(12:07:21 02/12/2021)(man -debug)
CFLAGS="-march=skylake -O1-pipe -Wa,-mbranches-within-32B-boundaries"
CXXFLAGS="-march=skylake -O1-pipe -Wa,-mbranches-within-32B-boundaries"
LDFLAGS="-Wl,-O1 -Wl,-fuse-ld=bfd -march=skylake -O1-pipe -Wa,-mbranches-within-32B-boundaries"
--------------------------
[I] gui-apps/tuigreet
     Installed versions:  0.7.2(21:38:18 23/02/2022)(-debug)
USE="-debug" ABI_X86="(64)"
CFLAGS="-march=skylake -O1-pipe -Wa,-mbranches-within-32B-boundaries"
CXXFLAGS="-march=skylake -O1-pipe -Wa,-mbranches-within-32B-boundaries"

login & password keystroke not always echoed on screen
choose session get stuck while Arrow-Up Arrow-Down
text input cursor finally jumps to the left side of the screen.

Things are running so bad here, I must be doing the wrong way as a whole.
No idea what to change...

X sessions broken

/usr/share/wayland-sessions/*.desktops specify Exec= to the display server, and work stand-alone.

/usr/share/xsessions/*.desktops specify Exec= to the WM, and therefore need some form of X server configuration to be performed before they're started.

Set terminal colors

Hi,
I'm trying to achieve what's shown in the screenshot in the README, basically I'd like to be able to change the color scheme of the login screen.

I've tried setting escape codes in my .bashrc for the "linux" term, but that only seems to affect the tty after login.

I understand this is probably a general question not strictly related to your project, but would you mind sharing how you were able to achieve that?

Thanks!

Power option doesn’t work

On Gentoo, the power option doesn't seem to work, not sure weather it's like previous problem #33 that Gentoo ebuild doesn't do something that requires this function to work.

Package is available on Gentoo

I've added tuigreet as a package on Gentoo, available here:
https://packages.gentoo.org/packages/gui-apps/tuigreet

Thanks a lot for making this 😺

I'm wondering if there is going to be a release anytime soon?
I remember there was a 0.1.0 release but it seems to have been removed and replaced by the tip release, but that one is not suitable for packaging as it keeps changing (checksum and dependencies).

Thanks again!

Support unicode characters

My naive implementation of character counting assumed, as it is on my own system, that all prompts and values entered in the greeter are ASCII.

Entering characters from other alphabets would, in the best case, mess up the cursor offset calculation or, in the worst case, crash the program.

We should not assume anything about the glyphs entered in the greeter.

Ctrl+U for input reset

In most terminal programs Crtl+U can be used to clear the current input. This is very useful for password propts, where there is no visual feedback. So when I type the wrong password, then remember midway that I was thinking of the wrong password, I just press Ctrl+U and start again.

tuigreet does not seem to support that feature, at least it is not working for me. But it would be great if it did.

`ESC` breaks layout

When I press the ESC key on the main page, a stray error appears in place of the prompt.

NixOS.XMonad.mp4

Remember last session per user

Hi,

I was wondering if you would consider a pull request adding support for a cached
last session, but per user ?
The idea being that when there is several people using a computer, usually each
one will use the same session most of the time.

I'm thinking this could be done like the last session support, with something
like /var/cache/tuigreet/<user>/lastsession; when the user is chosen, this
file is checked for existence the same way that for lastsession, and the cmd
adjusted accordingly.

What do you think ?

I'm willing to add that myself (that will make a good rust first experiment) if
needed, but do you think it's in the scope of tuigreet ?

Thanks for your work.

Systemd error message gets printed over Yuigreet interface

The systemd-networkd-wait-online service often fails on my machine on startup. When it does so, Systemd writes

systemd[1]: Failed to start Wait for Network to be Configured.

to the system journal and that gets printed to some of the consoles (not sure which ones and how it works). If this happens when I'm in Tuigreet, the messages gets printed right over the Tuigreed interface. In my case the message fills the password field (that's where the cursor is).

Could Tuigreet somehow disable printing of system log messages to the console it works in? (And maybe reenable it when Tuigreet quits.)

I'm using tuigreet 0.7.3 running Archlinux.

NixOS instructions improvement.

While it looks like it will probably work, the NixOS instructions make use of a non-standard mechanism for referencing the bin directory of a package. lib.makeBinPath is intended to be used to create a colon separated list of directories that contain executables in package. I think the correct instructions would be:

{ pkgs, lib, ... }:
{
  services.greetd = {
    enable = true;
    settings = {
      default_session = {
        command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
        user = "greeter";
      };
    };
  };
}

Random init log messages sliding into tuigreet

Today I had a "random" systemd log message slide into tuigreet:
Untitled

[ OK ] Finished Daily man-db regeneration

As you see the input field is also garbled sadly (where it should say "Username:"

In this case it is not severe, however maybe if possible it should be prevented somehow?

I have never seen the "default tty login screen" ever having random init log messages appear, for what it's worth.

Remember Previous Session

Currently using tuigreet as a display manager you must select your session every log in, it would be very convenient to have it remember the last used session and start it like other display managers

kmscon

I opened this ticket upstream in greetd.

It would be a very desireable to have greetd/tuigreet working with kmscon. Specifically to be able to use HiDPI fonts, which tty doesn't support.

You are welcome to participate in said ticket to show support in case you consider it something positive.

Run command depending on user

I would like to start a graphical session (gnome, sway, xmonad, and so on) depending on the user.
I tried to do

--cmd 'sh -c \$START_SESSION_SCRIPT'

But that didn't work.

Since there is no standard way to start a graphical session (except startx but this was created for X), I don't know how to do that.

I know this is not a good issue, but help would be really apreciated.

Power options do not work after logout

The power options poweroff and reboot work fine on initial boot.

However once I log into my (wayfire) session and then logout (back to greetd), the power options fail to work:
tuibug1

User nuc is logged in on tty1
Please retry after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with `systemctl poweroff -l`
Command exited with status: 1

So I see 3 issues here:

  1. Why is my user still logged in on TTY1 after logging out?
  2. The power options do not work.
  3. The error message is all over the place. I don't know if this can be prevented, but it would be nice that if such/any error message happens, it gets printed out nicely to the user.

Sys info:
tuigreet 0.7.2
greetd 0.8.0
Archlinux

Newlines in greetings are broken

Multi-line greetings (from both --greeting and --issue) don't render correctly.

The vertical space for all of the lines is correctly allocated in the frame, but then all lines are merged into one and displayed on the top line, with a bunch of empty lines underneath.

Replication

The easiest way to replicate this is to run with --issue and use an issue file with a lot of lines, such as:

1
2
3
4
5

Display caps lock state

We should probably display a small indicator when caps lock is on, probably on the right of the status line.

Use reboot syscall for power management

It might be cleaner to use nix::sys::reboot for power management (shut down and reboot) instead of using the current library that shells out to the appropriate commands.

But doing that would require giving tuigreet the CAP_SYS_BOOT capability, which may not be something we want to do.

More research is needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.