tlwiki-wikijs/dotfiles/greetd.md

69 lines
2.2 KiB
Markdown
Raw Normal View History

2024-03-09 01:26:23 +00:00
---
title: Greetd
description:
2024-03-09 02:47:51 +00:00
published: true
2024-03-09 03:01:59 +00:00
date: 2024-03-09T03:01:57.900Z
2024-03-09 01:26:23 +00:00
tags:
editor: markdown
dateCreated: 2024-03-09T01:26:21.021Z
---
# Kiosk mode
2024-03-09 02:47:42 +00:00
`greetd` is great for running one full-size app started at boot with the help of [`cage`](https://www.hjdskes.nl/projects/cage/).
### Prerequisites
| Package | Description | Required? |
| -- | -- | -- |
| `cage` | Wayland compositor that forces one full-screen window | Yes |
| `polkit` | System privilege control | Required if not using seatd service |
| `xorg-server-xwayland` | X11 support | No |
2024-03-09 03:01:59 +00:00
{.dense}
2024-03-09 01:26:23 +00:00
## Running a browser tab/window
2024-03-09 02:51:48 +00:00
## Running `bpytop` (or any other terminal program)
2024-03-09 02:47:42 +00:00
[`bpytop`](https://github.com/aristocratos/bpytop) is a great little resource monitor. I have a server with a small display that doesn't do much but show a login screen all day, and I figured why not just have the display run a resource monitor?
> Don't forget to [fix the graphs](/dotfiles/bpytop#fix-the-graphs) {.is-info}
2024-03-09 02:51:48 +00:00
### Tabs {.tabset}
#### Method 1: Direct to the VT
2024-03-09 01:26:23 +00:00
2024-03-09 02:47:42 +00:00
You can launch any program directly to the VT and skip the X server or Wayland compositor nonsense. However, keep in mind that the VT can be pretty limited when it comes to the features we expect from a modern terminal program.
2024-03-09 01:26:23 +00:00
2024-03-09 02:47:42 +00:00
Regardless, here's how to configure `greetd` to do that:
`/etc/greetd/config.toml`:
2024-03-09 01:26:23 +00:00
```toml
2024-03-09 02:47:42 +00:00
[default_session]
command = "bpytop"
user = "thurstylark"
```
2024-03-09 02:51:48 +00:00
#### Method 2: Using `fbterm`
2024-03-09 01:26:23 +00:00
2024-03-09 02:47:42 +00:00
[`fbterm`](https://wiki.archlinux.org/title/Fbterm) is a **f**rame **b**uffer **term**inal emulator which basically boils down to being a better VT.
`/etc/greetd/config.toml`:
```toml
2024-03-09 01:26:23 +00:00
[default_session]
2024-03-09 02:47:42 +00:00
command = "fbterm -- bpytop"
user = "thurstylark"
```
2024-03-09 01:26:23 +00:00
2024-03-09 02:47:42 +00:00
This should give you more flexibility with font sizing and configuration through `fbterm`'s [configuration file](https://wiki.archlinux.org/title/Fbterm#Configuration_file).
2024-03-09 01:26:23 +00:00
2024-03-09 02:51:48 +00:00
#### Method 3: Using `cage` and a graphical terminal emulator
2024-03-09 02:47:42 +00:00
This will be less performant than the other methods, but will afford you many more features. This is the method I actually use for this use-case.
2024-03-09 02:49:25 +00:00
`/etc/greetd/config.toml`:
2024-03-09 02:47:42 +00:00
```toml
[default_session]
command = "cage -s -- alacritty -e bpytop"
2024-03-09 01:26:23 +00:00
user = "thurstylark"
```