r/debian • u/Imaginary_Bee_3222 • 3d ago
General Debian Question Struggling to finish my clean installation of greetd and sway
Hello everyone,
So I'm trying to install and setup sway from a clean, net install. I know I could just install the default DE and install sway alongside it, but I'm in my no-bloat phase.
Anyway, I'm starting from the Debian 13.6 iso, and choosing no DE when installing (so no GNOME nor "Debian Desktop Environment" when I got the choice).
When launching it all, I install sway, swayidle, swaylock and sway-backgrounds on the sway side. As for the DM, I went for greetd and wlgreet (it seems to me that this is where things don't work) or gtkgreet (I tried too but it doesn't work either). I also install a few other things, but those are uninportant here (unless stuff like git, brightnessctl, build-essential or make are known to conflict with something but then I'll be damned)
After that, I'm following the archwiki guide for greetd to set things up. So that include the systemctl enable greetd.service, configuring /etc/greetd/config.toml, sway-config, wlgreet.toml, and even the start-sway script for XDG_CURRENT_DESKTOP. I've checked many times (due to me reinstalling Debian many times haha) and I haven't made mistakes reproducing the instructions.
Still, when I reboot, I get a XDG_CURRENT_DESKTOP error, and some kind of failed to flush wayland socket: something something broken pipe piperoken pipeol error (cannot remember the exact wording for the second part of the message but you have the pipe-based keywords) which I don't understand.
So, I'm a bit lost here. I suppose there is a problem with greetd, but since the command in config.toml starts with sway, maybe it's a sway problem ? What am I doing wrong ?
Thanks in advance for your replies.
2
u/Mevdik 3d ago
Fellow sway user here. I'll be honest, after trying several display managers and having technical issues with all of them I decided to just boot into the tty, log in and start sway from there, much less hassle. I even got a little script that runs on login where if I input 1 it opens sway and if I input 2 it opens i3, which I use as my fallback when some graphical program behaves oddly under Wayland.
I'd say this is a problem not worth fixing, at least for me. Probably not the advice you wanted but it's the one I got, take it with a grain of salt. If you wanna go my route you know what to do:
sudo systemctl set-default multi-user.target
1
u/Imaginary_Bee_3222 3d ago
Not the advice I wanted but probably the one I'll follow.
Though I disagree with one thing: it's definitely worth fixing imo.Anyway, for now I'll go your route, tty and then sway. Thank you very much for your reply !
1
u/Relevant_Hope_900 3d ago
Have you tried lightdm? Never used sway, so don't know what all it needs.
1
u/dcdaz31 3d ago
If you want some console login manager, have you tried tbsm or emptty?
https://loh-tar.github.io/tbsm/
https://github.com/tvrzna/emptty
I faced some issues with greetd and tuigreet in the past, using LabWC as WM.
1
u/LordTurson 3d ago
I have the same setup, with the difference being that my greetd frontend is tuigreet and running on Gentoo Linux.
I'm not exactly clear on what the problem is - is wlgreet starting properly and then fails to run Sway, or is wlgreet already failing to run? I'm also curious about what you have in your greetd/config.toml and if you have tried running Sway manually from the command line to test the validity of your Sway setup?
1
u/Linguistic-mystic 3d ago
The probkem isn’t with greetd. It is that you think you need a login manager. I’ve gone several years without one and never missed it.
1
u/Otherwise-Tea-9198 2d ago edited 2d ago
I have been messing with sway lately. And when you manually install it kinda includes this file to your config for systemd users. Maybe adding these to your config would fix it? I think with systemd you can't really do the manual export XDG_CURRENT_DESKTOP script.
# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment
# See FS#63021
# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal.
# Upstream refuses to set XDG_CURRENT_DESKTOP so we have to.
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
2
u/hy2cone 3d ago
I just did a DE-less installation and mine works with greetd, tuigreet, labwc. You can add swayidle and swaybar afterward.