anvil: properly document logind support
This commit is contained in:
parent
1627d51cf6
commit
e4f1872a43
11
README.md
11
README.md
|
@ -32,7 +32,9 @@ Like others, Smithay as a compositor library has its own sample compositor: anvi
|
||||||
You can run it with cargo after having cloned this repository:
|
You can run it with cargo after having cloned this repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
cargo run -p anvil -- --{backend}
|
cd anvil;
|
||||||
|
|
||||||
|
cargo run -- --{backend}
|
||||||
```
|
```
|
||||||
|
|
||||||
The currently available backends are:
|
The currently available backends are:
|
||||||
|
@ -41,4 +43,9 @@ The currently available backends are:
|
||||||
inside of an other X11 or Wayland session.
|
inside of an other X11 or Wayland session.
|
||||||
- `--tty-udev`: start anvil in a tty with udev support. This is the "traditional" launch of a Wayland
|
- `--tty-udev`: start anvil in a tty with udev support. This is the "traditional" launch of a Wayland
|
||||||
compositor. Note that this requires you to start anvil as root if your system does not have logind
|
compositor. Note that this requires you to start anvil as root if your system does not have logind
|
||||||
available ([consolekit support is planned](https://github.com/Smithay/smithay/issues/95)).
|
available ([consolekit support is planned](https://github.com/Smithay/smithay/issues/95)). To use logind,
|
||||||
|
you need to activate the associated cargo feature:
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo run --features logind -- --tty-udev
|
||||||
|
```
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
use std::env::var;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
if !var("CARGO_FEATURE_LOGIND").ok().is_some() {
|
||||||
|
println!("cargo:warning=You are compiling anvil without logind support.");
|
||||||
|
println!("cargo:warning=This means that you'll likely need to run it as root if you want to launch it from a tty.");
|
||||||
|
println!("cargo:warning=To enable logind support add `--feature logind` to your cargo invocation:");
|
||||||
|
println!("cargo:warning=$ cd anvil; cargo run --feature logind");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue