OSDN Git Service

[change] : Renamed _systemctl_service to _safe_systemctl
[alterlinux/alterlinux.git] / modules / gdm / airootfs.any / root / customize_airootfs_gdm.sh
1 #!/usr/bin/env bash
2 #
3 # Yamada Hayao
4 # Twitter: @Hayao0819
5 # Email  : hayao@fascode.net
6 #
7 # (c) 2019-2021 Fascode Network.
8 #
9
10 # Enable gdm to auto login
11 if [[ "${boot_splash}" =  true ]]; then
12     _safe_systemctl enable gdm-plymouth.service
13     
14 else
15     _safe_systemctl enable gdm.service
16 fi
17
18
19 # Replace auto login user
20 sed -i "s/%USERNAME%/${username}/g" "/etc/gdm/custom.conf"
21
22
23 # Remove file for japanese input
24 if [[ ! "${language}" = "ja" ]]; then
25     sed -i "s/export GTK_IM_MODULE=fcitx/#export GTK_IM_MODULE=fcitx/g" "/etc/environment"
26     sed -i "s/export QT_IM_MODULE=fcitx/#export QT_IM_MODULE=fcitx/g" "/etc/environment"
27     sed -i "s/export XMODIFIERS=@im=fcitx/#export XMODIFIERS=@im=fcitx/g" "/etc/environment"
28 fi