You are not logged in.

#1 2016-02-26 18:08:08

archuser11301
Member
Registered: 2016-02-09
Posts: 40

[Solved] Cant run startx as user only root

I couldnt run startx as user only root and now I changed some files and can't even run as root

I didnt know what I was doing the first time around to get it running as root but now I cant even do that.

I had it running as root but I needed to make a new firefox profile as copying and chowing wasnt working.

So I tried to run startx as user and it didnt work. I got some error about xauthority. So I went back to the tutorial again -which i did follow first time around for root btw- and I copied default .xinitrc from etc to user as it didnt exist there. it wouldnt let me copy as user so I did it as sudo but doesnt sudo mean it ends up in root rather than the user's folder since i did ~ rather than writing username? so maybe i overwrote the working version in root?

when i did this I no longer got the xuathority error but now it loads x but goes to a black screen.

I tried also doing Xorg -configure but that gives a fatal error saying cannot write to log file or something.

So what to do now? the wiki makes no sense to me really. It also says 'change xinit.

I also messed with xorg.conf i think but I have lost track of what I have done and cannot understand the sparse and bitty wiki on it so not sure what to do next.

Please advise.

As an aside all i need to do is create a firefox profile in X and then I am done with it but it wont let me without X going. I tried with xvfb-run and the command line to create profile but it gave me:

libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/swrast_dri.so
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

I am runnning arch in vmware so not sure how that affects what graphics drivers i need.

Id love to know how to be able to run xvfb without X at all that would be easier but I will go through the rigmarole of setting up X if I have to.

Last edited by archuser11301 (2016-02-27 14:48:08)

Offline

#2 2016-02-26 18:17:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] Cant run startx as user only root

Don't use random tutorials: they are always wrong or outdated and often both, as is the case here. You set it up as root so all the permissions were for root, which is a horrendous idea for X.

Follow the Beginners' Guide, it is the only supported method here.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-02-26 18:31:57

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

jasonwryan wrote:

Don't use random tutorials: they are always wrong or outdated and often both, as is the case here. You set it up as root so all the permissions were for root, which is a horrendous idea for X.

Follow the Beginners' Guide, it is the only supported method here.

Where did you gather I was following a random tutorial. I followed the wiki. I just had no idea I should have used another user than root.

Is there a way out now the damage is done?

Also it says in the wiki on editing the .xinitrc `Append desired commands and remove/comment the conflicting lines.`

How am I supposed to know what should and shouldn't go in there as the guide does not explain further.

Last edited by archuser11301 (2016-02-26 18:53:05)

Offline

#4 2016-02-26 19:00:18

PhilippD
Member
Registered: 2015-02-06
Posts: 40

Re: [Solved] Cant run startx as user only root

archuser11301 wrote:

So I tried to run startx as user and it didnt work. I got some error about xauthority. So I went back to the tutorial again -which i did follow first time around for root btw- and I copied default .xinitrc from etc to user as it didnt exist there. it wouldnt let me copy as user so I did it as sudo but doesnt sudo mean it ends up in root rather than the user's folder since i did ~ rather than writing username? so maybe i overwrote the working version in root?

You couldn't copy from /etc to your home directory? That is odd.

I suggest that since you seem to be on a fresh install, to delete and recreate your user and try again under more a more careful consideration of the Beginner's Guide.

Offline

#5 2016-02-26 19:12:03

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

I jsut tried to chown the .xinitrc in my home folder of the user as it was on root as owner.

Now I am back to the message of:

http://postimg.org/image/vn4wqvoap/

No, I didn't have a .xinitrc anywhere in my user places only in root so I figured I'd jsut copy that one. Seemed like  good idea at the time...

The thing is though I fear if I made another account Id run into the same issue because i get an error with the xorg configure command so that is the reason why i copied from root in the first place iirc.

Last edited by archuser11301 (2016-02-26 19:16:26)

Offline

#6 2016-02-26 19:17:11

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,808
Website

Re: [Solved] Cant run startx as user only root

Remove or chown ~/.Xauthority and ~/.local/share/xorg/Xorg.0.log and try startx again.

And what is in your ~/.xinitrc btw?

Last edited by ugjka (2016-02-26 19:39:32)


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#7 2016-02-26 20:31:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [Solved] Cant run startx as user only root

I think there is a more systemic problem here.  But first to help us help you:
1) Post text as text, not as an image of text
2) There is no reason to obscure your username - do so in an incomplete and odd way wasted a bit of my time as I was wondering if there were special characters in your user name and/or locale and/or font issues.  But eventually I realized you just inconsistently smudged that out in the image.

As to the problem, the inabilities to open *either* the xauth or log files suggests a systemic permissions issue: I suspect the user you are running as doesn't have proper permissions on your home directory.  So I second the suggestion to create a new user.  Otherwise you'll have a lot of work to do cleaning up the mess you've already created.

Also, don't use xorg configure.  Follow the wiki.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2016-02-26 20:37:21

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: [Solved] Cant run startx as user only root

Trilby wrote:

Also, don't use xorg configure.  Follow the wiki.

There are still a few references to Xorg -configure in the wiki Xorg -configure

Offline

#9 2016-02-26 20:55:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [Solved] Cant run startx as user only root

If you're being pedantic, yes.  But my phrasing was (I thought obviously) a shorthand for follow the Beginner's Guide and the well curated pages linked from it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2016-02-26 21:33:59

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

Trilby wrote:

If you're being pedantic, yes.  But my phrasing was (I thought obviously) a shorthand for follow the Beginner's Guide and the well curated pages linked from it.

Well I didn't know it was an either or thing. I thought configure was part of the required setup.

Ive found the wikis very unclear in terms of their headings since they all use the same sort of size font for things which are even unrelated to each other. I mean with the base install it will be saying 'do this for x setup and Y for some other setup' only to find out that the headings being the same sort throughout you can easily miss where you should ignore for setup that isnt yours and where the pertinent info begins again.

I think they were written by expert users who do not comprehend what it is like to be a newbie anymore. Im not complaining about free info just constructive criticism.

Offline

#11 2016-02-26 21:39:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [Solved] Cant run startx as user only root

Don't randomly jump to headings, read the page.  In this case, the only place using Xorg -configure is mentioned is just a couple lines below a colored box with the word "NOTE" in bold text:

wiki wrote:

Note: Arch supplies default configuration files in /usr/share/X11/xorg.conf.d, and no extra configuration is necessary for most setups.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2016-02-26 21:39:46

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

Trilby wrote:

I think there is a more systemic problem here.  But first to help us help you:
1) Post text as text, not as an image of text
2) There is no reason to obscure your username - do so in an incomplete and odd way wasted a bit of my time as I was wondering if there were special characters in your user name and/or locale and/or font issues.  But eventually I realized you just inconsistently smudged that out in the image.

As to the problem, the inabilities to open *either* the xauth or log files suggests a systemic permissions issue: I suspect the user you are running as doesn't have proper permissions on your home directory.  So I second the suggestion to create a new user.  Otherwise you'll have a lot of work to do cleaning up the mess you've already created.

Also, don't use xorg configure.  Follow the wiki.

I would post text as text but i cant copy and paste form the vm thats the only reason i did that and i needed to be in vm rather than ssh to do startx. so there was some method to my madness.

Regarding making another user what is to stop the same problems happening that happened the first time?

Last edited by archuser11301 (2016-02-26 21:47:05)

Offline

#13 2016-02-26 21:51:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [Solved] Cant run startx as user only root

archuser11301 wrote:

I would post text as text but i cant copy and paste form the vm thats the only reason i did that and i needed to be in vm rather than ssh to do startx. so there was some method to my madness.

No, there really wasn't.

archuser11301 wrote:

Regarding making another user what is to stop the same problems happening that happened the first time?

I don't know, the problems you are facing shouldn't happen, so creating a user properly shouldn't lead to these problems.  This is why I think you accidentally did something that screwed up the permissions on your home directory.  So I don't know.  And now I don't care.  If you want to quible about suggestions rather than taking them, I have no interest in trying to convince you to fix your system.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2016-02-26 22:11:49

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

Trilby wrote:

I don't know, the problems you are facing shouldn't happen, so creating a user properly shouldn't lead to these problems.  This is why I think you accidentally did something that screwed up the permissions on your home directory.  So I don't know.  And now I don't care.  If you want to quible about suggestions rather than taking them, I have no interest in trying to convince you to fix your system.

I wasnt asking to argue with you i was asking to understand better what the problem might have been. I understand things by asking questions to find out why things are the way they are -and to prevent them in future if I made an error- not to try and 'one up' you which is what you seem to have taken from my asking.

Offline

#15 2016-02-27 02:48:27

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: [Solved] Cant run startx as user only root

Alternative approach
try the following as your none root user

ls -lad ~

Should indicate it is owned by that user and that users primary group.

$ find ~ \! -user USERNAME -o \! -group GROUPNAME

Substitute correct values for USERNAME and GROUPNAME this should find any files in that users home directory not owned by that user or with a group that is not that users primary group.
If there are any results for none personal documents the following might help you in deciding what to do with them.

ls -la /etc/skel/

See the man 8  useradd particularly the sections covering -m and -k should explain why those files should be the only ones you would expect to find in a new users home directory ( owned by that user / that user's group )

Offline

#16 2016-02-27 11:47:45

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

Thank you for the post. Indeed as I did the first line you suggested it shows as root:root.

I will follow the wiki now on making a new user.

Edit: I realize now the probable cause for it not being owned by the user. When making the account it didn't add the home directory so I did it manually after and I guess I had to sudo to do it.

loqs wrote:

Alternative approach
try the following as your none root user

ls -lad ~

Should indicate it is owned by that user and that users primary group.

$ find ~ \! -user USERNAME -o \! -group GROUPNAME

Substitute correct values for USERNAME and GROUPNAME this should find any files in that users home directory not owned by that user or with a group that is not that users primary group.
If there are any results for none personal documents the following might help you in deciding what to do with them.

ls -la /etc/skel/

See the man 8  useradd particularly the sections covering -m and -k should explain why those files should be the only ones you would expect to find in a new users home directory ( owned by that user / that user's group )

Last edited by archuser11301 (2016-02-27 12:06:55)

Offline

#17 2016-02-27 12:16:24

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

How would I start from scratch in terms of setting up startX again? so I know I am not trying to recofigure while it is still polluted from my previous errors?

Offline

#18 2016-02-27 12:32:00

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,808
Website

Re: [Solved] Cant run startx as user only root

Create a new user, log in and run startx /usr/bin/your_wm. Where's the problem?


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#19 2016-02-27 13:46:07

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

Cool. I will try that if when I need to but when I created a new account I found I didn't need to use X at all.

I originally only needed it to make a firefox profile since it wouldnt create an account in xvfb with the other broken user setup I was using. However when I tried to run the command again, now with the correct user setup it worked in xvfb.

So thanks yall for the help.

Not sure where I mark as solved? I don't see it.

Last edited by archuser11301 (2016-02-27 13:47:56)

Offline

#20 2016-02-27 13:50:48

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: [Solved] Cant run startx as user only root

archuser11301 wrote:

Not sure where I mark as solved? I don't see it.

You can mark it as solved by editing your first post and prepending [Solved] to the subject.

Offline

#21 2016-02-27 14:47:51

archuser11301
Member
Registered: 2016-02-09
Posts: 40

Re: [Solved] Cant run startx as user only root

loqs wrote:
archuser11301 wrote:

Not sure where I mark as solved? I don't see it.

You can mark it as solved by editing your first post and prepending [Solved] to the subject.

Oh this manual route had not occured smile duly noted.

Offline

Board footer

Powered by FluxBB