Introduction
Let me ask you a question: if you were building a lightweight Linux desktop, which display, or login, manager would you choose? And would it really be as lightweight as you expected? I spent a few weeks trying out different display managers. I didn’t settle on LightDM, SDDM, or any of the other well-known options. I chose greetd instead.
Many of you may not have heard of greetd, and that’s okay. I stumbled across it by chance, too. For an X11 setup, I’d normally use the slim-fork display manager, but I found it didn’t work well with Wayland. Looking for a lightweight option for my Wayland setup led me to greetd.
The greetd project describes it as “a minimal and flexible login manager daemon that makes no assumptions about what you want to launch.” That sounded perfect for what I had in mind.
One thing to be aware of: unlike SDDM, greetd lets you choose a separate greeter, much like LightDM. Its default greeter, agreety, is text-based. So I’ll use gtkgreet for a graphical login screen.
In this post, I’ll walk through the steps to get greetd working on a base Arch installation, with the labwc compositor, which I used in a previous post. I’ll include links to my earlier posts at the end of this article, for anyone interested.
How This is going to Work
Before we get too far, I want to explain how this setup will work and how I’ll handle a few potential issues.
The greetd program is essentially the backend: it manages the login process but relies on a separate greeter for the user interface. Its default greeter, agreety, is text-based and looks much like a console login. It only needs a console to run.
I want a graphical login screen, so I’ll also install gtkgreeter. The catch is that gtkgreeter needs an active display, which means it must run inside a window manager or compositor.
I could use labwc, since it’s the window manager I plan to use for the desktop. But that would mean starting a labwc greeter session, shutting it down cleanly after login, and then starting a fresh labwc session for the desktop.
Instead, I’ll add a second compositor: cage, a simple compositor designed for kiosk-style use. I can run gtkgreeter inside cage, then close both after login and start labwc for the desktop.
Installing a second compositor might seem counterintuitive, but this approach keeps the login and desktop sessions separate, making the setup cleaner and easier to maintain.
Install
The setup I am starting with is based on two previous posts; Arch Plus BTRFS Install, and Labwc on Base Arch install. You can read them if you are interested in how I got to the current state of the system I am using.
I power up and log into my Virtual Machine, running on Vert-Manager. And I need to install a few programs. Since this is Arch I will be using pacman with the -Syu options. This will update the repository database, and software while installing the needed packages.
sudo pacman -Syu greetd greetd-gtkgreet cage
if you have read the previous posts, I want to note that I will be working in the /etc directory, as this is going to be a system wide configuration, and it will require sudo.
Configuration
I will configure greetd and gtkgreet next. Before changing any existing configuration, make a backup:
sudo cp /etc/greetd/config.toml /etc/greetd/config.toml.bak
I’ll place the gtkgreet stylesheet and environments files in /etc/greetd as well. Create the gtkgreet.css file and add the below css:
sudo nano /etc/greetd/gtkgreet.css
window {
background-color: #673458;
}
Next, create the gtkgreet environments file. It lists the session options shown at login. In this setup, the only option is labwc:
sudo nano /etc/greetd/environments
labwc
Now edit the greetd configuration:
sudo nano /etc/greetd/config.toml
[terminal]
vt = 1
[default_session]
command = "cage -s -- sh -c 'wlr-randr --output Virtual-1
--mode 1920x1080 --scale 1
&& exec gtkgreet --style /etc/greetd/gtkgreet.css'"
user = "greeter"
The [terminal] section selects the virtual terminal, or VT, for the greeter. VT 1 is used here.
The [default_session] section defines the greeter session. The command starts cage, sets the display mode with wlr-randr, then launches gtkgreet with its style sheet. Replace Virtual-1 if your system uses a different output name. The user setting specifies greeter, an account that was created during install and runs the greeter.
Steps to Reboot
Before rebooting, test that gtkgreet opens and reads its stylesheet, and environments. Start labwc, if not running already, open the terminal, and run:
gtkgreet –style /etc/greetd/gtkgreet.css
The gtkgreet requires a running Wayland compositor, such as labwc or Cage. Check that the window has the expected background color and that labwc appears in the environment list.
Once the configuration is ready, enable greetd so it starts automatically at boot:
sudo systemctl enable greetd
Then reboot and check that the greeter starts as expected. If it fails, you may lose access to the graphical login. A VM may provide a console you can use to troubleshoot. In the case of this VM, I set ssh up back in the original posts, so I can long in that way if necessary. On bare metal, you can boot from live media and inspect the configuration, provided you can access the disk.
Remove the Greeter Bar
With the basic setup working, it’s time to start tweaking it. First, I want to remove the bar at the top of the screen that says “Greeter.”
That bar comes from cage, not gtkgreet. cage’s -d option disables window decorations, including the Greeter bar. To remove it, edit /etc/greetd/config.toml and change the Cage command from cage -s to cage -sd.
That’s it, the Greeter bar should be gone.
Add Terminal Only Login
Sometimes you may want a terminal session without choosing a desktop environment at login. I use this occasionally. To add one, put a command in the environments file in /etc/greetd.
The file can launch commands directly. For example, labwc is the command used to start labwc from a terminal. I don’t want to log in to a plain console, though, because I still want mouse support. Instead, I’ll launch the foot terminal emulator.
Foot needs a compositor, in this case, either labwc or Cage. I also want to set the screen resolution to 1920×1080 before foot starts. Putting all of that into one command would make the entry unwieldy in the gtkgreet menu, so I’ll use a Bash script.
I checked my PATH environment variable and found /usr/local/bin in it. The directory was empty, making it a convenient place for the script. There it can be found without specifying the full path.
echo $PATH
I noted the /usr/local/bin folder was in the path. And when I listed the content, I saw it was empty. The perfect place. Since it is in the path it will be searched automatically and I don’t have to worry about specifying a path of any sort.
Now I needed to decide what to do. This came down to three things: start a compositor (cage is all I need in this case), set the screen resolution (1920×1080), and then start the foot terminal emulator.
I built an executable script file called Terminal-Foot, which will be what appears in the gtkgreet drop down box.
sudo nano /usr/local/bin/Terminal-Foot
#!/bin/bash
exec cage -sd -- sh -c 'wlr-randr --output Virtual-1
--mode 1920x1080 --scale 1
&& exec foot'
sudo chmod +x /usr/local/bin/ATerminal-Foot
This command should look familiar from the greetd config.toml file. Add the script name to /etc/greetd/environments file. Be sure the capitalization matches the script’s filename. After restarting the login service, I tested the new option by logging in to a foot-only session.
For the future I want to add shutdown and reboot scripts as well.
Epilogue
At this point, greetd should be running with gtkgreet. You’ve created multiple login options, including a window manager session and a terminal-only session, and added a style-sheet to customize gtkgreet.
That means I’ve met the main objectives of this project. But if you’re feeling adventurous, there’s plenty more you can do.
Even a simple style-sheet like gtkgreeter.css offers lots of ways to customize the greeter. For example, replace background-color with background-image to use your own artwork as the background.
The entire system is using about 5 GB of disk space, which makes this a pretty lightweight install. Where you go from here is up to you. You built the system, so you should now be familiar with how it works. Add applications and adjust things to suit your workflow.
These posts aren’t a formal series, but together they’ll take you from an empty drive to the setup you’ve seen here. Read them in this order: “Arch Plus BTRFS Install,” “Labwc on Base Arch Install,” and this one “Arch GreetD Display Manager Install.”
Let me know in the comments if you’d like to see more general or specific customization’s for this system. And if you got something out of this video, please like, subscribe, leave a comment, and recommend it to others.
Until next time!



Leave a Reply