You are not logged in.

#1 2024-02-08 07:34:06

mkooner
Member
Registered: 2024-02-08
Posts: 4

Auto Change login session script for GDM

Hello,

I want to create an auto change login script using GDM. What I want to do is when the script is clicked it logs me out of my current session and logs me into a new one. For example, logs me out of gnome and into hyprland, with no other prompts or passwords.

I created one using SDDM by outputting to conf files and leveraging the relogin feature in the DM. I don't think GDM has a similar feature, but want to try to do the same in GDM.

See SDDM Script below:

#!/usr/bin/bash

echo '[Autologin]' > /etc/sddm.conf.d/autologin.conf
echo 'Relogin=true' >> /etc/sddm.conf.d/autologin.conf
echo 'Session=hyprland.desktop' >> /etc/sddm.conf.d/autologin.conf

sudo systemctl reset-failed sddm
sudo systemctl restart sddm
echo "Restarted SDDM"

Offline

#2 2024-02-11 00:44:15

mkooner
Member
Registered: 2024-02-08
Posts: 4

Re: Auto Change login session script for GDM

Solved it, using timed login from GDM

Offline

Board footer

Powered by FluxBB