5

I'm unable to startx without root permissions, as it throws me this error:

parse_vt_settings: Cannot open /dev/tty0 (permission denied) 

When I run startx as root, either with sudo or by login, it works perfectly fine. I am currently running Gentoo Linux.

  • I've added the user I want to startx with to the tty group
  • I've added read and write permissions to tty0 for the tty group
  • I've deleted my .Xauthority file.

I've been trying to figure out this issue for about a day, and literally every single forum post I've come across has been of absolutely no use to me. Can I please get some help with this?

2
  • Please append output of loginctl to your question. Commented Nov 23, 2021 at 14:58
  • @dirdi my installation that had this issue doesn't exist anymore, sorry. Commented Nov 24, 2021 at 20:03

1 Answer 1

3

From the Gentoo Wiki, running the elogind service solved my problem.

4
  • wait, how are you able to edit what i've said? Commented Oct 17, 2021 at 6:36
  • Many parts of SE can be confusing when starting out! Maybe start with our tour, then hit some of the Help Pages, in particular the one on editing. Welcome to U&L! Commented Nov 23, 2021 at 15:05
  • Despite already using Gentoo with elogind, I started hitting this tty0 permission error in 2023 when running startx as a non-root user. Ultimately I fixed it by switching to startx -- vt1, using an alias in my .bashrc. Commented Dec 30, 2023 at 21:51
  • Thanks, this is the solution that worked for me. I had to restart some services while troubleshooting something, and it turned out elogind wanted a kick too Commented Jan 7, 2024 at 22:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.