LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Can't use startx as non root (https://www.linuxquestions.org/questions/linux-from-scratch-13/cant-use-startx-as-non-root-4175649952/)

voncloft 03-11-2019 09:14 AM

Can't use startx as non root
 
I get an error message saying nonconsole users can't start start x

What am I doing wrong

I followed the xorg and KDE sections of 8.4 exactly.

I tried to add my user test to root and the group console.

But no dice.

voncloft 03-11-2019 09:30 AM

This is what I get when I try to run startx as the user "test"


test [ ~ ]$ startx
xauth: file /home/test/.serverauth.26454 does not exist
xauth: (argv):1: bad display name "LFS:2" in "list" command
xauth: (stdin):1: bad display name "LFS:2" in "add" command

/usr/libexec/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth: (argv):1: bad display name "LFS:2" in "remove" command
Couldn't get a file descriptor referring to the console

BW-userx 03-11-2019 09:34 AM

it is telling you right off your display name is BAD, LFS:2 not good name in two places. googled got this
Code:

If you get this upon startx:

> xauth: (argv):1: bad display name “:0” in “remove” command

You need to have the proper hostnames in /etc/hosts:
::1 localhost localhost.localdomain xxx.localdomain
127.0.0.1 localhost localhost.localdomain xxx.localdomain

where xxx is your hostname.

you need to modify your file and put in the correct name. That is for ssh, but the fix is the same in adding the proper name to your file. whatever that maybe.

then there is this.
"I tried to add my user test to root and the group console."
add a user to root and the group, root is root, I'd not be adding anyone to root. by what means did you do this?

I am not versed in this but, I'd think it should be user:console where the group console should take care of giving permissions to the xorg startx.

voncloft 03-11-2019 09:44 AM

What file?

in /etc/group I have
root:test
console:test

Also I fixed my /etc/hosts file to this
192.168.1.33 lfs

Afterwhich led to this:

test [ ~ ]$ startx
xauth: file /home/test/.serverauth.26600 does not exist

/usr/libexec/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console

BW-userx 03-11-2019 10:28 AM

is this just a single box trying to get startx to work rather then using a login manager?
is this you trying to log in via ssh or some other thing?

what distro is it?

you should not have to put a user in root, or console groups.

https://wiki.archlinux.org/index.php/Xinit

ftp://www.x.org/pub/X11R7.6-RC1/doc/...startx.1.xhtml

voncloft 03-11-2019 11:06 AM

Linux from scratch

I am trying to ssh into the box to start up KDE.

Also I changed my group file
Test:root, console, video

I can do it for root.

I changed the host name in /etc/hosts to lfs

First error went away for the argv1... However the console message still appears

BW-userx 03-11-2019 11:15 AM

you should dig into how to set up xorg for ssh startx... key words of that nature.

voncloft 03-11-2019 11:17 AM

I've tried outside of ssh as well, my laptop is on a coffee table and frankly I got tired of leaning over to type commands in so I switched to ssh.

Even typing on the pc itself I get the console error.


All times are GMT -5. The time now is 02:43 PM.