Compare commits
3 Commits
3f7012a3ae
...
50cc2b87ac
Author | SHA1 | Date |
---|---|---|
David Thurstenson | 50cc2b87ac | |
David Thurstenson | 1d4ab0277b | |
David Thurstenson | 16a0a6032d |
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: Greetd
|
||||
description:
|
||||
published: false
|
||||
date: 2024-03-09T01:26:21.021Z
|
||||
published: true
|
||||
date: 2024-03-09T02:49:24.073Z
|
||||
tags:
|
||||
editor: markdown
|
||||
dateCreated: 2024-03-09T01:26:21.021Z
|
||||
|
@ -10,33 +10,59 @@ dateCreated: 2024-03-09T01:26:21.021Z
|
|||
|
||||
# Kiosk mode
|
||||
|
||||
`greetd` is great for running one full-size app started at boot with the help of [`cage`](https://www.hjdskes.nl/projects/cage/). Here are some examples
|
||||
`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 |
|
||||
|
||||
## Running a browser tab/window
|
||||
|
||||
## Running `bpytop`
|
||||
## Running `bpytop` (or any other terminal program) {.tabset}
|
||||
|
||||
[`bpytop`](https://github.com/aristocratos/bpytop) is a great little resource monitor. I have a server with a
|
||||
[`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}
|
||||
|
||||
|
||||
### Method 1: Direct to the VT
|
||||
|
||||
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.
|
||||
|
||||
Regardless, here's how to configure `greetd` to do that:
|
||||
|
||||
`/etc/greetd/config.toml`:
|
||||
```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]
|
||||
command = "bpytop"
|
||||
user = "thurstylark"
|
||||
```
|
||||
|
||||
# `agreety` is the bundled agetty/login-lookalike. You can replace `/bin/sh`
|
||||
# with whatever you want started, such as `sway`.
|
||||
#command = "agreety --cmd /bin/sh"
|
||||
### Method 2: Using `fbterm`
|
||||
|
||||
#command = "fbterm -- bpytop"
|
||||
[`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
|
||||
[default_session]
|
||||
command = "fbterm -- bpytop"
|
||||
user = "thurstylark"
|
||||
```
|
||||
|
||||
This should give you more flexibility with font sizing and configuration through `fbterm`'s [configuration file](https://wiki.archlinux.org/title/Fbterm#Configuration_file).
|
||||
|
||||
|
||||
### Method 3: Using `cage` and a graphical terminal emulator
|
||||
|
||||
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.
|
||||
|
||||
`/etc/greetd/config.toml`:
|
||||
```toml
|
||||
[default_session]
|
||||
command = "cage -s -- alacritty -e bpytop"
|
||||
|
||||
# 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 = "thurstylark"
|
||||
|
||||
```
|
Loading…
Reference in New Issue