Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
X will not start when run as regular user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 647

PostPosted: Wed Jan 23, 2013 3:10 pm    Post subject: X will not start when run as regular user Reply with quote

Hi,

This used to work, but now when I run startx as a user (xinit xterm -- :2) I get the strangest error message:
Code:
Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)

/dev/tty0 is, in fact, present, and udev and CONFIG_DEVTMPFS and whatnot are all working fine.

Previously it also complained about not being able to access its logfile, but I fixed that by chmodding /var/tmp to 777, which seems correct given that I need a process run as a regular user to be able to write to that directory.

The question: why is X trying to open /dev/tty0, and why is it failing when run as a regular user?
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2518
Location: UK

PostPosted: Wed Jan 23, 2013 3:35 pm    Post subject: Reply with quote

X is supposed to be run as setuid root - have you changed the file perms on it to not do that?
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 647

PostPosted: Wed Jan 23, 2013 5:32 pm    Post subject: Reply with quote

I thought this wasn't needed with KMS. But you're right, setting USE=suid fixed the problem, and it looks like USE=suid is required for most use cases after all: https://bugs.gentoo.org/show_bug.cgi?id=450364

Thanks!
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1242
Location: 42.68n 85.41w

PostPosted: Wed Jan 23, 2013 5:46 pm    Post subject: Reply with quote

chmod 777 = BAD BAD BAD BAD BAD!!!!!

(instead try to figure out what user owns or what group owns and run chown $USER /file... or chgrp $USERGROUP /file)
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2518
Location: UK

PostPosted: Wed Jan 23, 2013 7:33 pm    Post subject: Reply with quote

You're almost right, but not - /var/tmp should be chmod 1777.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum