I have got the following problem:
If I bot my system it doesn’t start the normal graphical login with gdm or kdm I tested both(only one was installed at a time and enabled). I lokked into my xinitrc but there is the right display manager. I can normally login via the console and then start gnome or kde with a simple startx or gdm or whatever but it doesn’t start when I nromally boot my system.
On openSUSE the display manager is configured in /etc/sysconfig/displaymanager, not xinitrc. (isn’t that executed for the user on login/when calling startx? So it wouldn’t work anyway, since the display manager has to be started by root)
You would start the configured display manager with “systemctl start xdm.service” or “rcxdm start” (depending on your openSUSE version), but it should be started automatically if you boot to runlevel 5.
So maybe your system is set to boot to runlevel 3 by default? Try “init 5” to start the graphical system", does this work?
Oh ok. Gdm is set as displaymanager in sysconfig I just lokked into it. I can use startx to start gnome for example but not everything works.
You are right this works. I have to use sudo systemctl start xdm.service to get everything running and it works perfectly. But when I reboot it again doesn’t load the display manager.
init 5 doesn’t work. I have to type sudo /sbin/init 5 in order to work. It hangs at loading gnome then. If i type sudo init 5 it says command not found.
On 2014-01-04 15:06, Sebi55 wrote:
> init 5 doesn’t work. I have to type sudo /sbin/init 5 in order to work.
> It hangs at loading gnome then. If i type sudo init 5 it says command
> not found.
It has to be run as root. Sudo might not work properly for this.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))
I did the following: I started my system, started gnome with sudo systemctl start xdm.service, went to services manager (Runlevel) and xdm was enabled and active there. Or do I need to look at another service?
Output of systemctl get-default:
graphical.target
Output of systemctl status xdm.service:
Loaded: loaded (/etc/init.d/xdm)
Active: active (running) since Sat 2014-01-04 13:50:53 UTC; 5min ago
Process: 3846 ExecStart=/etc/init.d/xdm start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/xdm.service
├─3877 /usr/sbin/gdm
├─3880 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/Displ...
└─3886 /usr/bin/Xorg :0 -background none -verbose -auth /run/gdm/a...
If I dont start the xdm.serivce the output of systemctl status xdm.service is loaded but inactive(dead)
So, to recap, the login screen does not show up automatically on boot, but does when you run “sudo systemctl start xdm.service” manually?
Sounds like some race condition then.
Could you run and post the output of “sudo systemctl status xdm.service” in text mode on the failed boot before you start it manually? (maybe redirect the output to a file with “> xxx.txt” to be able to post it)
You could also try to set “kdm” or “xdm” as display manager in /etc/sysconfig/displaymanager, maybe one of those would work?
Or try to disable plymouth (the boot splash) by adding “plymouth.enable=0” to the boot options. Does the DM start then automatically?
If I do sudo systemctl start xdm.service it automatically logs me in but I think this is because I said that I want to be logged in automatically.
I just type it here:
Is that the output of “sudo systemctl status xdm.service” when your system boots to text mode?
If xdm.service is started but fails, the output should be different.
Yes this is the output.
If I do this I get the following output:
xdm.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig xdm on
The unit files have no [Install] section. They are not meant to be enabled using systemctl.
Possible reasins for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...).
Hm, then your system does not even try to start it.
If I do this I get the following output:
xdm.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig xdm on
The unit files have no [Install] section. They are not meant to be enabled using systemctl.
Possible reasins for having this kind of units are:
A unit may be statically enabled by being symlinked from another unit’s .wants/ or .requires/ directory.
A unit’s purpose may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, …).
You can ignore that output, it should have worked despite this.
You can run “chkconfig xdm” to verify.
Does the display manager start now when you reboot?
Yeah it worked!!! I now have got another problem. If I export my system as a kiwi config file and then build it again and then get the ISO I have got the same problem again but of course with the ISO. What do I have to change to automatically start the display manager without needing to run sudo systemctl enable xdm.service and then reboot?
Well, actually xdm.service should be started automatically by graphical.target, because /usr/lib/systemd/system/graphical.target contains the line:
Wants=display-manager.service
So I can only think of those possibilities atm:
Your /usr/lib/systemd/system/graphical.target doesn’t contain that line for some reason
Your /etc/init.d/xdm doesn’t provide “display-manager”, it should have something like this near the top:
### BEGIN INIT INFO
# Provides: xdm display-manager
graphical.target is somehow masked/overridden in /etc/systemd/system/.
Check if there’s a file graphical.target there, have a look into graphical.target.wants/ and default.target.wants/ .
OTOH, if it is enabled now, this should be exported correctly as enabled, no? (no idea, I never did something like this)
I looked into graphical.target. The line is included. The other line ist provided in xdm too.
There is no folder graphical.target.wants. The other folder is empty.
Which files does the command sudo systemctl enable xdm.service actually edit?
I just noticed if I install the ISO for example in a virtualbox to test it it normally boots with gnome but I have lets say use it as live cd it doesn’t load the display manager. So something happens during the installation which activates the display manager again but what?
In the case of xdm it should create a symlink from /etc/init.d/rc5.d/S12xdm (the number may differ) to /etc/init.d/xdm (since xdm is an old-style sysvinit script).
Well, maybe systemd’s runlevel compatibility doesn’t work correctly when you set graphical.target as default, as you apparently had. Maybe you must set the default to runlevel5.target so that the sysvinit services for rl5 get correctly started?
But I doubt that. And that “Wants” line should be enough anyway to start xdm.
Sorry, I don’t have any idea why it would not work as LiveCD, but would after installation. AFAIK the LiveCD installer just copies all the files as they are to the harddisk.