-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently the user will boot to SDDM upon initial install. This is not entirely optimal as the default session in SDDM is gamescope session which is not usable without first updating Steam. This addresses that by using the same logic we use for gamescope autologin to login to Plasma on first boot This commit also simplifies the logic in gamescope-autologin
- Loading branch information
Showing
4 changed files
with
43 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
NUM_USERS=$(ls /home | wc -l) | ||
USER=$(ls /home) | ||
|
||
# SteamOS SDDM config | ||
SDDM_CONF='/etc/sddm.conf.d/steamos.conf' | ||
|
||
# If we have multiple users, don't configure SDDM | ||
# Configure autologin | ||
sed -i 's/.*Session=.*/Session=gamescope-session.desktop/g' ${SDDM_CONF} | ||
if [ ${NUM_USERS} -eq 1 ]; then | ||
# Don't configure SDDM if we already have | ||
SDDM_CONF=$(cat /etc/sddm.conf.d/steamos.conf) | ||
if grep '#User=' <<< ${SDDM_CONF}; then | ||
# Retrieve username | ||
USER=$(ls /home) | ||
# Configure autologin | ||
sed -i 's/#User=/User='${USER}'/g' /etc/sddm.conf.d/steamos.conf | ||
touch /etc/sddm.conf.d/zz-steamos-autologin.conf | ||
# Remove sddm.conf if it exists | ||
if [ -f '/etc/sddm.conf' ]; then | ||
rm -f /etc/sddm.conf | ||
fi | ||
fi | ||
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF} | ||
fi | ||
|
||
# Remove sddm.conf if it exists | ||
if [ -f '/etc/sddm.conf' ]; then | ||
rm -f /etc/sddm.conf | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
NUM_USERS=$(ls /home | wc -l) | ||
USER=$(ls /home) | ||
|
||
# SteamOS SDDM config | ||
SDDM_CONF='/etc/sddm.conf.d/steamos.conf' | ||
|
||
# Configure autologin | ||
sed -i 's/.*Session=.*/Session=plasmax11.desktop/g' ${SDDM_CONF} | ||
if [ ${NUM_USERS} -eq 1 ]; then | ||
sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF} | ||
fi | ||
|
||
# Remove sddm.conf if it exists | ||
if [ -f '/etc/sddm.conf' ]; then | ||
rm -f /etc/sddm.conf | ||
fi |
10 changes: 10 additions & 0 deletions
10
system_files/deck/usr/lib/systemd/system/plasma-autologin.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=Enables autologin to Plasma (X11) | ||
Before=display-manager.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/plasma-autologin | ||
|
||
[Install] | ||
WantedBy=multi-user.target |