Hi,
I'm using XFCE, and have created a guest account with the name Guest, and removed the password.
How do I display this "Guest" name by default, instead of my name during the login? (Already made the greeter-hide-users=false in the lightdm.conf)
Just wanted the other people at home to be able to simply press login to begin, instead of choosing the user and select Guest and then login. By default, it is showing my name for login.
Thank you for any information.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Solved] How to display default user in Lightdm on login?
- fabien
- Forum Helper
- Posts: 688
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 62 times
- Been thanked: 161 times
Re: [O/S] How to display default user in Lightdm on login?
There may be a simpler solution, but here is the solution I found and how I found it.
In /etc/lightdm/lightdm.conf I spotted the line
This looked like something usable to reconfigure lightdm when it starts. So I first looked at what we had on hand. The Bash set command displays the variables that have been set.
So I made a script /etc/lightdm/custom-greeter-setup-script:
and made it executable:
and added this line to /etc/lightdm/lightdm.conf:
and then restarted lightdm.
In /tmp/custLightdm I saw the line
In /var/lib/lightdm/ I found the file /var/lib/lightdm/.cache/lightdm-gtk-greeter/state which contains
This is how lightdm saves the last user which is then used when opening a new session.
So I changed /etc/lightdm/custom-greeter-setup-script with:
This replaces any user name with the username you want to use as default. Just change defaultusername to this name, of course.
In /etc/lightdm/lightdm.conf I spotted the line
Code: Select all
# greeter-setup-script = Script to run when starting a greeter (runs as root)
So I made a script /etc/lightdm/custom-greeter-setup-script:
Code: Select all
#!/usr/bin/env bash
set >/tmp/custLightdm
Code: Select all
#> chmod +x /etc/lightdm/custom-greeter-setup-script
Code: Select all
greeter-setup-script=/etc/lightdm/custom-greeter-setup-script
In /tmp/custLightdm I saw the line
Code: Select all
HOME=/var/lib/lightdm
Code: Select all
$> cat /var/lib/lightdm/.cache/lightdm-gtk-greeter/state
[greeter]
last-user=myusername
last-session=lightdm-xsession
So I changed /etc/lightdm/custom-greeter-setup-script with:
Code: Select all
#!/usr/bin/env bash
sed -i 's/^last-user=.\+$/last-user=defaultusername/' /var/lib/lightdm/.cache/lightdm-gtk-greeter/state
Re: [O/S] How to display default user in Lightdm on login?
Hi, @fabien. Very much thanks for your detailed reply. And not just reply but also how you have come to that. Nice!
- fabien
- Forum Helper
- Posts: 688
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 62 times
- Been thanked: 161 times
Re: [O/S] How to display default user in Lightdm on login?
You're welcome!
Please mark your topic as [Solved] if you validate the solution.
Please mark your topic as [Solved] if you validate the solution.