Score:1

Lightdm can't start xserver

cn flag

First things first, hello :)

I ran systemctl disable lightdm.service from recovery mode.

After that i reboot my pc and typed sudo lightdm start ; startx. I started a graphical section but when i tryed to launch a gtk program from terminal i got this error:

 Unable to init server: No se pudo conectar: Conexión rehusada

(nautilus:14383): Gtk-WARNING **: 10:27:51.240: cannot open display: :1 

and when i realized it i launched lightdm in debug mode with sudo lightdm --debug start and i got this:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.26.0, UID=0 PID=13909
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-guest.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-disable-log-backup.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-guest-wrapper.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-unity.conf
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using Xephyr for X servers
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Monitoring logind for seats
[+0.01s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating user session
[+0.02s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.02s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+0.02s] DEBUG: Seat seat0: Creating display server of type x
[+0.04s] DEBUG: Using VT 7
[+0.04s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.04s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.04s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.04s] DEBUG: XServer 0: Launching X Server
[+0.04s] DEBUG: Launching process 13915: /usr/bin/Xephyr :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.04s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.04s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.04s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.09s] DEBUG: Process 13915 exited with return value 1
[+0.09s] DEBUG: XServer 0: X server stopped
[+0.09s] DEBUG: Releasing VT 7
[+0.09s] DEBUG: XServer 0: Removing X server authority /var/run/lightdm/root/:0
[+0.09s] DEBUG: Seat seat0: Display server stopped
[+0.09s] DEBUG: Seat seat0: Stopping session
[+0.09s] DEBUG: Seat seat0: Session stopped
[+0.09s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+0.09s] DEBUG: Seat seat0: Active display server stopped, starting greeter
[+0.09s] DEBUG: Seat seat0: Creating greeter session
[+0.09s] DEBUG: Seat seat0: Creating display server of type x
[+0.09s] DEBUG: Using VT 7
[+0.09s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.09s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.09s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.09s] DEBUG: XServer 0: Launching X Server
[+0.09s] DEBUG: Launching process 13916: /usr/bin/Xephyr :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.09s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.10s] DEBUG: Process 13916 exited with return value 1
[+0.10s] DEBUG: XServer 0: X server stopped
[+0.10s] DEBUG: Releasing VT 7
[+0.10s] DEBUG: XServer 0: Removing X server authority /var/run/lightdm/root/:0
[+0.10s] DEBUG: Seat seat0: Display server stopped
[+0.10s] DEBUG: Seat seat0: Stopping session
[+0.10s] DEBUG: Seat seat0: Session stopped
[+0.10s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+0.10s] DEBUG: Seat seat0: Stopping; greeter display server failed to start
[+0.10s] DEBUG: Seat seat0: Stopping
[+0.10s] DEBUG: Seat seat0: Stopped
[+0.10s] DEBUG: Required seat has stopped
[+0.10s] DEBUG: Stopping display manager
[+0.10s] DEBUG: Display manager stopped
[+0.10s] DEBUG: Stopping daemon
[+0.11s] DEBUG: Exiting with return value 1

I could launch gtk programs before ran systemctl disable lightdm.service so probably that's the source of the problem.

If i well understood systemctl disable lightdm.service is for don't start lightdm automatically, not for make it unable to run, so idk.

Do you have any suggestion for solve the problem?

Terrance avatar
id flag
What was your reasoning in disabling LightDM from starting?
hr flag
Please add the output of `systemctl get-default`
Lucastegano X avatar
cn flag
@Terrance Because some time ago i updated ubuntu to 18.04lts, but the update was not fully ended, so lightdm got useless(for logging in), so i just open a tty and log in by there, but recently my keyboard broke, i cannot use alt or altgr, so i can't use the tty's. I was looking for change the keyboard shortcut to the tty's but i mean lightdm don't even works for logging in anymore soooo. And if you ask, i don't update ubuntu again because this pc only has 32gb of storage.
Terrance avatar
id flag
You can always try to access the TTY's by running `sudo chvt 2` for TTY2, so on until 6 from a terminal window. `sudo chvt 7` should be able to return you to the desktop.
Lucastegano X avatar
cn flag
@Terrance i know that i can switch tty's from a command line, but that's the thing, from a command line, if i allow lightdm to auto start then it is on the display 0, so the only way to get to a command line is the keyboard shortcut.
Terrance avatar
id flag
Then I am completely lost as to what you are asking. You might want to clean up your question and be as specific as you can be as to what you are trying to accomplish. You disabled the LightDM, then your command you start it up manually. That does not make any sense to me as to why you have done that. The DISPLAY settings can change due to autostart vs manually started, or like with GDM having automatic login vs typing in your password login.
Lucastegano X avatar
cn flag
@Terrance I want to: 1: Ubuntu to displays me a tty in first place. 2: Lightdm to doesn't displays me the log in screen 3: Be able to use lightdm to launch graphical apps from the terminal after use startx That's what i want, i hope it's clear now :)
Terrance avatar
id flag
LightDM is the display manager. You can also try GDM in place of LightDM. But `startx` on the other hand starts the X environment with whatever graphical app you are trying to launch. Try `startx xterm`.
Lucastegano X avatar
cn flag
@Terrance sorry for the delay, mhh ok, 2 things: 1:Mhhh ok, i miss understood the function of a display manager, i'll search out for that later. 2:When i use startx whateverapplicaton it just shut ups instantly, i saw the logs and it has only one error, it's unable to access to the frame buffer(/dev/fb0) because permission denied, and a lot of warnings. Also i executed "nautilus --gdk-debug=all --gtk-debug=all --g-fatal-warnings" and got 3 error loops and 1 fatal error, and idk how to solve that. But that is out of the topic of this post, so thanks to you Terrance for all your help bro :)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.