[Bug 285397] GDM display failed to automatic login on FreeBSD 13.5
[email protected] Fri, 14 Mar 2025 10:38:09 +0000
| Newsgroups | gmane.os.freebsd.devel.standards |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285397
Bug ID: 285397
Summary: GDM display failed to automatic login on FreeBSD 13.5
Product: Base System
Version: 13.5-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: standards
Assignee: [email protected]
Reporter: [email protected]
Hi,
After install GNOME on FreeBSD 13.5 64bit successfully, we want to enable
automatic login by following the steps below.
1. Enable GDM(GNOME Display Manager) configuration
sudo vi /usr/local/etc/gdm/custom.conf
Find and modify (or add) these lines under [daemon]:
[Daemon]
AutomaticLoginEnable=true
AutomaticLogin=your_username
Replace your_username with your actual FreeBSD username.
2. Reboot the machine
After reboot, the UI is enter into black screen. If we restart GDM manully, it
reports error as below.
sudo service gdm restart
Stopping gdm.
Starting gdm.
# gdm 936 - - Gdm: GdmDisplay: Session never registered, failing
Based GNOME can work normally after inputting the username and password. Tried
a lot of ways to fix this issue, for example.
(1) Check that the correct session is set in /usr/local/etc/gdm/custom.conf:
[daemon]
...
DefaultSession=gnome
Enable and Start GDM
sudo sysrc gdm_enable="YES"
sudo sysrc dbus_enable="YES"
Then, restart the system or manually start GDM:
sudo service gdm restart
(2) Make sure /usr/local/etc/gdm/custom.conf has correct ownership and
permissions:
ls -l /usr/local/etc/gdm/custom.conf
If necessary, set proper permissions:
sudo chown root:wheel /usr/local/etc/gdm/custom.conf
sudo chmod 644 /usr/local/etc/gdm/custom.conf
Ensure gdm-autologin Group Exists
GDM requires the user to be in the gdm-autologin group. Add your user to this
group:
sudo pw groupadd gdm-autologin
sudo pw groupmod gdm-autologin -m your_username
Then, restart GDM:
sudo service gdm restart
(3) Confirm PAM Configuration
Ensure /etc/pam.d/gdm-autologin contains the correct settings:
sudo vi /etc/pam.d/gdm-autologin
It should contain:
auth required pam_nologin.so
auth required pam_self.so
auth include system
account include system
session include system
(4) Enable ConsoleKit (if needed)
GNOME relies on ConsoleKit for session management. Ensure consolekit is
running:
sudo sysrc consolekit_enable="YES"
sudo service consolekit start
(5) Ensure No Conflicting Sessions
Sometimes, conflicting session settings may prevent auto-login. Check
/usr/local/etc/gdm/custom.conf again and make sure:
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=your_username
DefaultSession=gnome
Also, remove any old .Xauthority files:
rm -f ~/.Xauthority
sudo reboot
(6) Try Wayland
sudo vi /usr/local/etc/gdm/custom.conf
Find the [daemon] section and comment out or set:
#WaylandEnable=false
Then restart:
sudo service gdm restart
(7) Force Auto-login via ~/.xinitrc
echo "exec gnome-session" > ~/.xinitrc
chmod +x ~/.xinitrc
Then enable automatic login in getty (TTY1):
Edit /etc/gettytab and change the default entry:
sudo vi /etc/gettytab
Modify it:
default:\
:autologin=your_username:\
:tc=Pc:
Edit /etc/ttys to auto-login on ttyv1:
sudo vi /etc/ttys
Find:
ttyv1 "/usr/libexec/getty Pc" xterm on secure
Change it to:
ttyv1 "/usr/libexec/getty autologin" xterm on secure
Then restart:
sudo service tty restart
(8) Verify User Permissions
Ensure your user is in the correct groups:
pw groupshow video
pw groupshow operator
pw groupshow wheel
If your user is not in video, operator, and wheel, add them:
sudo pw groupmod video -m your_username
sudo pw groupmod operator -m your_username
sudo pw groupmod wheel -m your_username
Then reboot:
sudo reboot
(9) Check GNOME Session Files
Ensure GNOME session files exist:
ls -l /usr/local/share/xsessions/
You should see files like:
gnome.desktop
gnome-xorg.desktop
gnome-wayland.desktop
If missing, reinstall GNOME:
sudo pkg install gnome-desktop gnome-session gnome-shell
(10) Force Xorg Instead of Wayland
ry disabling Wayland and force Xorg for GDM. Edit:
sudo vi /usr/local/etc/gdm/custom.conf
Find the [daemon] section and add or modify:
[daemon]
WaylandEnable=false
Save the file and restart GDM:
sudo service gdm restart
All above failed. Fortunately, SLiM works instead of GDM for automatic login on
FreeBSD 13.5 64bit.
Could you please tell us how to fix it for GDM?
Thanks!
Yanhui
--
You are receiving this mail because:
You are the assignee for the bug.