mirror of
https://github.com/ublue-os/bazzite.git
synced 2025-01-04 02:40:05 +00:00
feat: Implement GNOME autologin service
This commit is contained in:
parent
462c2d519d
commit
64f4a178bc
@ -236,7 +236,14 @@ RUN rm /usr/share/applications/winetricks.desktop && \
|
||||
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-wallpaper-engine-kde-plugin.repo && \
|
||||
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ycollet-audinux.repo && \
|
||||
mv /etc/sddm.conf /etc/sddm.conf.d/steamos.conf && \
|
||||
systemctl enable plasma-autologin.service && \
|
||||
if grep "gnome" <<< "${IMAGE_NAME}"; then \
|
||||
 systemctl disable gdm.service && \
|
||||
 systemctl enable sddm.service && \
|
||||
 systemctl enable gnome-autologin.service \
|
||||
 ; fi && \
|
||||
 if grep -v "gnome" <<< "${IMAGE_NAME}"; then \
|
||||
 systemctl enable plasma-autologin.service \
|
||||
 ; fi && \
|
||||
systemctl enable jupiter-fan-control.service && \
|
||||
systemctl enable vpower.service && \
|
||||
systemctl enable ds-inhibit.service && \
|
||||
|
14
system_files/desktop/gnome/usr/bin/gnome-autologin
Executable file
14
system_files/desktop/gnome/usr/bin/gnome-autologin
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
USER=$(id -nu 1000)
|
||||
|
||||
# SteamOS SDDM config
|
||||
SDDM_CONF='/etc/sddm.conf.d/steamos.conf'
|
||||
if [ ! -f ${SDDM_CONF} ]; then
|
||||
# Fallback to sddm.conf
|
||||
SDDM_CONF = '/etc/sddm.conf'
|
||||
fi
|
||||
|
||||
# Configure autologin
|
||||
sed -i 's/.*Session=.*/Session=gnome-session.desktop/g' ${SDDM_CONF}
|
||||
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF}
|
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Enables autologin to GNOME
|
||||
Before=display-manager.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/gnome-autologin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user