Giter Site home page Giter Site logo

regreet's Introduction

ReGreet

A clean and customizable GTK-based greetd greeter written in Rust using Relm4. This is meant to be run under a Wayland compositor (like Sway).

It is based on Max Moser's LightDM Elephant greeter, which is based on Matt Shultz's Fischer's example LightDM greeter.

Screenshots

Welcome Dropdown session menu Manual session entry Password entry with selected user Password entry with manual user Login fail

These screenshots use the Canta GTK theme in dark mode with the Roboto font. All screenshots are provided under the CC-BY-SA-4.0 license.

Features

  • Shows a dropdown list of existing users and X11/Wayland sessions
  • Allows manual entry of username and session command
  • Remembers the last authenticated user
  • Automatically selects the last used session per user
  • Allows setting environment variables for created sessions
  • Supports customizing:
    • Background image
    • GTK theme
    • Dark mode
    • Icon theme
    • Cursor theme
    • Font
  • Allows changing reboot & poweroff commands for different init systems
  • Supports custom CSS files for further customizations
  • Respects XDG_DATA_DIRS environment variable
  • Respects fields Hidden and NoDisplay in session files
  • Picks up the first found session with the same name and in the same type (X11/Wayland). This allows for overriding system-provided session files.

Requirements

  • Rust 1.64.0+ (for compilation only)
  • greetd
  • GTK 4.0+
  • A Wayland compositor (such as Cage or Sway)

Note: Please make sure you have all requirements installed, as having a greetd greeter constantly failing isn't as much fun as it sounds.

Installation

Arch Linux

ReGreet is available as greetd-regreet in the official Arch Linux repositories, and as greetd-regreet-git in the AUR. Note that I only maintain the AUR package, and the package in the Arch repos is maintained by someone else.

Install the AUR package either by cloning the AUR repository and running makepkg, or by using your favourite AUR helper:

paru -S greetd-regreet-git

Install the package in the Arch repos as follows:

pacman -S greetd-regreet

Unofficial Packages

NixOS

For a minimal config, add programs.regreet.enable = true; in your NixOS configuration file. For users who want to configure more, they can see all the options of the module by searching for regreet on https://search.nixos.org/options.

Manual

First, the greeter must be compiled using Cargo:

cargo build --release

The compilation process also configures the greeter to look for or use certain directories. These can be changed by setting the values of certain environment variables. These are:

Environment Variable Default Use
GREETD_CONFIG_DIR /etc/greetd The configuration directory used by greetd
CACHE_DIR /var/cache/regreet The directory used to store cache
LOG_DIR /var/log/regreet The directory used to store logs
SESSION_DIRS /usr/share/xsessions:/usr/share/wayland-sessions A colon (:) separated list of directories where the greeter looks for session files
REBOOT_CMD reboot The default command used to reboot the system
POWEROFF_CMD poweroff The default command used to shut down the system

The greeter can be installed by copying the file target/release/regreet to /usr/bin (or similar directories like /bin).

Optionally, to set up the log and cache directories using systemd-tmpfiles, do either of the following:

  • Copy the configuration given in systemd-tmpfiles.conf to /etc/tmpfiles.d/regreet.conf or /usr/lib/tmpfiles.d/regreet.conf.
  • Run the systemd-tmpfiles CLI:
    systemd-tmpfiles --create "$PWD/systemd-tmpfiles.conf"

GTK4 Versions

ReGreet targets GTK version 4.0 or above. If you have higher versions of GTK, then you can enable additional features in ReGreet. Currently, the extra features enabled are:

GTK Version Feature Flag Features
4.8 gtk4_8
  • Changing how the background image fits the screen

To compile with support for a GTK version, pass the corresponding feature flag during building. For example, to compile with GTK 4.8+ support, run:

cargo build -F gtk4_8 --release

To compile with full support, run:

cargo build --all-features --release

Usage

Set as Default Session

Edit the greetd config file (/etc/greetd/config.toml) to set regreet with a Wayland compositor as the default session. For example, if using Cage:

[default_session]
command = "cage -s -- regreet"
user = "greeter"

The -s argument enables VT switching in cage (0.1.2 and newer only), which is highly recommended to prevent locking yourself out.

If using Sway, create a sway config file (in a path such as /etc/greetd/sway-config) as follows:

exec "regreet; swaymsg exit"
include /etc/sway/config.d/*

Then, set Sway to use this config (whose path is shown here as /path/to/custom/sway/config) as the default greetd session:

[default_session]
command = "sway --config /path/to/custom/sway/config"
user = "greeter"

NOTE: If you find that ReGreet takes too much time to start up with Sway, you may be affected by this: swaywm/sway/wiki#gtk-applications-take-20-seconds-to-start. See this link for the fix. Alternatively, the solution proposed in issue #34 may resolve it.

Restart greetd to use the new config.

Configuration

The configuration file must be in the TOML format. By default, it is named regreet.toml, and located in the greetd configuration directory specified during compilation (/etc/greetd/ by default). You can use a config file in a different location with the --config argument as follows:

regreet --config /path/to/custom/regreet/config.toml

A sample configuration is provided along with sample values for all available options in regreet.sample.toml. Currently, the following can be configured:

  • Background image
  • How the background image fits the screen (needs GTK 4.8+ support compiled)
  • Environment variables for created sessions
  • GTK theme
  • Dark mode
  • Icon theme
  • Cursor theme
  • Font
  • Reboot command
  • Shut down command

Custom CSS

ReGreet supports loading CSS files to act as a custom global stylesheet. This enables one to do further customizations above what ReGreet supports through the config file.

By default, the custom CSS file is named regreet.css, and located in the greetd configuration directory specified during compilation (/etc/greetd/ by default). To load a custom CSS stylesheet from a different location, pass the -s or --style CLI argument as follows:

regreet --style /path/to/custom.css

Please refer to the GTK4 docs on CSS in GTK and GTK CSS Properties to learn how to style a GTK4 app using CSS. For a general reference on CSS, please refer to the MDN web docs.

Changing Reboot/Shut Down Commands

The default reboot and shut down commands use the reboot and poweroff binaries, which are present on most Linux systems. However, since the recommended way of using ReGreet is to avoid running it as root, the reboot/poweroff commands might not work on systems where superuser access is needed to run these commands. In this case, if there is another command to reboot or shut down the system without superuser access, these commands can be set in the config file under the [commands] section.

For example, to use loginctl reboot as the reboot command, use the following config:

[commands]
reboot = [ "loginctl", "reboot" ]

Here, each command needs to be separated into a list containing the main command, followed by individual arguments.

These commands can also be specified during compilation using the REBOOT_CMD and POWEROFF_CMD environment variables.

Logging and Caching

The cache is are stored in /var/cache/regreet/cache.toml (configurable during installation). It contains the last authenticated user and the last used session per user, which are automatically selected on next login. If the greeter is unable to write to this file, then it reverts to the default behaviour.

The log file is stored in /var/log/regreet/log (configurable during installation). Once the log file reaches a limit, it is compressed and rotated to /var/log/regreet/log.X.gz, where X is the index of the log file. The higher the index, the older the log file. After reaching a limit, the oldest log file is removed. If the greeter is unable to write to this file or create files in the log directory, then it logs to stdout.

The recommended configuration is to run greetd greeters as a separate user (greeter in the above examples). This can lead to insufficient permissions for either creating the cache/log directories, or writing to them. To make use of the caching and logging features, please create the directories manually with the correct permissions, if not done during installation with systemd-tmpfiles.

Contributing

pre-commit is used for managing hooks that run before each commit (such as clippy), to ensure code quality. Thus, this needs to be set up only when one intends to commit changes to git.

Firstly, install pre-commit itself. Next, install pre-commit hooks:

pre-commit install

Now, pre-commit should ensure that the code passes all linters locally before committing. This will save time when creating PRs, since these linters also run in CI, and thus fail code that hasn't been linted well.

Licenses

This repository uses REUSE to document licenses. Each file either has a header containing copyright and license information, or has an entry in the DEP5 file at .reuse/dep5. The license files that are used in this project can be found in the LICENSES directory.

A copy of the GPL-3.0-or-later license is placed in LICENSE, to signify that it constitutes the majority of the codebase, and for compatibility with GitHub.

regreet's People

Contributors

dependabot[bot] avatar johnnyjayjay avatar mrduartept avatar otaj avatar rasmuspeders1 avatar rharish101 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

regreet's Issues

X sessions don't launch Xorg

Forgive me if I misunderstand something myself here, but aiui, the X session commands defined in /usr/share/xsession expect to be executed in an already running X server. regreet does not launch an X server before executing those scripts, and therefore does not seem to be able to launch X sessions defined in xsession files written for traditional display managers.

Is this correct, and intended? Can this be clarified in the readme?

Just trying to understand what exactly regreet intends to support, absolutely do not fault you for not fully implementing this de-facto "standard". Having spent the better part of three hours trying to figure out why my X sessions aren't starting and going down the rabbit hole of Xsession scripts again, the entire thing seems fragile. No wonder display managers have always been a pain to configure.

Should `/var/cache/regreet/cache.toml` be moved to `/var/lib/regreet/state.toml`?

I have been investigating what directories are safe/inconsequential to have on a tmpfs, and the docs I am finding around FHS point toward the files in /var/cache being very safe to delete with the largest resulting consistences being that programs would have to take time to recompute the data. Deleting /var/cache/regreet/state.toml will "lose" in-recalculate-able values that will require user input to re-obtain. Also deleting the file will have the very visible consistences to the user.

Since the file is more state-full maybe it should live under /var/lib/ is some form?

https://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA
https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html

Logging in... takes ~5 seconds

After typing in my password, actually starting the session takes around 5 seconds (about as long as it would take to tell me my password is wrong). During this time, the text changes to "Logging in..." and I can still control the mouse and type into the password field. I'm using the default config, and the contents of /var/log/regreet/log have nothing from recent boots.

Automatically set XDG_SESSION_TYPE based on session file location

Currently, ReGreet does not set XDG_SESSION_TYPE by default, and it is not possible to set different variables for different sessions.

This can be a problem for some desktop environment components. For example, pam_kwallet5.so checks for a desktop session by checking if XDG_SESSION_TYPE is x11 or wayland, and does nothing if the variable is absent. When this happens the KWallet keyring will not be automatically unlocked on login.

It would be nice if ReGreet could treat xsessions and wayland-sessions differently and set this variable before starting the session (like GDM and SDDM).

Instant crashes on NixOS

Sometime after updating ReGreet in Nixpkgs to 0.1.1, it started crashing sway (or cage) continually, requiring me to manually kill the greetd service. From what I could see in the fast flickers, a window title appeared for ReGreet (unusual), but everything else looked normal. Even the log file looks normal, with debug enabled. I'll attach it here.
I've rolled back to 0.1.0 and it works completely fine.
Also, I've tried removing all the settings first but that did not seem to help.
regreet_log.txt

User selection popup shows system users

After ReGreet started, I wanted to select my user from the drop-down list. There were system users listed (0-999 UID), but not my user.
Can the drop-down only include real users (UID 1000+), or have a list of users that can authenticate in the configuration?

Not loading theme or background image

Hi! I recently updated my system, including ReGreet, and it is no longer recognizing my theme or background image.
Here is my config:

cat /etc/greetd/regreet.toml                                                    
# SPDX-FileCopyrightText: 2022 Harish Rajagopal <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later

# Path to the background image
background = "/usr/share/backgrounds/greeter.jpg"

# How the background image covers the screen if the aspect ratio doesn't match
# Available values: "Fill", "Contain", "Cover", "ScaleDown"
# Refer to: https://docs.gtk.org/gtk4/enum.ContentFit.html
# NOTE: This is ignored if ReGreet isn't compiled with GTK v4.8 support.
background_fit = "Fill"

# The entries defined in this section will be passed to the session as environment variables when it is started
[env]
ENV_VARIABLE = "value"

[GTK]
# Whether to use the dark theme
application_prefer_dark_theme = true

# Cursor theme name
cursor_theme_name = "Catppuccin-Mocha-Dark"

# Font name and size
font_name = "Lexend Deca Regular 12"

# Icon theme name
icon_theme_name = "Adwaita"

# GTK theme name
theme_name = "Catppuccin-Mocha-Standard-Lavender-Dark"

There is a valid .jpg file at the path set as the background, which I will attach:
greeter.jpg
ReGreet renders a fully white background, with what I assume is the default GTK theme (looks like light theme Adwaita), and the default Adwaita cursor.

Did I make a mistake in my configuration file?

regreet takes long to render

It takes about 30 seconds for the GUI to show up after the service has launched on my laptop. (I get a grey background with a cursor at first. I assume this is because the greetd.service has started)
APU: AMD A9-9410 RADEON R5
Graphics Driver: amdgpu
OS: Arch Linux

Output from /var/log/regreet/log while starting the system using regreet -l debug:

2023-02-26T20:57:19.188404032+01:00 DEBUG regreet::sysutil: UID_MIN: 1000, UID_MAX: 60000
2023-02-26T20:57:19.188544989+01:00 DEBUG regreet::sysutil: Found user 'ntsu' with UID '1000' and empty full name
2023-02-26T20:57:19.190002503+01:00  INFO regreet::sysutil: Now scanning session file: /usr/share/wayland-sessions/hyprland.desktop
2023-02-26T20:57:19.190370256+01:00 DEBUG regreet::sysutil: Found name 'Hyprland' for session: /usr/share/wayland-sessions/hyprland.desktop
2023-02-26T20:57:19.19039119+01:00  INFO regreet::sysutil: Now scanning session file: /usr/share/wayland-sessions/sway.desktop
2023-02-26T20:57:19.190676391+01:00 DEBUG regreet::sysutil: Found name 'Sway' for session: /usr/share/wayland-sessions/sway.desktop
2023-02-26T20:57:19.190690944+01:00  INFO regreet::sysutil: Now scanning session file: /usr/share/wayland-sessions/wrapped_hl.desktop
2023-02-26T20:57:19.19093545+01:00  WARN regreet::sysutil: No command found for session: /usr/share/wayland-sessions/wrapped_hl.desktop
2023-02-26T20:57:19.192229248+01:00  INFO regreet::tomlutils: Loaded TOML file: /var/cache/regreet/cache.toml
2023-02-26T20:57:19.192518015+01:00  INFO regreet::tomlutils: Loaded TOML file: /etc/greetd/regreet.toml
2023-02-26T20:57:20.226968811+01:00  INFO regreet::client: Cancelling greetd session
2023-02-26T20:57:20.227171083+01:00 DEBUG regreet::gui::component: Setting dark theme: true
2023-02-26T20:57:20.251379389+01:00 DEBUG regreet::gui::component: Setting cursor theme: Nordic
2023-02-26T20:57:20.251760545+01:00 DEBUG regreet::gui::component: Setting font: Arimo 16
2023-02-26T20:57:20.252324492+01:00 DEBUG regreet::gui::component: Setting icon theme: Nordic
2023-02-26T20:57:20.257631131+01:00 DEBUG regreet::gui::component: Setting theme: Nordic
2023-02-26T20:57:20.307192019+01:00 DEBUG regreet::gui::component: Found user: ntsu
2023-02-26T20:57:20.307996086+01:00 DEBUG regreet::gui::component: Found session: Hyprland
2023-02-26T20:57:20.308256877+01:00 DEBUG regreet::gui::component: Found session: Sway
2023-02-26T20:57:20.313769223+01:00 DEBUG update_with_view{input=UserChanged(UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: None, sess_text: "" }) component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:user_change_handler: regreet::gui::model: Retrieved username 'ntsu' from options
2023-02-26T20:57:30.719530197+01:00 DEBUG update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Retrieved username 'ntsu' from options
2023-02-26T20:57:30.719560157+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Creating session for user: ntsu
2023-02-26T20:57:30.719565904+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::client: Creating session for username: ntsu
2023-02-26T20:57:34.289736854+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::client: Sending password to greetd
2023-02-26T20:57:34.295012606+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Successfully logged in; starting session
2023-02-26T20:57:34.295048406+01:00 DEBUG update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Retrieved current session: Hyprland
2023-02-26T20:57:34.295060524+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::client: Starting greetd session with command: ["Hyprland"]
2023-02-26T20:57:34.295183635+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Session successfully started
2023-02-26T20:57:34.295191984+01:00 DEBUG update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Retrieved username 'ntsu' from options
2023-02-26T20:57:34.295199385+01:00 DEBUG update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Updated cache with current user: ntsu
2023-02-26T20:57:34.295203765+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::gui::model: Saving cache to disk
2023-02-26T20:57:34.295218879+01:00  INFO update_with_view{input=Login { info: UserSessInfo { user_id: Some("ntsu"), user_text: "", sess_id: Some("Hyprland"), sess_text: "" } } component="regreet::gui::model::Greeter" id="0x7ffc0902baf0"}:login_click_handler: regreet::cache: Saving cache to disk

Blank screen at start until greetd.service is restarted manually

greetd-regreet shows a blank screen until I switch tty and restart greetd.service, then it works regularly until boot.

Here's my regreet.toml:

[commands]
reboot = [ "off", "-r" ]
poweroff = [ "off", "" ]

[background]
path = "/usr/local/share/backgrounds/2560x1440-road_blur.jpg"
fit = "Cover" # Available values: "Fill", "Contain", "Cover", "ScaleDown"

[GTK]
application_prefer_dark_theme = true
cursor_theme_name = "Paper"
font_name = "Cantarell 16"
icon_theme_name = "ePapirus-Dark"
theme_name = "Adapta-Nokto-Eta"

and my greetd.toml:

[terminal]
vt = 1
[default_session]
command = "cage -s -- regreet"
user = "greeter"

Attached /var/log/regreet/log: log.txt

Hardware: TUXEDO Stellaris 17 Gen.3
Videocard: NVIDIA 3070
OS: Arch Linux
ReGreet version: 0.1.1-1

This issue does not happen on my other laptop with the same configuration and integrated graphics, so perhaps it's because of NVIDIA?

XDG_RUNTIME_DIR environment variable problem

I'm setting all environment variables in regreet.toml in [env] section. Variables that use XDG_RUNTIME_DIR variable end up being not calculated, e.g if I set: WOBSOCK="$XDG_RUNTIME_DIR/wob.sock", it does not calculate XDG_RUNTIME_DIR variable and in my system WOBSOCK variable is $XDG_RUNTIME_DIR/wob.sock, but it should be /run/user/1000/wob.sock.
Before regreet I was using custom binary, where I set all variables before running sway, everything worked fine. How can I resolve this issue?

OS: Archlinux
WM: sway

regreet.toml
# SPDX-FileCopyrightText: 2022 Harish Rajagopal <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later

[background]
# Path to the background image
path = "/usr/share/backgrounds/login-background.jpg"

# How the background image covers the screen if the aspect ratio doesn't match
# Available values: "Fill", "Contain", "Cover", "ScaleDown"
# Refer to: https://docs.gtk.org/gtk4/enum.ContentFit.html
# NOTE: This is ignored if ReGreet isn't compiled with GTK v4.8 support.
fit = "Cover"

# The entries defined in this section will be passed to the session as environment variables when it is started
[env]
_JAVA_AWT_WM_NONREPARENTING="1"
QT_QPA_PLATFORM="wayland;xcb"
QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
QT_QPA_PLATFORMTHEME="gnome"
SDL_VIDEODRIVER="wayland"
CLUTTER_BACKEND="wayland"
MOZ_ENABLE_WAYLAND="1"
MOZ_DBUS_REMOTE="1"
XDG_CURRENT_DESKTOP="sway"
XDG_SESSION_TYPE="wayland"
TERMINAL="kitty"
XDG_CONFIG_HOME="$HOME/.config"
XDG_CACHE_HOME="$HOME/.cache"
XDG_DATA_HOME="$HOME/.local/share"
XDG_STATE_HOME="$HOME/.local/state"
XDG_DATA_DIRS="/etc/xdg:/usr/local/share:/usr/share"
ZDOTDIR="$HOME/.config/zsh"
XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
RUSTUP_HOME="$XDG_DATA_HOME/rustup"
PYTHONSTARTUP="/etc/python/pythonrc"
PSQL_HISTORY="$XDG_DATA_HOME/psql_history"
PLATFORMIO_CORE_DIR="$XDG_DATA_HOME/platformio"
CARGO_HOME="$XDG_DATA_HOME/cargo"
DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
GNUPGHOME="$XDG_DATA_HOME/gnupg"
GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
GOPATH="$XDG_DATA_HOME/go"
DVDCSS_CACHE="$XDG_DATA_HOME/dvdcss"
LESSHISTFILE="$XDG_CACHE_HOME/less/history"
WOBSOCK="$XDG_RUNTIME_DIR/wob.sock"
PARALLEL_HOME="$XDG_CONFIG_HOME/parallel"
_JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java' -Dswing.aatext=TRUE -Dawt.useSystemAAFontSettings=on'"
NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history"
NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
WINEPREFIX="$XDG_DATA_HOME/wine"
REDISCLI_HISTFILE="$XDG_DATA_HOME/redis/rediscli_history"
XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"  

[GTK]
# Whether to use the dark theme
application_prefer_dark_theme = true

# Cursor theme name
cursor_theme_name = "Adwaita"

# Font name and size
font_name = "Roboto 16"

# Icon theme name
icon_theme_name = "Adwaita"

# GTK theme name
theme_name = "Adwaita"

[commands]
# The command used to reboot the system
reboot = [ "systemctl", "reboot" ]

# The command used to shut down the system
poweroff = [ "systemctl", "poweroff" ]

Skip selecting session

I would like the option to bypass the first User/Session selection window by default via a config settings.

Desired behaviour:

  • On startup, the password screen would be shown first
  • Session and User would be set to the last used or default settings
  • Hitting "Cancel" brings back the User/Session selection window

Update documentation

I am running NixOS with greetd.
I have done a lot of fiddling to start regreet in a sway session started by greetd, because cage is still unusable to me.
What I struggled with the most was getting rid of the 25 sec delay of GTK because it's waiting for answers from dbus (xdg-portal-gtk or something). All this is described in the added Note however the solution described in this link is supposed to work for normal sway sessions it will not work for greetd.

What I figured out is that what is really need was basically to change command that starts sway to this instead:

/path/to/bin/dbus-run-session /path/to/bin/sway --config /path/to/swayConfig

Of course paths don't need to be explicit if they are already in PATH.
In the end it doesn't matter if your add stuff to your configuration (that tries to get some envs from dbus) when sway isn't run with dbus to begin with.

In that sense, please verify my solution is indeed the correct thing to do and update the documentation, so no one has to wait for this beautiful software to start ever again.

How to hide reboot button or clock widget

Hi,

Great greeter! I consider switching to it from gtkgreet.

I think there is no way for the moment to remove the clock widget or the reboot buttons right? I was planning to use waybar for that so I checked CSS properties without success.

Need a tagged release for distro support

I'm working at bringing official builds of greetd to the Arch Linux [community] repository. I'll have at least a couple of the most common greeters to go with it but personally this one looks like something I'd want to run. Please consider adding a stable release tag (even a v0.1.0) to match the Cargo file you already have to the Git repository at some known working state. It's pretty hard to package software without some upstream nod to a release point.

Default environment

I am using the ReGreet NixOS module, and write

Hyprland

in /etc/greetd/environments (with environment.etc."greetd/environments".text in the NixOS configuration). Although I can find this environment as an option on the login screen, it is not set in the session drop down as the default, even if it is the only environment.

Is there a way to set the default environment? GTKGreet uses the first line in /etc/greetd/environments as the default, should it also be the case in ReGreet, i.e. is it NixOS specific?

ReGreet ignores config(or so it seems, at least)

My config is

[background]
path = "/data/pictures/wallpapers/82072674_p0.png"

[env]
MOZ_ENABLE_WAYLAND=1

[GTK]
font_name = "Inter 16"
theme_name = "Catppuccin-Macchiato-Standard-Sapphire-Dark"
icon_theme_name = "Papirus-Dark"
cursor_theme_name = "posy-white"

[commands]
reboot = [ "systemctl", "reboot" ]
poweroff = [ "systemctl", "poweroff" ]

, but ReGreet seems to follow none of it. Logs show only this:

(regreet:371): Gtk-WARNING **: 21:32:36.877: Theme parser warning: <data>:6:17-18: Empty declaration
Failed to create //.cache for shader cache (ะ’ั–ะดะผะพะฒะปะตะฝะพ ัƒ ะดะพัั‚ัƒะฟั–)---disabling.

What could be the problem? The owner of /etc/greetd and all files inside is greeter and it has video permissions.

ReGreet takes up to 30 seconds before showing up

I was a happy ReGreet user until yesterday morning, when it started acting up and now it drops me in a black screen for up to 30 seconds before the greeter shows up.

Here's my config:

$ cat /etc/greetd/config.toml
[terminal]
vt = 1

[default_session]
command = "cage -s -- regreet"
user = "greeter"

$ cat /etc/greetd/regreet.toml
[background]
path = "/usr/local/share/backgrounds/2560x1440-cityscape.jpg"
fit = "Cover"

[env]

[GTK]
application_prefer_dark_theme = true
cursor_theme_name = "Adwaita"
font_name = "Cantarell 20"
icon_theme_name = "Adwaita"
theme_name = "Adwaita"

[commands]
reboot = [ "off", "-r" ]
poweroff = [ "off", "" ]

And here's the output of journalctl:

$ journalctl -xeu greetd
Sep 02 13:29:18 stellaris greetd[677]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { command: "cage -s -- regreet", user: "greeter" },
Sep 02 13:29:18 stellaris greetd[677]:  initial_session: None }, internal: ConfigInternal { session_worker: 0 } }
Sep 02 13:29:18 stellaris systemd[1]: Started Greeter daemon.
โ–‘โ–‘ Subject: A start job for unit greetd.service has finished successfully
โ–‘โ–‘ Defined-By: systemd
โ–‘โ–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
โ–‘โ–‘ 
โ–‘โ–‘ A start job for unit greetd.service has finished successfully.
โ–‘โ–‘ 
โ–‘โ–‘ The job identifier is 111.
Sep 02 13:29:18 stellaris greetd[679]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { command: "", user: "" }, initial_session: None }, internal: ConfigInternal { session_worker: 11 } }
Sep 02 13:29:18 stellaris greetd[679]: pam_unix(greetd:session): session opened for user greeter(uid=971) by greeter(uid=0)
Sep 02 13:29:58 stellaris greetd[1202]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { command: "", user: "" }, initial_session: None }, internal: ConfigInternal { session_worker: 12 } }
Sep 02 13:30:02 stellaris greetd[1202]: pam_unix(greetd:session): session opened for user alessandro(uid=1000) by alessandro(uid=0)

For context, my setup uses polkit and I regret I need NVIDIA drivers. Launching regreet through sway instead of cage works.

$ uname -r
6.4.12-arch1-1

$ pacman -Q greetd
greetd 0.9.0-3

$ pacman -Q greetd-regreet
greetd-regreet 0.1.1-1

Regreet dose not show up automatically

Hi
I have triple monitor setup under Hyprland and everything work well except login window doesn't show up automatically and i have move mouse and login appears.
One other thing is the other monitors showing the Hyprland default background but it's not that important.

/etc/greetd/config.toml

[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 `/bin/sh`
# with whatever you want started, such as `sway`.
command = "Hyprland --config /etc/greetd/hyprland.conf"


# 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"

/etc/greetd/hyprland.conf

exec-once = regreet; hyprctl dispatch exit
#exec-once = cage -s -- regreet

/etc/greetd/regreet.toml

[background]
# Path to the background image
path = "/usr/share/backgrounds/greetd.jpg"
#path = "/usr/share/backgrounds/Fluent-building-night.png"
fit = "Contain"

# The entries defined in this section will be passed to the session as environment variables when it is started
[env]

[GTK]
# Whether to use the dark theme
application_prefer_dark_theme = true

# Cursor theme name
cursor_theme_name = "Fluent-dark"

# Font name and size
font_name = "Vazirmatn RD Regular 11"

# Icon theme name
icon_theme_name = "Xenlism Wildfire"

# GTK theme name
theme_name = "Orchis-Dark"

[commands]
# The command used to reboot the system
reboot = [ "systemctl", "reboot" ]

# The command used to shut down the system
poweroff = [ "systemctl", "poweroff" ]

Error when shutting down or restarting

When I restart or shutdown my PC, it hangs for a while with the following message on screen, the shuts down:

[CRITICAL] Critical error thrown: XDG_RUNTIME_DIR is not set!
terminate called after throwing an instance of 'std::runtime_error'
  what(): XDG_RUNTIME_DIR is not set!

image

Preview / demo mode & CSS documentation

Since I can't run regreet without greetd, it's hard to run regreet with GTK_DEBUG=inspector and poke around to see what can be customized. Adding a demo mode would really help.

I realized that this program needs layer shell. Even if the inspector is started, I cannot interact with it (that's the whole point!). Are there extra documentation on how to theme regreet in CSS?

Multi-monitor Support on Cage

Hello, I was trying to use ReGreet with two monitors, and it ended up spanning one login screen across the middle of both monitors, which was difficult to use. Would there be a way for it to either have ReGreet on just one monitor, have one screen with the login and one with just the background, or have ReGreet on both of the monitors? Thanks.

Custom CSS broken?

I recently updated regreet on NixOS to v1.1.0 from my custom package now that it is finally in the Nix repository, however, it seems my custom css no longer works.

It appears somewhere between this commit and this later one, my custom CSS became broken. However, /src/gui/template.rs was not modified between these two, so I have no clue why it is not working anymore.

I have tested the two commits and the v1.1.0 version on both NixOS and EndeavourOS, and only on the first one does my custom css actually work.

This is my login screen on EndeavourOS with commit ccffff87f621d9ea0d3c0f6ca64b361509d1dbc3
20230815_16h40m32s_grim

And this is my login screen with commit f8022a03aff145ea531f1d8534aa29282dd3a458
20230815_16h44m39s_grim

Override or remove "Welcome back!" message?

Hello,

I was curious if there is any way to override the "Welcome back!" message so it can say something else, or perhaps remove the message so the login box has no header on it? I do see where the message is set (https://github.com/rharish101/ReGreet/blob/main/src/gui/model.rs#L34), but I was specifically hoping to be able to override the message without rebuilding the package (with a .css file or similar), so it can be customized in an ISO but pull the package from the normal repository (using greetd-regreet from the Arch [extra] repo).

Thank you for taking a look. ๐Ÿ™‚

PAM auth Failed on NixOS

After updating to the latest NixOS unstable. I am unable to login because PAM authentication failed. Not sure if this is a ReGreet issue or NixOS issue.

ReGreet does not start on wlroots 0.17.0-1

Hello,

I am not sure if this is a ReGreet issue or a Greetd issue; my apologies if I am reporting in the wrong place.

After updating to wlroots 0.17.0-1, ReGreet fails to start. I don't see any obvious clues in the journal, but here it is:

โฏ journalctl -b -u greetd.service
Dec 06 18:52:02 Framework systemd[1]: Started Greeter daemon.
Dec 06 18:52:02 Framework greetd[951]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, runf>
Dec 06 18:52:02 Framework greetd[952]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: ">
Dec 06 18:52:02 Framework greetd[952]: pam_unix(greetd:session): session opened for user greeter(uid=964) by greeter(uid=0)
Dec 06 18:52:03 Framework greetd[952]: pam_unix(greetd:session): session closed for user greeter
Dec 06 18:52:03 Framework greetd[951]: error: check_children: greeter exited without creating a session
Dec 06 18:52:03 Framework systemd[1]: greetd.service: Deactivated successfully.
Dec 06 18:52:04 Framework systemd[1]: greetd.service: Scheduled restart job, restart counter is at 1.
Dec 06 18:52:04 Framework systemd[1]: Started Greeter daemon.
Dec 06 18:52:04 Framework greetd[1005]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, run>
Dec 06 18:52:04 Framework greetd[1006]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: >
Dec 06 18:52:04 Framework greetd[1006]: pam_unix(greetd:session): session opened for user greeter(uid=964) by greeter(uid=0)
Dec 06 18:52:04 Framework greetd[1006]: pam_unix(greetd:session): session closed for user greeter
Dec 06 18:52:04 Framework greetd[1005]: error: check_children: greeter exited without creating a session
Dec 06 18:52:04 Framework systemd[1]: greetd.service: Deactivated successfully.
Dec 06 18:52:06 Framework systemd[1]: greetd.service: Scheduled restart job, restart counter is at 2.
Dec 06 18:52:06 Framework systemd[1]: Started Greeter daemon.
Dec 06 18:52:06 Framework greetd[1029]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, run>
Dec 06 18:52:06 Framework greetd[1030]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: >
Dec 06 18:52:06 Framework greetd[1030]: pam_unix(greetd:session): session opened for user greeter(uid=964) by greeter(uid=0)
Dec 06 18:52:06 Framework greetd[1030]: pam_unix(greetd:session): session closed for user greeter
Dec 06 18:52:06 Framework greetd[1029]: error: check_children: greeter exited without creating a session
Dec 06 18:52:06 Framework systemd[1]: greetd.service: Deactivated successfully.
Dec 06 18:52:07 Framework systemd[1]: greetd.service: Scheduled restart job, restart counter is at 3.
Dec 06 18:52:07 Framework systemd[1]: Started Greeter daemon.
Dec 06 18:52:07 Framework greetd[1071]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, run>
Dec 06 18:52:07 Framework greetd[1073]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: >
Dec 06 18:52:07 Framework greetd[1073]: pam_unix(greetd:session): session opened for user greeter(uid=964) by greeter(uid=0)
Dec 06 18:52:08 Framework greetd[1073]: pam_unix(greetd:session): session closed for user greeter
Dec 06 18:52:08 Framework greetd[1071]: error: check_children: greeter exited without creating a session
Dec 06 18:52:08 Framework systemd[1]: greetd.service: Deactivated successfully.
Dec 06 18:52:09 Framework systemd[1]: greetd.service: Scheduled restart job, restart counter is at 4.
Dec 06 18:52:09 Framework systemd[1]: Started Greeter daemon.
Dec 06 18:52:09 Framework greetd[1110]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, run>
Dec 06 18:52:09 Framework greetd[1111]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: >
Dec 06 18:52:09 Framework greetd[1111]: pam_unix(greetd:session): session opened for user greeter(uid=964) by greeter(uid=0)
Dec 06 18:52:10 Framework greetd[1111]: pam_unix(greetd:session): session closed for user greeter
Dec 06 18:52:10 Framework greetd[1110]: error: check_children: greeter exited without creating a session
Dec 06 18:52:10 Framework systemd[1]: greetd.service: Deactivated successfully.
Dec 06 18:52:11 Framework systemd[1]: greetd.service: Scheduled restart job, restart counter is at 5.
Dec 06 18:52:11 Framework systemd[1]: greetd.service: Start request repeated too quickly.
Dec 06 18:52:11 Framework systemd[1]: greetd.service: Failed with result 'start-limit-hit'.
Dec 06 18:52:11 Framework systemd[1]: Failed to start Greeter daemon.

After downgrading to wlroots 0.16.2-2 and restarting Greetd, ReGreet comes right up.

I tested uninstalling wlroots altogether, but this also results in ReGreet failing to start even though it is not listed as a dependency.

wlroots0.16 is installed of course, as it is a dependency of cage, but this does not seem to be enough on its own. I will admit I don't fully understand the significance of the wlroots0.16 package.

Please let me know if there is anything I can do to help.

System:
  Kernel: 6.6.4-1-clear arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
  Desktop: sway v: 0.3.2 info: waybar vt: 1 dm: greetd Distro: Garuda Linux
    base: Arch Linux

greetd 0.9.0-3 
greetd-regreet 0.1.1-1

NixOS package not working

When I try to run ReGreet under NixOS I get the error

ERROR: Couldn't create log file '/var/log/regreet/log': Permission denied (os error 13)
thread 'main' panicked at 'Couldn't initialize greetd client: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/gui/model.rs:78:48
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I think (but I am not sure) that this is due to NixOS having a read only filesystem.

Background image is set to "fit" mode

Currently, an image with an aspect ratio different than the screen will be shrinked to fit, instead of filling the screen. Can we have an option that controls this behaviour?

Turning off and on the screen and exiting river/sway results in:

I'm not sure where to direct this, greetd or you, sorry about that.

Turning off and on the screen and exiting river results in:
info(wlroots): [libseat] [libseat/backend/seatd.c:70] Could not connect to socket /run/seatd.sock: No such file or directory
info(wlroots): [libseat] [libseat/seat.c:77] Backend 'sead' failed to open seat, skipping.

what causes this?

PAM Authenticate: AUTH_ERROR with correct password

On both NixOS and Endeavor OS, I have regreet installed and configured to run with Sway. However, upon login, I receive Login failed: Pam_authenticate: AUTH_ERROR despite entering my password. On NixOS, I am using the program.regreetd.enable = true option, which means I am using version 0.1.0. On Endeavor OS, I ran paru -S regreet-git and followed all basic configuration steps in the README to get it working with Sway.

How can i disable secondary and tertiary monitors in Sway with ReGreet?

/etc/greetd/config.toml:

command = "sway --config /etc/greetd/sway-config"

/etc/greetd/sway-config:

exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway
exec systemctl --user import-environment DISPLAY \
                                         SWAYSOCK \
                                         WAYLAND_DISPLAY \
                                         XDG_CURRENT_DESKTOP

exec hash dbus-update-activation-environment 2>/dev/null && \
     dbus-update-activation-environment --systemd DISPLAY \
                                                  SWAYSOCK \
                                                  XDG_CURRENT_DESKTOP=sway \
                                                  WAYLAND_DISPLAY
output DisplayPort-0 mode 2560x1440
output HDMI-A-0 power off
output DisplayPort-1 power off
exec "regreet --config /etc/greetd/regreet.toml; swaymsg exit"

(note: i merged /etc/sway.config.d/* into my sway-config file just to make sure it wasn't an issue with includes)

basically, DisplayPort-0 is my middle monitor, with DP-1 and HDMI-A-0 being side monitors. The default behavior is that ReGreet is displayed on the center monitor, with background applied (good) but the side panels are just blank gray.

this is not the worst outcome ever, but I'd prefer to turn off the side panels when ReGreet is running. however, the output commands in my sway-config don't seem to do anything.

is there somewhere else I can do this? swaymsg doesn't seem to do anything (even when setting SWAYSOCK to /var/run/greetd-XXX.sock) due to failure to connect to IPC

# swaymsg -s /var/run/greetd-1366.sock swaymsg output HDMI-A-O power off
00:00:03.011 [common/ipc-client.c:87] Unable to receive IPC response

Thanks!

Background image not showing

I have tried to set the path variable in the [background] to various images, both jpg and png, but to no avail - I only get a solid coloured background. Are there any requirements to this image? Should I try some override with a custom css? I use Arch, btw.

On first boot, clicking 'Login' causes sway to restart

okay so I'm running into a bit of a weird issue

basically when my computer boots for the first time (or reboots) and greetd starts and launches sway to display regreet, everything looks correct

however when I click the 'login' button the first time, it causes the entire login manager to appear to restart

the logs seem to reflect this:

-- Boot b2c3f5255f0a4b03a98346f39db0df29 --
Feb 16 11:46:55 solstice.echo.null systemd[1]: Started Greeter daemon.
Feb 16 11:46:55 solstice.echo.null greetd[740]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { >
Feb 16 11:46:55 solstice.echo.null greetd[748]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { comman>
Feb 16 11:46:55 solstice.echo.null greetd[748]: pam_unix(greetd:session): session opened for user greeter(uid=949) by greeter(uid=0)
Feb 16 11:47:04 solstice.echo.null greetd[1070]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { comma>
Feb 16 11:47:05 solstice.echo.null greetd[740]: error: check_children: greeter exited without creating a session
Feb 16 11:47:05 solstice.echo.null systemd[1]: greetd.service: Deactivated successfully.
Feb 16 11:47:06 solstice.echo.null systemd[1]: greetd.service: Scheduled restart job, restart counter is at 1.
Feb 16 11:47:06 solstice.echo.null systemd[1]: Started Greeter daemon.
Feb 16 11:47:06 solstice.echo.null greetd[1107]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: Specific(1), switch: true }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession {>
Feb 16 11:47:06 solstice.echo.null greetd[1108]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { comma>
Feb 16 11:47:06 solstice.echo.null greetd[1108]: pam_unix(greetd:session): session opened for user greeter(uid=949) by greeter(uid=0)
Feb 16 11:47:08 solstice.echo.null greetd[1199]: config: Config { file: ConfigFile { terminal: ConfigTerminal { vt: None, switch: false }, general: ConfigGeneral { source_profile: true, runfile: "/run/greetd.run" }, default_session: ConfigSession { comma>
Feb 16 11:47:10 solstice.echo.null greetd[1199]: pam_unix(greetd:session): session opened for user xxxx(uid=1001) by xxxx(uid=0)

what's extra strange is that it's only when i click the 'login' button: I can click the dropdown for my session, or edit the session, or edit the username, it all works fine.

i've tried with gtkgreet and it does not exhibit the same behavior

might anyone know what I should look at?

Apply GTK settings before the UI is visible

Currently, there's a brief pause from when the UI is visible but frozen, to when the gtk settings loads and the application unfreezes. This is especially noticeable when using application_prefer_dark_theme (which IMO should default to true, it's not a good user experience to go from a dark console to a completely white screen, but I digress), because it flashes the screen with white then goes to dark, which is very jarring.

I'm not familiar with Relm4 but I can try to make a PR (although without #30 it sounds very painful).

Custom css

Being able to add custom css like in gtkgreet would be cool.

[Feature] Optionally load libadwaita and use libadwaita widgets

Allow optional support libadwaita, there are two levels for this:

  1. Calling libadwaita::init at the start of the application
  2. Using appropriate libadwaita widgets

Ideally this would be exposed as a use_libadwaita option under the GTK section, but this doesn't seem realistic since weak linking isn't support in rust currently and probably not anything soon, and dynamically loading manually seems very hard and seems like it wouldn't work at all with the rust wrapper for it. Having it as a cargo feature and selection it at compile time seems a lot simpler, and I can make a PR for level 1 if this is wanted.

Session list is empty

The list is empty and unclickable, so I'm assuming it's not being read properly, as the /etc/greetd/environments file gets picked up by gtkgreet. Typing one manually works.

Sway doesn't behave properly when ran through regreet

Just want to start by saying I am a little new at linux, but I'm pretty sure I'm doing everything right here.

Basically, in my sway config file, i have it execute a script called test which is in my /tmp/ directory (full permissions). I also have the permissions set to rwx for everyone. The only thing this script does, is make a file in my /tmp/ directory called 111. That's it. The purpose is just to see if the script is being run (ran?)

On startup, when Arch launches, this script will never be run. No matter what I do, I cannot get sway to run scripts. I've tried everything. Absolute paths, going to background, making a script launch another script, adding a delay, giving perms, etc. I've given superuser to greeter, I've given root to greeter, and nothing works.

When i launch sway normally (just by typing sway in a terminal), it all works fine though.

Before you ask,

Yes the config files are the same. When I make a change like changing the font size in that config file, the font size will change, but it just wont run exec command. Yes I've set proper permissions. Yes I'm sure the script is not working because I have another script in the sway config file that changes the background, which also doesn't work when loaded through regreet, but does through terminal.

Here's my /etc/greetd/config.toml file:

terminal]
vt = 1

[default_session]
command = "sway --config /etc/greetd/sway-config"
user = "greeter"

And here's my /etc/greetd/sway-config fle

exec "regreet; swaymsg exit"
include /home/username/.config/sway/config

the $HOME/.config/sway/config file is the one I'm trying to run the script in, but I've also tried running it in the config.toml file and the sway-config file to no avail. I've followed all the installation instructions on the regreet readme page, so I'm not sure what I could be doing wrong, other than this being a bug.

FR: NixOS package

NixOS has supported greetd for a while but lacks "good" looking greeters. Adding ReGreet as a package will be appreciated.
Due to the nature of NixOS, it is sometimes difficult to add a package such as login managers. So, I don't expect this issue to be solved right away, but I'm willing to try. Any external help is appreciated.

Support for clamshell mode laptops?

Hello, when at home I typically use my laptop in clamshell mode, where the laptop itself is closed and I use an external monitor as my primary monitor. I've tried using ReGreet lately, and while I like it, the (unused) laptop screen seems to be set as primary, and so I cannot actually see the login screen.

Would it be possible to add support for such a laptop setup? I have no experience in this kind of application, but I was wondering if it could be as simple as setting a primary screen in settings, or something to that effect?

Changing reboot and poweroff commands using the config file

The Reboot and Shutdown buttons do not function on Void Linux because it uses a different command to shutdown and reboot loginctl reboot and loginctl poweroff

a simple fix is to allow the user to change the command executed by the buttons in the ReGreet config file.

Set window size option

Hi!
I would like to have an option to set the window size either in the config or as commandline argument.
Being able to set the window location when that wayland protocol arrives would be nice as well.

This is because I am using tinywl as compositor for regreet. It opens regreet as window on my laptop, which is smaller, but regreet is sized to the size of my external monitor. So I tried without any background image. That made the window small, but smaller than the 'popup' for user and session. I had to resize it to see the total thing.

I will try to make some screenshots and attach those in a moment.

tinywl didn't support screenshots, but I took 2 photos with my phone. Here they are:
20231117_152250
(No background: window to small)
20231117_152508
(with background: window to big)

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.