startx as a user fails
You could try reconfiguring with dpkg-reconfigure x11-common
Source: unmodified /etc/X11/Xwrapper.config files on 3 different 14.04 LTS systems. Note that 16.04 doesn't have this file.
Side note: the same source on my systems includes the line: allowed_users=console
rather than allowed_users=anybody
Related source found later: http://karuppuswamy.com/wordpress/2010/09/26/how-to-fix-x-user-not-authorized-to-run-the-x-server-aborting/
Related videos on Youtube
Albert
I am postgraduate of RWTH Aachen, Germany and received a M.S. Math and a M.S. CompSci. My main interests are Machine Learning, Neural Networks, Artificial Intelligence, Logic, Automata Theory and Programming Languages. And I'm an enthusiastic hobby programmer with a wide range of side projects, mostly in C++ and Python. Homepage GitHub SourceForge HackerNewsers profile page MetaOptimize Q+A
Updated on September 18, 2022Comments
-
Albert over 1 year
On Ubuntu 16.04:
gz@gcomputer:~$ startx X.Org X Server 1.18.3 Release Date: 2016-04-04 X Protocol Version 11, Revision 0 Build Operating System: Linux 3.13.0-86-generic x86_64 Ubuntu Current Operating System: Linux gcomputer 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-31-generic root=UUID=56fc92d2-1903-4263-b88e-d09bc15ef1d3 ro quiet splash Build Date: 18 May 2016 01:07:07AM xorg-server 2:1.18.3-1ubuntu2.2 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.33.6 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/home/gz/.local/share/xorg/Xorg.1.log", Time: Sat Jul 30 18:12:37 2016 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (EE) Fatal server error: (EE) parse_vt_settings: Cannot open /dev/tty0 (No such file or directory) (EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/home/gz/.local/share/xorg/Xorg.1.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file. ^Cxinit: giving up xinit: unable to connect to X server: Connection refused xinit: unexpected signal 2 Couldn't get a file descriptor referring to the console
Why?
I found this related question. According to its accepted answer, I should edit
/etc/X11/Xwrapper.config
as follow:allowed_users=anybody needs_root_rights=yes
I did that but that doesn't change anything for me.
The comments seems to suggest that
startx
is broken in Ubuntu. Why is that? If that is the case, maybe the answer to my original question is "startx is not possible anymore because ...", or "making it possible would have ... drawbacks" or so?
root@gcomputer:~# dpkg-reconfigure x11-common update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults insserv: warning: script 'S04powernowd.early' missing LSB tags and overrides insserv: warning: script 'powernowd.early' missing LSB tags and overrides
Not sure what this means.
-
Admin over 7 yearsYou should have added this to your previous question instead of creating a new one.
-
Albert over 7 years@luchonacho: But this is another (probably unrelated) question. In the previous question, I want the standard behavior. I want that systemctl starts my graphical login. Here in this question, I don't want the graphical login, I want to start Xorg via the terminal as a user (via
startx
). Here I want to know whystartx
fails. -
Admin over 7 yearsThey are probably related. The reason why GUI does not start with "text" part of the GRUB might be because the X is faulted anyway, so you end up in the CLI.
-
Alcuin Arundel over 7 years
startx
doesn't work with unity. The proper command issudo systemctl start lightdm.service
-
Albert over 7 years@AlcuinArundel: Why not? How can I make it work?
-
Alcuin Arundel over 7 yearsPut
alias startx='sudo systemctl start lightdm.service'
in your.bashrc
script. As for why, I don't know enough about how X works or how Unity interacts with it to understand why. All I know is what I've told you. -
Albert over 7 years@AlcuinArundel: Then
startx
will not run/usr/bin/startx
anymore, which is what I'm asking here (or at least I want to know why does it not work). I want to start Xorg as a user. I don't want to invoke sudo, nor systemd. -
Albert over 7 years@luchonacho: Did you downvote this? Can you explain why is it bad to ask about
startx
? Or if you still think this is the same question as earlier, do you realize now that this is not the case? -
Elder Geek over 7 yearsWhat version of Ubuntu are you running? Please edit your question to include this information. Thank you!
-