1

I am used to being able to launch a second X session in TTY8 with exec startx but instead I'm getting an error:

X: user not authorized to run the X server, aborting.

And then in TTY 8 I end up with a stuck cursor and no login at all. Just the blinking cursor in the very top left. How to I kick up a second x server so that I can log in as another user there?

Update

With help in the comments, I've gotten somewhat farther. From the terminal in an existing xsession, I can do exec sudo startx to get a new x session in TTY8, logged in as that user. If I hop to TTY4, log in and do exec startx I can get a session, too.

Here's what still isn't working: the session I get is a a working x session but without any launcher, top bar or Unity window management. So ctrlaltt gives me a terminal and I can launch applications from there, but I can't switch between them and if I minimize a window there's no way to get it back.

9
  • From the Ministry of Silly Questions: Does sudo exec startx work?
    – K7AAY
    Jan 3, 2014 at 0:28
  • Then I get sudo: exec: command not found but that' makes no sense because exec is a core bash command.
    – Amanda
    Jan 3, 2014 at 0:57
  • @Amanda sudo does not execute in a shell. It just looks in the $PATH. That is why the exec is not found. You should try exec sudo startx.
    – kiri
    Jan 3, 2014 at 4:44
  • @minerz029 That does work, though it gives me a weird half Unity session (no launcher, no topbar).
    – Amanda
    Jan 4, 2014 at 0:53
  • @minerz029 I can get an xsession now, so I think my question is a new one. If you want to post your solution as an answer I'll accept it. thx.
    – Amanda
    Jan 10, 2014 at 20:03

2 Answers 2

1

Not a complete answer, though it lets you run startx as root.

sudo does not execute in a shell. It just looks in the $PATH. That is why the exec is not found. You should try

exec sudo startx

Also, to start Unity you can just try and run the export DISPLAY=:0; unity command in a Terminal.


Also, just guessing though you can try these commands:

sudo startx
export DISPLAY=:0
unity
2
  • Adding that to start x as a non-root user, I need to hop to another TTY console, log in and run startx there
    – Amanda
    Jan 10, 2014 at 22:30
  • "sudo startx" will cause your session (.xinitrc) to run as root, which you don't want. Sep 29, 2018 at 2:37
1

Ok I think I have a solution for you, try this command

sudo dpkg-reconfigure x11-common

It should be on console users only by default, try to put it on Anybody.

1
  • That doesn't change anything, unfortunately. Though I need to update the question b/c minerz029 got me over one hurdle.
    – Amanda
    Jan 10, 2014 at 19:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .