1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 04:42:05 -04:00

feat: DMS Greeter packaging for Debian/OpenSUSE on OBS

This commit is contained in:
purian23
2026-02-22 15:44:42 -05:00
committed by bbedward
parent ca44205f1c
commit b14b0946e2
15 changed files with 951 additions and 123 deletions

View File

@@ -7,7 +7,7 @@ A greeter for [greetd](https://github.com/kennylevinsen/greetd) that follows the
- **Multi user**: Login with any system user
- **dms sync**: Sync settings with dms for consistent styling between shell and greeter
- **Multiple compositors**: Supports niri, Hyprland, Sway, or mangowc.
- **Custom PAM**: Supports custom PAM configuration in `/etc/pam.d/dankshell`
- **Custom PAM**: Supports custom PAM configuration in `/etc/pam.d/greetd`
- **Session Memory**: Remembers last selected session and user
## Installation
@@ -22,11 +22,32 @@ paru -S greetd-dms-greeter-git
yay -S greetd-dms-greeter-git
```
Once installed, disable any existing display manager and enable greetd:
### Debian / openSUSE
Official packages are available from the [DankLinux OBS repository](https://software.opensuse.org/download/package?package=dms-greeter&project=home%3AAvengeMedia%3Adanklinux). Add the repo for your distribution and install:
```bash
sudo systemctl disable gdm sddm lightdm
sudo systemctl enable greetd
# Debian 13
sudo apt install dms-greeter # after adding the repo
# openSUSE Tumbleweed
zypper install dms-greeter # after adding the repo
```
See the [Installation guide](https://danklinux.com/docs/dankgreeter/installation) for full repository setup.
If you previously installed manually, remove legacy files first:
```bash
sudo rm -f /usr/local/bin/dms-greeter
sudo rm -rf /etc/xdg/quickshell/dms-greeter
```
Then complete setup:
```bash
dms greeter enable
dms greeter sync
```
#### Syncing themes (Optional)
@@ -79,43 +100,32 @@ The package automatically:
- Sets up directories and permissions
- Configures greetd with auto-detected compositor
- Applies SELinux contexts
- Installs the `dms-greeter-sync` helper script
Then disable existing display manager and enable greetd:
Then complete setup:
```bash
sudo systemctl disable gdm sddm lightdm
sudo systemctl enable greetd
dms greeter enable
dms greeter sync
```
#### Syncing themes (Optional)
The RPM package includes the `dms-greeter-sync` helper for easy theme syncing:
Run:
```bash
dms-greeter-sync
dms greeter sync
```
Then logout/login to see your wallpaper on the greeter!
<details>
<summary>What does dms-greeter-sync do?</summary>
The `dms-greeter-sync` helper automatically:
- Adds you to the greeter group
- Sets minimal ACL permissions on parent directories (traverse only)
- Sets group ownership on your DMS config directories
- Creates symlinks to share your theme files with the greeter
This uses standard Linux ACLs (Access Control Lists) - the same security model used by GNOME, KDE, and systemd. The greeter user only gets traverse permission through your directories and can only read the specific theme files you share.
</details>
Then logout/login to see your wallpaper on the greeter.
### Automatic
The easiest thing is to run `dms greeter install` or `dms` for interactive installation.
On Debian/openSUSE, this now prefers the `dms-greeter` package when the OBS repo is configured.
### Manual
### Manual (fallback only)
Use this only if no package is available for your distro.
1. Install `greetd` (in most distro's standard repositories) and `quickshell`
@@ -211,7 +221,7 @@ vt = 1
[default_session]
user = "greeter"
command = "/usr/local/bin/dms-greeter --command niri"
command = "/usr/bin/dms-greeter --command niri"
```
### Manual usage
@@ -234,7 +244,7 @@ Simply edit `/etc/greetd/dms-niri.kdl` or `/etc/greetd/dms-hypr.conf` to change
The greeter can be personalized with wallpapers, themes, weather, clock formats, and more - configured exactly the same as dms.
**Easiest method:** Run `dms-greeter-sync` to automatically sync your DMS theme with the greeter.
**Easiest method:** Run `dms greeter sync` to automatically sync your DMS theme with the greeter.
**Manual method:** You can manually synchronize configurations if you want greeter settings to always mirror your shell:

View File

@@ -35,6 +35,14 @@ Examples:
EOF
}
require_command() {
local cmd="$1"
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Error: required command '$cmd' was not found in PATH" >&2
exit 1
fi
}
while [[ $# -gt 0 ]]; do
case $1 in
--command)
@@ -107,14 +115,23 @@ export DMS_GREET_CFG_DIR="$CACHE_DIR"
mkdir -p "$CACHE_DIR"
QS_CMD="qs"
if command -v qs >/dev/null 2>&1; then
QS_BIN="qs"
elif command -v quickshell >/dev/null 2>&1; then
QS_BIN="quickshell"
else
echo "Error: neither 'qs' nor 'quickshell' was found in PATH" >&2
exit 1
fi
QS_CMD="$QS_BIN"
if [[ "$DMS_PATH" == /* ]]; then
QS_CMD="qs -p $DMS_PATH"
QS_CMD="$QS_BIN -p $DMS_PATH"
else
RESOLVED_PATH=$(locate_dms_config "$DMS_PATH")
if [[ $? -eq 0 && -n "$RESOLVED_PATH" ]]; then
echo "Located DMS config at: $RESOLVED_PATH" >&2
QS_CMD="qs -p $RESOLVED_PATH"
QS_CMD="$QS_BIN -p $RESOLVED_PATH"
else
echo "Error: Could not find DMS config '$DMS_PATH' (shell.qml) in any valid config path" >&2
exit 1
@@ -123,6 +140,7 @@ fi
case "$COMPOSITOR" in
niri)
require_command "niri"
if [[ -z "$COMPOSITOR_CONFIG" ]]; then
TEMP_CONFIG=$(mktemp)
# base/default config
@@ -178,6 +196,10 @@ NIRI_EOF
;;
hyprland)
if ! command -v start-hyprland >/dev/null 2>&1 && ! command -v Hyprland >/dev/null 2>&1; then
echo "Error: neither 'start-hyprland' nor 'Hyprland' was found in PATH" >&2
exit 1
fi
if [[ -z "$COMPOSITOR_CONFIG" ]]; then
TEMP_CONFIG=$(mktemp)
cat > "$TEMP_CONFIG" << HYPRLAND_EOF
@@ -207,6 +229,7 @@ HYPRLAND_EOF
;;
sway)
require_command "sway"
if [[ -z "$COMPOSITOR_CONFIG" ]]; then
TEMP_CONFIG=$(mktemp)
cat > "$TEMP_CONFIG" << SWAY_EOF
@@ -226,6 +249,7 @@ SWAY_EOF
;;
scroll)
require_command "scroll"
if [[ -z "$COMPOSITOR_CONFIG" ]]; then
TEMP_CONFIG=$(mktemp)
cat > "$TEMP_CONFIG" << SCROLL_EOF
@@ -245,6 +269,7 @@ SCROLL_EOF
;;
miracle|miracle-wm)
require_command "miracle-wm"
if [[ -z "$COMPOSITOR_CONFIG" ]]; then
TEMP_CONFIG=$(mktemp)
cat > "$TEMP_CONFIG" << MIRACLE_EOF
@@ -264,6 +289,7 @@ MIRACLE_EOF
;;
labwc)
require_command "labwc"
if [[ -n "$COMPOSITOR_CONFIG" ]]; then
exec labwc --config "$COMPOSITOR_CONFIG" --session "$QS_CMD"
else
@@ -272,6 +298,7 @@ MIRACLE_EOF
;;
mango|mangowc)
require_command "mango"
if [[ -n "$COMPOSITOR_CONFIG" ]]; then
exec mango -c "$COMPOSITOR_CONFIG" -s "$QS_CMD && mmsg -d quit"
else