「Greetd」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(一部翻訳)
8行目: 8行目:
 
[https://git.sr.ht/~kennylevinsen/greetd greetd] は、コンソールベースであれグラフィカルであれ、ユーザが何を起動したいのかを仮定しない、軽量で柔軟な [https://wiki.archlinux.jp/index.php/%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%83%9E%E3%83%8D%E3%83%BC%E3%82%B8%E3%83%A3 login manager] デーモンです。コンソールから起動できるスクリプトやプログラムはすべて greetd で起動できるので、 [[Wayland#Compositors|Wayland Compositors]] に特に適しています。[[#Greeters|greeter]] を起動して、他のディスプレイマネージャと同様にユーザセッションを開始することもできます。
 
[https://git.sr.ht/~kennylevinsen/greetd greetd] は、コンソールベースであれグラフィカルであれ、ユーザが何を起動したいのかを仮定しない、軽量で柔軟な [https://wiki.archlinux.jp/index.php/%E3%83%87%E3%82%A3%E3%82%B9%E3%83%97%E3%83%AC%E3%82%A4%E3%83%9E%E3%83%8D%E3%83%BC%E3%82%B8%E3%83%A3 login manager] デーモンです。コンソールから起動できるスクリプトやプログラムはすべて greetd で起動できるので、 [[Wayland#Compositors|Wayland Compositors]] に特に適しています。[[#Greeters|greeter]] を起動して、他のディスプレイマネージャと同様にユーザセッションを開始することもできます。
   
== Installation ==
+
== インストール ==
   
[[Install]] the {{AUR|greetd}} or {{AUR|greetd-git}} packages.
+
{{AUR|greetd}} または {{AUR|greetd-git}} パッケージを [[インストール]] します。
   
 
== Configuration ==
 
== Configuration ==

2021年6月8日 (火) 23:08時点における版

関連記事

greetd は、コンソールベースであれグラフィカルであれ、ユーザが何を起動したいのかを仮定しない、軽量で柔軟な login manager デーモンです。コンソールから起動できるスクリプトやプログラムはすべて greetd で起動できるので、 Wayland Compositors に特に適しています。greeter を起動して、他のディスプレイマネージャと同様にユーザセッションを開始することもできます。

インストール

greetdAUR または greetd-gitAUR パッケージを インストール します。

Configuration

The default configuration file is /etc/greetd/config.toml. PAM-specific options should be set in /etc/pam.d/greetd.

Greeters

In order to allow user sessions to be started, greetd can launch a greeter. Several greeters are available:

By default, greeters are run as the greeter user. This can be changed by editing the user option in the default_session section of the configuration file and replacing another_user with the chosen user:

 ...
 user = "another_user"
 ...

Make sure the ownership of the /etc/greetd directory is set accordingly.

agreety

In order to launch a normal console session with agreety, edit the configuration file as follows:

 ...
 [default_session]
 command = "agreety --cmd $SHELL"
 ...

agreety can launch any arbitrary command once a user logs in. For example, in order to start Sway, replace $SHELL in the example above with sway.

gtkgreet

In order to run, gtkgreet needs a compositor. It is recommended to use Sway, but cage can also be used. Make sure the compositor you would like to use is installed before starting greetd. If you want to use cage, your [default_session] section should be:

 ...
 [default_session]
 command = "cage gtkgreet"
 ...

If you want to use Sway, the greeter must be terminated once the user logs in. For that purpose, a specific configuration file must be created for Sway, for example in /etc/greetd/sway-config, with the following content:

 # `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
 exec "gtkgreet -l; swaymsg exit"
 
 bindsym Mod4+shift+e exec swaynag \
 -t warning \
 -m 'What do you want to do?' \
 -b 'Poweroff' 'systemctl poweroff' \
 -b 'Reboot' 'systemctl reboot'
 
 include /etc/sway/config.d/*

Then, gtkgreeter must be set to start Sway with the configuration file above:

 ...
 [default_session]
 command = "sway --config /etc/greetd/sway-config"
 ...

In order to specify which login environments can be started by gtkgreet, list them in /etc/greetd/environments. For example:

 sway
 bash

Instead, you can also invoke gtkgreet with the -c mycommand parameter, replacing mycommand with the desired program (for example, bash or sway) either in /etc/greetd/config.toml, if you use Cage, or in /etc/greetd/sway-config, if you use Sway.

wlgreet

In order for greetd to start wlgreet, follow the steps required to set up gtkgreet with Sway as described above with the following /etc/greetd/sway-config instead:

 exec "wlgreet --command sway; swaymsg exit"
 
 bindsym Mod4+shift+e exec swaynag \
 -t warning \
 -m 'What do you want to do?' \
 -b 'Poweroff' 'systemctl poweroff' \
 -b 'Reboot' 'systemctl reboot'
  
 include /etc/sway/config.d/*

tuigreet

tuigreet does not require any special setup, just refer to it in /etc/greetd/config.toml:

...
[default_session]
command = "tuigreet --cmd sway"
...

tuigreet --help will display customization options.

Autologin

If you want a user to be logged in automatically, an initial session must be defined in the configuration file:

 [default_session]
 command = "cage gtkgreet"
 
 [initial_session]
 command = "sway"
 user = "myuser"

The command option may contain the name of any executable file. In the example above, Sway will be started by myuser at boot and gtkgreet will be launched after the user logs out.

If you don't want to use greetd and always want autologin to be enabled, see autologin.

Starting greetd at boot

Enable greetd.service for greetd to be started at boot.

See also