LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-11-2019, 09:14 AM   #1
voncloft
Member
 
Registered: Mar 2019
Posts: 57

Rep: Reputation: Disabled
Question 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.
 
Old 03-11-2019, 09:30 AM   #2
voncloft
Member
 
Registered: Mar 2019
Posts: 57

Original Poster
Rep: Reputation: Disabled
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

Last edited by voncloft; 03-11-2019 at 09:32 AM.
 
Old 03-11-2019, 09:34 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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.

Last edited by BW-userx; 03-11-2019 at 09:39 AM.
 
Old 03-11-2019, 09:44 AM   #4
voncloft
Member
 
Registered: Mar 2019
Posts: 57

Original Poster
Rep: Reputation: Disabled
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

Last edited by voncloft; 03-11-2019 at 09:47 AM.
 
Old 03-11-2019, 10:28 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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

Last edited by BW-userx; 03-11-2019 at 10:36 AM.
 
Old 03-11-2019, 11:06 AM   #6
voncloft
Member
 
Registered: Mar 2019
Posts: 57

Original Poster
Rep: Reputation: Disabled
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

Last edited by voncloft; 03-11-2019 at 11:07 AM.
 
Old 03-11-2019, 11:15 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you should dig into how to set up xorg for ssh startx... key words of that nature.
 
Old 03-11-2019, 11:17 AM   #8
voncloft
Member
 
Registered: Mar 2019
Posts: 57

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i write to a root:root 750 file with a non-root user? Droa Linux - Newbie 1 05-14-2012 07:49 PM
Monitoring traffic tool/web based(non-cgi?)/non-SNMP/low CPU usage/non-real time pe2338 Linux - Networking 3 05-04-2006 01:00 PM
unable to startx as non-root user raska Slackware 7 11-22-2004 06:41 PM
mounting hardrive via non-root and using it via non-root Paridoth Mandriva 1 11-03-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration