Permissions messed up on X server

2

I followed the tutorial at http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/ and was able to successfully run Firefox. However, after restarting, I can't start X for my user, from the graphical login or via startx. It always errors out with:

(EE) xf86OpenConsole: Cannot open virtual console 2 (permission denied)

If I run startx as root, it runs fine. How can I regain the ability to use X from my user account?

Ryan Kennedy

Posted 2014-11-25T23:56:30.893

Reputation: 161

Answers

0

I'm not sure what I did, but I must have run something as root that I shouldn't have. To run a Docker app with your user, add the option -u $UID to the docker run command. This will ensure that permissions don't get messed up.

Ryan Kennedy

Posted 2014-11-25T23:56:30.893

Reputation: 161

0

Virtual Console 2 seems to refer to tty2. I had this problem while working with chromium-browser and X11 through the startx command in a docker container.

To resolve, I had to create a user in the docker container, add them to 'tty' group, and ensure 'tty' group had read permissions. tty2 already had write permissions enabled when I got there.

Chmod for reference:

sudo chmod 660 /dev/tty2

For Read/Write Owner, Read/Write Group, and nothing for the world.

In my docker run command, I mapped over tty2 using the --device flag:

--device=/dev/tty2:/dev/tty2

That resolved this very specific issue for me. I hope this helps someone down the road.

EnduranceI

Posted 2014-11-25T23:56:30.893

Reputation: 1